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