diff --git a/packages/app/src/components/form.fields/registry.ts b/packages/app/src/components/form.fields/registry.ts index d6a15d621de..5b1d95f99d4 100644 --- a/packages/app/src/components/form.fields/registry.ts +++ b/packages/app/src/components/form.fields/registry.ts @@ -33,6 +33,7 @@ export const setup = () => { month: DatePicker.MonthPicker, week: DatePicker.WeekPicker, string: Input, + icon: Input, textarea: Input.TextArea, number: NumberPicker, percent: Percent, diff --git a/packages/plugin-collections/src/collections/collections.ts b/packages/plugin-collections/src/collections/collections.ts index 77346ed83dc..fe172d4f1cf 100644 --- a/packages/plugin-collections/src/collections/collections.ts +++ b/packages/plugin-collections/src/collections/collections.ts @@ -52,13 +52,13 @@ export default { }, }, { - interface: 'string', + interface: 'icon', type: 'virtual', name: 'icon', title: '图标', defaultValue: 'TableOutlined', component: { - type: 'string', + type: 'icon', showInTable: true, showInForm: true, showInDetail: true, diff --git a/packages/plugin-collections/src/interfaces/index.ts b/packages/plugin-collections/src/interfaces/index.ts index 2d55c4f1757..63361dfcb44 100644 --- a/packages/plugin-collections/src/interfaces/index.ts +++ b/packages/plugin-collections/src/interfaces/index.ts @@ -63,6 +63,7 @@ export const options = [ types.sort, types.password, types.json, + types.icon, ], } ].map(({title, children}: any) => ({ diff --git a/packages/plugin-collections/src/interfaces/types.ts b/packages/plugin-collections/src/interfaces/types.ts index 85886cd8cb0..993c331b728 100644 --- a/packages/plugin-collections/src/interfaces/types.ts +++ b/packages/plugin-collections/src/interfaces/types.ts @@ -472,10 +472,21 @@ export const json = { options: { interface: 'json', type: 'json', - dottie: true, + mode: 'replace', // developerMode: true, component: { type: 'hidden', }, }, }; + +export const icon = { + title: '图标', + options: { + interface: 'icon', + type: 'string', + component: { + type: 'icon', + }, + }, +};