feat: 优化
This commit is contained in:
parent
cde17a9434
commit
6e8548b552
@ -108,6 +108,7 @@ const open = (data: any) => {
|
|||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
const submitHandle = async () => {
|
const submitHandle = async () => {
|
||||||
|
loading.value = true
|
||||||
if (await paragraphFormRef.value?.validate()) {
|
if (await paragraphFormRef.value?.validate()) {
|
||||||
if (problemId.value) {
|
if (problemId.value) {
|
||||||
paragraph
|
paragraph
|
||||||
@ -119,8 +120,8 @@ const submitHandle = async () => {
|
|||||||
loading
|
loading
|
||||||
)
|
)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
emit('refresh', res.data)
|
|
||||||
isEdit.value = false
|
isEdit.value = false
|
||||||
|
emit('refresh', res.data)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
const obj =
|
const obj =
|
||||||
@ -131,8 +132,8 @@ const submitHandle = async () => {
|
|||||||
}
|
}
|
||||||
: paragraphFormRef.value?.form
|
: paragraphFormRef.value?.form
|
||||||
paragraphApi.postParagraph(id, documentId, obj, loading).then((res) => {
|
paragraphApi.postParagraph(id, documentId, obj, loading).then((res) => {
|
||||||
emit('refresh')
|
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
|
emit('refresh')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user