From 5c6373e6892aedf7a1aa05190be8f90830b1c243 Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 20 Jul 2023 15:20:41 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=B7=BB=E5=8A=A0=20setTimeout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../JSONManyToManySelect/ValueFormatter.vue | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/components/FormFields/JSONManyToManySelect/ValueFormatter.vue b/src/components/FormFields/JSONManyToManySelect/ValueFormatter.vue index f6f7ad1f5..60cf2fd56 100644 --- a/src/components/FormFields/JSONManyToManySelect/ValueFormatter.vue +++ b/src/components/FormFields/JSONManyToManySelect/ValueFormatter.vue @@ -4,9 +4,7 @@ - - {{ value }} - + {{ value }} @@ -47,11 +45,12 @@ export default { } }, mounted() { - this.getValue() + setTimeout(() => { + this.getValue() + }, 10) }, methods: { async getValue() { - this.loading = true this.attr = this.formatterArgs.attrs.find(attr => attr.name === this.row.name) this.match = this.row.match this.$log.debug('ValueFormatter: ', this.attr, this.row.name) @@ -75,9 +74,7 @@ export default { this.value = this.cellValue } console.log('Value: ', this.value) - this.loading = false } - } }