From b2818a04da6588688622e0b11bdb9f8fca75402e Mon Sep 17 00:00:00 2001 From: maslow Date: Tue, 11 Jan 2022 10:09:06 +0800 Subject: [PATCH] fix(app-console): fix tsd parse missing while init editor --- packages/app-console/src/components/FunctionEditor/index.vue | 5 ++++- packages/app-console/src/views/cloudfunction/debug.vue | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/app-console/src/components/FunctionEditor/index.vue b/packages/app-console/src/components/FunctionEditor/index.vue index 5db0343935..8e5113e249 100644 --- a/packages/app-console/src/components/FunctionEditor/index.vue +++ b/packages/app-console/src/components/FunctionEditor/index.vue @@ -107,8 +107,11 @@ export default { const value = this.editor?.getValue() this.$emit('input', value) this.$emit('change', value) - this.parseImports(this.getValue()) + this.parseImports(this.getValue() || '') }) + + // setTimeout(() => this.parseImports(this.getValue()), 0) + this.parseImports(this.getValue()) }, getValue() { diff --git a/packages/app-console/src/views/cloudfunction/debug.vue b/packages/app-console/src/views/cloudfunction/debug.vue index 03fec5cb3e..4d6541d0d2 100644 --- a/packages/app-console/src/views/cloudfunction/debug.vue +++ b/packages/app-console/src/views/cloudfunction/debug.vue @@ -75,13 +75,14 @@