chore: 富文本编辑器将颜色按钮放出来,方便飘红操作

Change-Id: I16417f8d38b3dfd49043f67c359b79021af94132
This commit is contained in:
2betop 2022-07-13 15:20:51 +08:00
parent ec9cee2617
commit bca80d9c9f
2 changed files with 21 additions and 16 deletions

View File

@ -25,7 +25,8 @@ setSchemaTpl('tpl:rich-text', {
buttons: [
'paragraphFormat',
'quote',
'color',
'textColor',
'backgroundColor',
'|',
'bold',
'italic',
@ -146,7 +147,7 @@ export class TplPlugin extends BasePlugin {
),
name: 'inline',
pipeIn: defaultValue(true),
hiddenOn:'data.wrapperComponent !== ""'
hiddenOn: 'data.wrapperComponent !== ""'
}),
getSchemaTpl('tpl:content'),
getSchemaTpl('tpl:rich-text')

View File

@ -353,7 +353,7 @@ setSchemaTpl(
rendererWrapper: config?.rendererWrapper,
needDeleteValue: config?.needDeleteValue,
valueType: config?.valueType,
evalMode: config?.evalMode ?? false, // 默认需要${}包裹变量
evalMode: config?.evalMode ?? false // 默认需要${}包裹变量
}
]
};
@ -368,7 +368,7 @@ setSchemaTpl(
needDeleteValue: config?.needDeleteValue,
valueType: config?.valueType,
visibleOn: config?.visibleOn,
evalMode: config?.evalMode ?? false, // 默认需要${}包裹变量
evalMode: config?.evalMode ?? false // 默认需要${}包裹变量
};
}
}
@ -727,7 +727,8 @@ setSchemaTpl('richText', {
buttons: [
'paragraphFormat',
'quote',
'color',
'textColor',
'backgroundColor',
'|',
'bold',
'italic',
@ -997,15 +998,18 @@ setSchemaTpl('app-page-args', {
]
});
setSchemaTpl('iconLink', (schema: {name: 'icon' | 'rightIcon', visibleOn: boolean}) => {
const {name, visibleOn} = schema;
return {
name: name,
visibleOn,
label: '图标',
type: 'icon-picker',
placeholder: '点击选择图标',
clearable: true,
description: ''
setSchemaTpl(
'iconLink',
(schema: {name: 'icon' | 'rightIcon'; visibleOn: boolean}) => {
const {name, visibleOn} = schema;
return {
name: name,
visibleOn,
label: '图标',
type: 'icon-picker',
placeholder: '点击选择图标',
clearable: true,
description: ''
};
}
});
);