style: formDemo集成图标选择器
This commit is contained in:
parent
7c93b74e8f
commit
99ffe6a86a
|
@ -23,6 +23,7 @@ import {
|
||||||
import { InputPassword } from '@/components/InputPassword'
|
import { InputPassword } from '@/components/InputPassword'
|
||||||
import { Editor } from '@/components/Editor'
|
import { Editor } from '@/components/Editor'
|
||||||
import { JsonEditor } from '@/components/JsonEditor'
|
import { JsonEditor } from '@/components/JsonEditor'
|
||||||
|
import { IconPicker } from '@/components/IconPicker'
|
||||||
import { ComponentName } from '../types'
|
import { ComponentName } from '../types'
|
||||||
|
|
||||||
const componentMap: Recordable<Component, ComponentName> = {
|
const componentMap: Recordable<Component, ComponentName> = {
|
||||||
|
@ -49,7 +50,8 @@ const componentMap: Recordable<Component, ComponentName> = {
|
||||||
Editor: Editor,
|
Editor: Editor,
|
||||||
TreeSelect: ElTreeSelect,
|
TreeSelect: ElTreeSelect,
|
||||||
Upload: ElUpload,
|
Upload: ElUpload,
|
||||||
JsonEditor: JsonEditor
|
JsonEditor: JsonEditor,
|
||||||
|
IconPicker: IconPicker
|
||||||
}
|
}
|
||||||
|
|
||||||
export { componentMap }
|
export { componentMap }
|
||||||
|
|
|
@ -55,7 +55,8 @@ export enum ComponentNameEnum {
|
||||||
EDITOR = 'Editor',
|
EDITOR = 'Editor',
|
||||||
TREE_SELECT = 'TreeSelect',
|
TREE_SELECT = 'TreeSelect',
|
||||||
UPLOAD = 'Upload',
|
UPLOAD = 'Upload',
|
||||||
JSON_EDITOR = 'JsonEditor'
|
JSON_EDITOR = 'JsonEditor',
|
||||||
|
ICON_PICKER = 'IconPicker'
|
||||||
}
|
}
|
||||||
|
|
||||||
type CamelCaseComponentName = keyof typeof ComponentNameEnum extends infer K
|
type CamelCaseComponentName = keyof typeof ComponentNameEnum extends infer K
|
||||||
|
|
|
@ -321,7 +321,8 @@ export default {
|
||||||
lazyLoad: 'Lazy load',
|
lazyLoad: 'Lazy load',
|
||||||
upload: 'Upload',
|
upload: 'Upload',
|
||||||
// 用户头像
|
// 用户头像
|
||||||
userAvatar: 'User avatar'
|
userAvatar: 'User avatar',
|
||||||
|
iconPicker: 'Icon picker'
|
||||||
},
|
},
|
||||||
guideDemo: {
|
guideDemo: {
|
||||||
guide: 'Guide',
|
guide: 'Guide',
|
||||||
|
|
|
@ -316,7 +316,8 @@ export default {
|
||||||
customContent: '自定义内容',
|
customContent: '自定义内容',
|
||||||
lazyLoad: '懒加载',
|
lazyLoad: '懒加载',
|
||||||
upload: '上传',
|
upload: '上传',
|
||||||
userAvatar: '用户头像'
|
userAvatar: '用户头像',
|
||||||
|
iconPicker: '图标选择器'
|
||||||
},
|
},
|
||||||
guideDemo: {
|
guideDemo: {
|
||||||
guide: '引导页',
|
guide: '引导页',
|
||||||
|
|
|
@ -1774,6 +1774,17 @@ const schema = reactive<FormSchema[]>([
|
||||||
a: 1,
|
a: 1,
|
||||||
b: 2
|
b: 2
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'field87',
|
||||||
|
component: 'Divider',
|
||||||
|
label: t('formDemo.iconPicker')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'field88',
|
||||||
|
component: 'IconPicker',
|
||||||
|
label: t('formDemo.default'),
|
||||||
|
value: 'tdesign:archway'
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue