Browse Source

fix(gui-v2): revise based on PR comments

pull/2795/head
Wing-Kam Wong 2 years ago
parent
commit
1280922286
  1. 2
      packages/nc-gui-v2/components/dlg/QuickImport.vue
  2. 4
      packages/nc-gui-v2/components/template/Editor.vue

2
packages/nc-gui-v2/components/dlg/QuickImport.vue

@ -118,7 +118,7 @@ const disablePreImportButton = computed(() => {
}) })
const disableImportButton = computed(() => { const disableImportButton = computed(() => {
return !templateEditorRef.value?.isValid() return !templateEditorRef.value?.isValid
}) })
const disableFormatJsonButton = computed(() => !jsonEditorRef.value?.isValid) const disableFormatJsonButton = computed(() => !jsonEditorRef.value?.isValid)

4
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)) { for (const [_, o] of Object.entries(validateInfos)) {
if (o?.validateStatus) { if (o?.validateStatus) {
if (o.validateStatus === 'error') { if (o.validateStatus === 'error') {
@ -272,7 +272,7 @@ const isValid = () => {
} }
} }
return true return true
} })
defineExpose({ defineExpose({
importTemplate, importTemplate,

Loading…
Cancel
Save