fix(admin-web): replace inline multi-statement @cancel handler
Frontend CI / Frontend (push) Successful in 2m31s

Prettier with semi:false stripped the semicolons that previously separated
the two inline statements, leaving the Vue compiler unable to parse the
expression. Extract closeItemModal() and bind the handler by reference.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-01 20:47:49 +08:00
parent 162abdc97c
commit 669c9f709a
+6 -4
View File
@@ -437,6 +437,11 @@ function resetItemForm(): void {
itemSourceType.value = 'document'
}
function closeItemModal(): void {
itemModalOpen.value = false
resetItemForm()
}
function handleTreeSelect(keys: (string | number)[]): void {
if (!keys.length) {
return
@@ -688,10 +693,7 @@ function closeItemDetail(): void {
:ok-button-props="itemModalOkButtonProps"
:cancel-button-props="{ style: { width: '80px', borderRadius: '4px' } }"
@ok="itemMutation.mutate()"
@cancel="
itemModalOpen = false
resetItemForm()
"
@cancel="closeItemModal"
>
<div class="knowledge-form-add">
<div class="knowledge-type-row">