// 输入框组件 import { positionList } from './article'; import { commonSetProperty, serialNumberStyleList } from './common'; // 模式列表 export const modelList = [ { value: 'pinyin', label: '拼音', }, { value: 'chinese', label: '汉字', }, { value: 'english', label: '英文', }, ]; // 输入框样式 export const inputStyleList = [ { value: 'horizontal_line', label: '横线', }, { value: 'input', label: '输入框', }, ]; export const fontList = [ { value: 'arial, helvetica, sans-serif', label: 'Arial', isPinyin: false, }, { value: 'League', label: '拼音=League', isPinyin: true, }, { value: '楷体,微软雅黑', label: '楷体=楷体,微软雅黑', isPinyin: false, }, { value: '黑体,微软雅黑', label: '黑体=黑体,微软雅黑;', isPinyin: false, }, { value: '宋体,微软雅黑', label: '宋体=宋体,微软雅黑;', isPinyin: false, }, ]; export const fontSizeList = [12, 14, 16, 18, 20, 22, 24, 26, 28, 30]; export const textAlignList = [ { value: 'left', label: '左对齐', }, { value: 'center', label: '居中对齐', }, { value: 'right', label: '右对齐', }, ]; export function getInputProperty() { return { ...commonSetProperty, sn_style: serialNumberStyleList[0].value, sn_background_color: '#ea3232', // 序号背景色 is_enable_pinyin: true, // 是否启用拼音 pinyin_position: positionList[0].value, // 拼音位置 is_enable_sentence_case: true, // 句首大写 is_enable_auto_correct: true, // 自动修正 model: modelList[0].value, // 模式 input_style: inputStyleList[0].value, // 输入框样式 font: fontList[1].value, // 字体 font_size: fontSizeList[3], // 字体大小 text_align: textAlignList[0].value, // 文本对齐方式 text_color: '#1d2129', // 文本颜色 background_color: '#ffffff', // 背景色 }; } export function getInputData() { return { type: 'input', title: '输入框', property: getInputProperty(), answer: { text: '', // 答案文本 }, content: '', // 文本内容 }; }