feat: add icon field

This commit is contained in:
chenos 2020-12-13 20:46:40 +08:00
parent 71b2d9bfeb
commit ab90b15ffc
4 changed files with 16 additions and 3 deletions

View File

@ -33,6 +33,7 @@ export const setup = () => {
month: DatePicker.MonthPicker, month: DatePicker.MonthPicker,
week: DatePicker.WeekPicker, week: DatePicker.WeekPicker,
string: Input, string: Input,
icon: Input,
textarea: Input.TextArea, textarea: Input.TextArea,
number: NumberPicker, number: NumberPicker,
percent: Percent, percent: Percent,

View File

@ -52,13 +52,13 @@ export default {
}, },
}, },
{ {
interface: 'string', interface: 'icon',
type: 'virtual', type: 'virtual',
name: 'icon', name: 'icon',
title: '图标', title: '图标',
defaultValue: 'TableOutlined', defaultValue: 'TableOutlined',
component: { component: {
type: 'string', type: 'icon',
showInTable: true, showInTable: true,
showInForm: true, showInForm: true,
showInDetail: true, showInDetail: true,

View File

@ -63,6 +63,7 @@ export const options = [
types.sort, types.sort,
types.password, types.password,
types.json, types.json,
types.icon,
], ],
} }
].map(({title, children}: any) => ({ ].map(({title, children}: any) => ({

View File

@ -472,10 +472,21 @@ export const json = {
options: { options: {
interface: 'json', interface: 'json',
type: 'json', type: 'json',
dottie: true, mode: 'replace',
// developerMode: true, // developerMode: true,
component: { component: {
type: 'hidden', type: 'hidden',
}, },
}, },
}; };
export const icon = {
title: '图标',
options: {
interface: 'icon',
type: 'string',
component: {
type: 'icon',
},
},
};