feat: Form useForm 完成
This commit is contained in:
@@ -14,7 +14,8 @@ import {
|
||||
ElRadio,
|
||||
ElRadioButton,
|
||||
ElCheckbox,
|
||||
ElCheckboxButton
|
||||
ElCheckboxButton,
|
||||
ElInput
|
||||
} from 'element-plus'
|
||||
import { getDictOneApi } from '@/api/common'
|
||||
|
||||
@@ -1384,6 +1385,18 @@ const schema = reactive<FormSchema[]>([
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'field69-1',
|
||||
component: 'Input',
|
||||
label: `custom formItem`,
|
||||
formItemProps: {
|
||||
slots: {
|
||||
default: (formModel: any) => {
|
||||
return <ElInput v-model={formModel['field69-1']} />
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'field70',
|
||||
component: 'Divider',
|
||||
@@ -1401,6 +1414,45 @@ const schema = reactive<FormSchema[]>([
|
||||
const res = await getDictOneApi()
|
||||
return res.data
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'field72',
|
||||
label: `${t('formDemo.selectV2')}`,
|
||||
component: 'SelectV2',
|
||||
componentProps: {
|
||||
options: []
|
||||
},
|
||||
// 远程加载option
|
||||
optionApi: async () => {
|
||||
const res = await getDictOneApi()
|
||||
return res.data
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'field73',
|
||||
label: `${t('formDemo.checkboxGroup')}`,
|
||||
component: 'CheckboxGroup',
|
||||
componentProps: {
|
||||
options: []
|
||||
},
|
||||
// 远程加载option
|
||||
optionApi: async () => {
|
||||
const res = await getDictOneApi()
|
||||
return res.data
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'field74',
|
||||
label: `${t('formDemo.radioGroup')}`,
|
||||
component: 'RadioGroup',
|
||||
componentProps: {
|
||||
options: []
|
||||
},
|
||||
// 远程加载option
|
||||
optionApi: async () => {
|
||||
const res = await getDictOneApi()
|
||||
return res.data
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user