Skip to content

Commit

Permalink
fix: updateOptions() undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
kanyxmo committed May 23, 2024
1 parent 1a91af3 commit 3cd641d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/ma-crud/components/form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const add = async () => {
formOptions.value['disabled'] = false
form.value = {}
open()
await nextTick(() => maFormRef.value.updateOptions() )
await nextTick(() => maFormRef.value && maFormRef.value.updateOptions() )
}
const edit = async (data) => {
actionTitle.value = options.edit.title ?? '编辑'
Expand All @@ -167,7 +167,7 @@ const edit = async (data) => {
for (let i in data) form.value[i] = data[i]
open(data)
}
await nextTick(() => maFormRef.value.updateOptions() )
await nextTick(() => maFormRef.value && maFormRef.value.updateOptions() )
}
const see = async (data) => {
actionTitle.value = options.see.title ?? '查看'
Expand All @@ -184,7 +184,7 @@ const see = async (data) => {
for (let i in data) form.value[i] = data[i]
open(data)
}
await nextTick(() => maFormRef.value.updateOptions() )
await nextTick(() => maFormRef.value && maFormRef.value.updateOptions() )
}

const init = () => {
Expand Down

0 comments on commit 3cd641d

Please sign in to comment.