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,
week: DatePicker.WeekPicker,
string: Input,
icon: Input,
textarea: Input.TextArea,
number: NumberPicker,
percent: Percent,

View File

@ -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,

View File

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

View File

@ -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',
},
},
};