fix: 添加默认值

This commit is contained in:
dap
2024-09-30 09:55:55 +08:00
parent e01bd218b9
commit 5cb1e36fba
2 changed files with 5 additions and 4 deletions

View File

@@ -141,7 +141,6 @@ export const drawerSchema: FormSchemaGetter = () => [
{ {
component: 'Select', component: 'Select',
componentProps: { componentProps: {
class: 'w-full',
getPopupContainer, getPopupContainer,
mode: 'multiple', mode: 'multiple',
optionFilterProp: 'label', optionFilterProp: 'label',
@@ -155,7 +154,6 @@ export const drawerSchema: FormSchemaGetter = () => [
{ {
component: 'Select', component: 'Select',
componentProps: { componentProps: {
class: 'w-full',
getPopupContainer, getPopupContainer,
mode: 'multiple', mode: 'multiple',
optionFilterProp: 'label', optionFilterProp: 'label',

View File

@@ -31,6 +31,9 @@ const title = computed(() => {
const [BasicForm, formApi] = useVbenForm({ const [BasicForm, formApi] = useVbenForm({
commonConfig: { commonConfig: {
formItemClass: 'col-span-2', formItemClass: 'col-span-2',
componentProps: {
class: 'w-full',
},
labelWidth: 80, labelWidth: 80,
}, },
schema: drawerSchema(), schema: drawerSchema(),
@@ -138,9 +141,9 @@ const [BasicDrawer, drawerApi] = useVbenDrawer({
// 更新 && 赋值 // 更新 && 赋值
const { const {
postIds = [], postIds = [],
posts, posts = [],
roleIds = [], roleIds = [],
roles, roles = [],
user, user,
} = await findUserInfo(id); } = await findUserInfo(id);
const postOptions = posts.map((item) => ({ const postOptions = posts.map((item) => ({