fix: improve the scroll bar flashing when the modal box is opened (#4438)
This commit is contained in:
@@ -6,10 +6,8 @@ import { Button, Card, message } from 'ant-design-vue';
|
||||
import { useVbenForm } from '#/adapter';
|
||||
|
||||
const [Form, formApi] = useVbenForm({
|
||||
// 使用 tailwindcss grid布局
|
||||
// 提交函数
|
||||
handleSubmit: onSubmit,
|
||||
// 水平布局,label和input在同一行
|
||||
schema: [
|
||||
{
|
||||
component: 'Switch',
|
||||
@@ -55,12 +53,9 @@ const [Form, formApi] = useVbenForm({
|
||||
show(values) {
|
||||
return !!values.field2Switch;
|
||||
},
|
||||
// 只有指定的字段改变时,才会触发
|
||||
triggerFields: ['field2Switch'],
|
||||
},
|
||||
// 字段名
|
||||
fieldName: 'field2',
|
||||
// 界面显示的label
|
||||
label: '字段2',
|
||||
},
|
||||
{
|
||||
@@ -69,12 +64,9 @@ const [Form, formApi] = useVbenForm({
|
||||
disabled(values) {
|
||||
return !!values.field3Switch;
|
||||
},
|
||||
// 只有指定的字段改变时,才会触发
|
||||
triggerFields: ['field3Switch'],
|
||||
},
|
||||
// 字段名
|
||||
fieldName: 'field3',
|
||||
// 界面显示的label
|
||||
label: '字段3',
|
||||
},
|
||||
{
|
||||
@@ -83,12 +75,9 @@ const [Form, formApi] = useVbenForm({
|
||||
required(values) {
|
||||
return !!values.field4Switch;
|
||||
},
|
||||
// 只有指定的字段改变时,才会触发
|
||||
triggerFields: ['field4Switch'],
|
||||
},
|
||||
// 字段名
|
||||
fieldName: 'field4',
|
||||
// 界面显示的label
|
||||
label: '字段4',
|
||||
},
|
||||
{
|
||||
@@ -100,13 +89,10 @@ const [Form, formApi] = useVbenForm({
|
||||
}
|
||||
return null;
|
||||
},
|
||||
// 只有指定的字段改变时,才会触发
|
||||
triggerFields: ['field1'],
|
||||
},
|
||||
// 字段名
|
||||
fieldName: 'field5',
|
||||
help: '当字段1的值为`123`时,必填',
|
||||
// 界面显示的label
|
||||
label: '动态rules',
|
||||
},
|
||||
{
|
||||
@@ -150,13 +136,10 @@ const [Form, formApi] = useVbenForm({
|
||||
}
|
||||
return {};
|
||||
},
|
||||
// 只有指定的字段改变时,才会触发
|
||||
triggerFields: ['field2'],
|
||||
},
|
||||
// 字段名
|
||||
fieldName: 'field6',
|
||||
help: '当字段2的值为`123`时,更改下拉选项',
|
||||
// 界面显示的label
|
||||
label: '动态配置',
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user