feat: 所有 icon-picker 更换为 icon-select,用于爱速搭 icon 管理

Change-Id: I9e2fcbabb92760666412b8edb0165554c248315a
This commit is contained in:
tooeast 2022-08-12 10:28:15 +08:00
parent 62ccebb495
commit ee3f45b8d2
7 changed files with 38 additions and 62 deletions

View File

@ -482,12 +482,10 @@ export function remarkTpl(config: {
} }
] ]
}, },
{ getSchemaTpl('icon', {
name: 'icon', name: 'icon',
label: '图标', label: '图标'
type: 'icon-picker', }),
className: 'fix-icon-picker-overflow'
},
{ {
name: 'className', name: 'className',
label: 'CSS 类名', label: 'CSS 类名',

View File

@ -96,13 +96,11 @@ export class AvatarPlugin extends BasePlugin {
className: 'ae-ExtendMore mb-3', className: 'ae-ExtendMore mb-3',
body: [ body: [
// 图标 // 图标
{ getSchemaTpl('icon', {
label: '图标',
name: 'icon', name: 'icon',
type: 'icon-picker', label: '图标',
className: 'fix-icon-picker-overflow',
visibleOn: 'data.showtype === "icon"' visibleOn: 'data.showtype === "icon"'
}, }),
// 图片 // 图片
getSchemaTpl('valueFormula', { getSchemaTpl('valueFormula', {
rendererSchema: { rendererSchema: {

View File

@ -73,12 +73,10 @@ export class BreadcrumbPlugin extends BasePlugin {
name: 'href', name: 'href',
placeholder: '链接' placeholder: '链接'
}, },
{ getSchemaTpl('icon', {
name: 'icon', name: 'icon',
label: '图标', label: '图标'
type: 'icon-picker', })
className: 'fix-icon-picker-overflow'
}
] ]
} }
] ]

View File

@ -96,18 +96,16 @@ export class CollapseGroupPlugin extends BasePlugin {
autoFocus: false, autoFocus: false,
form: { form: {
body: [ body: [
{ getSchemaTpl('icon', {
label: '图标',
name: 'expandIcon', name: 'expandIcon',
type: 'icon-picker', label: '图标',
className: 'fix-icon-picker-overflow',
pipeIn: (value: any) => value?.icon, pipeIn: (value: any) => value?.icon,
pipeOut: (value: any) => ({ pipeOut: (value: any) => ({
type: 'icon', type: 'icon',
vendor: '', vendor: '',
icon: value icon: value
}) })
} })
] ]
}, },
pipeIn: (value: string) => { pipeIn: (value: string) => {

View File

@ -189,13 +189,11 @@ export class TableControlPlugin extends BasePlugin {
visibleOn: 'data.addable', visibleOn: 'data.addable',
pipeIn: defaultValue('') pipeIn: defaultValue('')
}, },
{ getSchemaTpl('icon', {
name: 'addBtnIcon', name: 'addBtnIcon',
label: '增加按钮图标', label: '增加按钮图标',
type: 'icon-picker',
className: 'fix-icon-picker-overflow',
visibleOn: 'data.addable' visibleOn: 'data.addable'
}, }),
getSchemaTpl('api', { getSchemaTpl('api', {
name: 'addApi', name: 'addApi',
label: '新增时提交的 API', label: '新增时提交的 API',
@ -212,13 +210,11 @@ export class TableControlPlugin extends BasePlugin {
visibleOn: 'data.removable', visibleOn: 'data.removable',
pipeIn: defaultValue('') pipeIn: defaultValue('')
}, },
{ getSchemaTpl('icon', {
name: 'deleteBtnIcon', name: 'deleteBtnIcon',
label: '删除按钮图标', label: '删除按钮图标',
type: 'icon-picker',
className: 'fix-icon-picker-overflow',
visibleOn: 'data.removable' visibleOn: 'data.removable'
}, }),
getSchemaTpl('api', { getSchemaTpl('api', {
name: 'deleteApi', name: 'deleteApi',
label: '删除时提交的 API', label: '删除时提交的 API',
@ -235,13 +231,11 @@ export class TableControlPlugin extends BasePlugin {
visibleOn: 'data.editable', visibleOn: 'data.editable',
pipeIn: defaultValue('') pipeIn: defaultValue('')
}, },
{ getSchemaTpl('icon', {
name: 'editBtnIcon', name: 'editBtnIcon',
label: '编辑按钮图标', label: '编辑按钮图标',
type: 'icon-picker',
className: 'fix-icon-picker-overflow',
visibleOn: 'data.editable' visibleOn: 'data.editable'
}, }),
getSchemaTpl('switch', { getSchemaTpl('switch', {
label: '是否可复制', label: '是否可复制',
name: 'copyable' name: 'copyable'
@ -253,13 +247,11 @@ export class TableControlPlugin extends BasePlugin {
visibleOn: 'data.copyable', visibleOn: 'data.copyable',
pipeIn: defaultValue('') pipeIn: defaultValue('')
}, },
{ getSchemaTpl('icon', {
name: 'copyBtnIcon', name: 'copyBtnIcon',
label: '复制按钮图标', label: '复制按钮图标',
type: 'icon-picker',
className: 'fix-icon-picker-overflow',
visibleOn: 'data.copyable' visibleOn: 'data.copyable'
}, }),
getSchemaTpl('api', { getSchemaTpl('api', {
name: 'updateApi', name: 'updateApi',
label: '修改时提交的 API', label: '修改时提交的 API',
@ -272,13 +264,11 @@ export class TableControlPlugin extends BasePlugin {
visibleOn: 'data.editable', visibleOn: 'data.editable',
pipeIn: defaultValue('') pipeIn: defaultValue('')
}, },
{ getSchemaTpl('icon', {
name: 'confirmBtnIcon', name: 'confirmBtnIcon',
label: '确认编辑按钮图标', label: '确认编辑按钮图标',
type: 'icon-picker',
className: 'fix-icon-picker-overflow',
visibleOn: 'data.editable' visibleOn: 'data.editable'
}, }),
{ {
type: 'input-text', type: 'input-text',
name: 'cancelBtnLabel', name: 'cancelBtnLabel',
@ -286,13 +276,11 @@ export class TableControlPlugin extends BasePlugin {
visibleOn: 'data.editable', visibleOn: 'data.editable',
pipeIn: defaultValue('') pipeIn: defaultValue('')
}, },
{ getSchemaTpl('icon', {
name: 'cancelBtnIcon', name: 'cancelBtnIcon',
label: '取消编辑按钮图标', label: '取消编辑按钮图标',
type: 'icon-picker',
className: 'fix-icon-picker-overflow',
visibleOn: 'data.editable' visibleOn: 'data.editable'
}, }),
getSchemaTpl('switch', { getSchemaTpl('switch', {
label: '是否可拖拽排序', label: '是否可拖拽排序',
name: 'draggable' name: 'draggable'

View File

@ -66,12 +66,10 @@ export class NavPlugin extends BasePlugin {
required: true required: true
}, },
{ getSchemaTpl('icon', {
type: 'icon-picker',
name: 'icon', name: 'icon',
label: '图标', label: '图标'
className: 'fix-icon-picker-overflow' }),
},
{ {
type: 'group', type: 'group',

View File

@ -478,9 +478,8 @@ setSchemaTpl('expression', {
setSchemaTpl('icon', { setSchemaTpl('icon', {
label: '图标', label: '图标',
type: 'icon-picker', type: 'icon-select',
name: 'icon', name: 'icon',
className: 'fix-icon-picker-overflow',
placeholder: '点击选择图标', placeholder: '点击选择图标',
clearable: true, clearable: true,
description: '' description: ''
@ -642,15 +641,15 @@ setSchemaTpl('visible', {
expressionName: 'visibleOn' expressionName: 'visibleOn'
}); });
// 新版配置面板兼容 [可见] 状态 // 新版配置面板兼容 [可见] 状态
setSchemaTpl('newVisible', { setSchemaTpl('newVisible', {
type: 'ae-StatusControl', type: 'ae-StatusControl',
label: '可见', label: '可见',
mode: 'normal', mode: 'normal',
name: 'visible', name: 'visible',
expressionName: 'visibleOn', expressionName: 'visibleOn',
visibleOn:"data.visible || data.visible === false || data.visibleOn !== undefined" visibleOn:
'data.visible || data.visible === false || data.visibleOn !== undefined'
}); });
setSchemaTpl('hidden', { setSchemaTpl('hidden', {
@ -996,7 +995,7 @@ setSchemaTpl('app-page-args', {
type: 'ae-DataMappingControl', type: 'ae-DataMappingControl',
name: 'params', name: 'params',
label: '页面参数', label: '页面参数',
schema: {"type": "object", "properties":{}}, schema: {type: 'object', properties: {}},
mode: 'horizontal' mode: 'horizontal'
}); });
@ -1004,14 +1003,13 @@ setSchemaTpl(
'iconLink', 'iconLink',
(schema: {name: 'icon' | 'rightIcon'; visibleOn: boolean}) => { (schema: {name: 'icon' | 'rightIcon'; visibleOn: boolean}) => {
const {name, visibleOn} = schema; const {name, visibleOn} = schema;
return { return getSchemaTpl('icon', {
name: name, name: name,
visibleOn, visibleOn,
label: '图标', label: '图标',
type: 'icon-picker',
placeholder: '点击选择图标', placeholder: '点击选择图标',
clearable: true, clearable: true,
description: '' description: ''
}; });
} }
); );