diff --git a/packages/nc-gui-v2/components/dlg/QuickImport.vue b/packages/nc-gui-v2/components/dlg/QuickImport.vue index 06fce6b8b1..a21d8b1377 100644 --- a/packages/nc-gui-v2/components/dlg/QuickImport.vue +++ b/packages/nc-gui-v2/components/dlg/QuickImport.vue @@ -118,7 +118,7 @@ const disablePreImportButton = computed(() => { }) const disableImportButton = computed(() => { - return !templateEditorRef.value?.isValid() + return !templateEditorRef.value?.isValid }) const disableFormatJsonButton = computed(() => !jsonEditorRef.value?.isValid) diff --git a/packages/nc-gui-v2/components/template/Editor.vue b/packages/nc-gui-v2/components/template/Editor.vue index abc284e2ae..247e300353 100644 --- a/packages/nc-gui-v2/components/template/Editor.vue +++ b/packages/nc-gui-v2/components/template/Editor.vue @@ -263,7 +263,7 @@ async function importTemplate() { } } -const isValid = () => { +const isValid = computed(() => { for (const [_, o] of Object.entries(validateInfos)) { if (o?.validateStatus) { if (o.validateStatus === 'error') { @@ -272,7 +272,7 @@ const isValid = () => { } } return true -} +}) defineExpose({ importTemplate,