|
|
@@ -1,5 +1,6 @@
|
|
|
// 输入框组件
|
|
|
|
|
|
+import { fontList as sharedFontList } from '@/common/data';
|
|
|
import { positionList } from './article';
|
|
|
import { commonSetProperty, serialNumberStyleList } from './common';
|
|
|
|
|
|
@@ -31,33 +32,15 @@ export const inputStyleList = [
|
|
|
},
|
|
|
];
|
|
|
|
|
|
-export const fontList = [
|
|
|
- {
|
|
|
- value: 'arial, helvetica, sans-serif',
|
|
|
- label: 'Arial',
|
|
|
- type: 'english',
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'League',
|
|
|
- label: '拼音',
|
|
|
- type: 'pinyin',
|
|
|
- },
|
|
|
- {
|
|
|
- value: '楷体,微软雅黑',
|
|
|
- label: '楷体',
|
|
|
- type: 'chinese',
|
|
|
- },
|
|
|
- {
|
|
|
- value: '黑体,微软雅黑',
|
|
|
- label: '黑体',
|
|
|
- type: 'chinese',
|
|
|
- },
|
|
|
- {
|
|
|
- value: '宋体,微软雅黑',
|
|
|
- label: '宋体',
|
|
|
- type: 'chinese',
|
|
|
- },
|
|
|
-];
|
|
|
+export const fontList = sharedFontList.map((font) => {
|
|
|
+ const value = font.value;
|
|
|
+ const type = value === 'League' ? 'pinyin' : value === 'Arial,Helvetica,sans-serif' ? 'english' : 'chinese';
|
|
|
+
|
|
|
+ return {
|
|
|
+ ...font,
|
|
|
+ type,
|
|
|
+ };
|
|
|
+});
|
|
|
|
|
|
export const fontSizeList = [12, 14, 16, 18, 20, 22, 24, 26, 28, 30];
|
|
|
|
|
|
@@ -87,7 +70,7 @@ export function getInputProperty() {
|
|
|
is_enable_auto_correct: true, // 自动修正
|
|
|
model: modelList[0].value, // 模式
|
|
|
input_style: inputStyleList[0].value, // 输入框样式
|
|
|
- font: fontList[1].value, // 字体
|
|
|
+ font: fontList.find(({ type }) => type === 'pinyin')?.value || fontList[0].value, // 字体
|
|
|
font_size: fontSizeList[3], // 字体大小
|
|
|
text_align: textAlignList[0].value, // 文本对齐方式
|
|
|
text_color: '#1d2129', // 文本颜色
|