<template>
  <div>
    <el-form :model="property" label-width="72px" label-position="left">
      <SerailNumber :property="property" />
      <el-form-item label="汉字框">
        <el-radio-group v-model="property.frame_type">
          <el-radio v-for="{ value, label } in frameList" :key="value" :label="value" :value="value">
            {{ label }}
          </el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="框颜色">
        <el-color-picker v-model="property.frame_color"></el-color-picker>
      </el-form-item>

      <el-divider />
      <el-form-item label="笔画动画">
        <el-radio-group v-model="property.is_enable_stroke">
          <el-radio v-for="{ value, label } in showList" :key="value" :label="value">
            {{ label }}
          </el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="拼音显示">
        <el-radio-group v-model="property.is_enable_pinyin">
          <el-radio v-for="{ value, label } in showList" :key="value" :label="value">
            {{ label }}
          </el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="读音显示">
        <el-radio-group v-model="property.is_enable_voice">
          <el-radio v-for="{ value, label } in showList" :key="value" :label="value">
            {{ label }}
          </el-radio>
        </el-radio-group>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import SettingMixin from '@/views/book/courseware/create/components/common/SettingMixin';

import {
  getCharacterProperty,
  switchOption,
  funList,
  showList,
  isEnable,
  frameList,
} from '@/views/book/courseware/data/character';

export default {
  name: 'CharacterSetting',
  mixins: [SettingMixin],
  data() {
    return {
      property: getCharacterProperty(),
      switchOption,
      isEnable,
      funList,
      showList,
      frameList,
    };
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
@use '@/styles/mixin.scss' as *;

.el-form {
  @include setting-base;
}
</style>
