build: update plugins
This commit is contained in:
@@ -129,23 +129,24 @@ const loading = ref(false)
|
||||
|
||||
const save = async () => {
|
||||
const write = unref(writeRef)
|
||||
const validate = await write?.elFormRef?.validate()?.catch(() => {})
|
||||
if (validate) {
|
||||
loading.value = true
|
||||
const data = (await write?.getFormData()) as TableData
|
||||
const res = await saveTableApi({
|
||||
data
|
||||
})
|
||||
.catch(() => {})
|
||||
.finally(() => {
|
||||
loading.value = false
|
||||
await write?.elFormRef?.validate(async (isValid) => {
|
||||
if (isValid) {
|
||||
loading.value = true
|
||||
const data = (await write?.getFormData()) as TableData
|
||||
const res = await saveTableApi({
|
||||
data
|
||||
})
|
||||
if (res) {
|
||||
dialogVisible.value = false
|
||||
tableObject.currentPage = 1
|
||||
getList()
|
||||
.catch(() => {})
|
||||
.finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
if (res) {
|
||||
dialogVisible.value = false
|
||||
tableObject.currentPage = 1
|
||||
getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user