feat: form 表单赋值
parent
c816591b69
commit
d85ac2c976
|
|
@ -11,7 +11,7 @@ import { $t } from '@vben/locales';
|
|||
async function initSetupVbenForm() {
|
||||
setupVbenForm<ComponentType>({
|
||||
config: {
|
||||
// ant design vue组件库默认都是 v-model:value
|
||||
// antdv-next 组件库默认都是 v-model:value
|
||||
baseModelPropName: 'value',
|
||||
// 一些组件是 v-model:checked 或者 v-model:fileList
|
||||
modelPropNameMap: {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ const [Form, formApi] = useVbenForm({
|
|||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
class: 'w-full',
|
||||
options: [
|
||||
{ label: '选项1', value: '1' },
|
||||
{ label: '选项2', value: '2' },
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ function openFormModal() {
|
|||
formModalApi
|
||||
.setData({
|
||||
// 表单值
|
||||
values: { field1: 'abc', field2: '123' },
|
||||
values: { field1: 'abc', field2: '123', field3: '1' },
|
||||
})
|
||||
.open();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue