From a4a56da0a3421804f1d5ad1b3794fbae64d0a5d4 Mon Sep 17 00:00:00 2001 From: "liu.shiyi" Date: Tue, 4 Jul 2023 19:41:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BF=AE=E5=A4=8D=E7=BF=BB=E7=89=8C?= =?UTF-8?q?=E5=99=A8=E6=8E=A7=E5=88=B6=E5=8F=B0=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../packages/BasicComponents/DigitalFlop/index.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/data-room-ui/packages/BasicComponents/DigitalFlop/index.vue b/data-room-ui/packages/BasicComponents/DigitalFlop/index.vue index d1cb04b2..74578409 100644 --- a/data-room-ui/packages/BasicComponents/DigitalFlop/index.vue +++ b/data-room-ui/packages/BasicComponents/DigitalFlop/index.vue @@ -59,6 +59,8 @@ export default { }, computed: { option () { + let str=this.config.option.data + if (!this.config.option.data) return { ...this.config.customize, data: [] } if ( this.config.option.data.toString().split('').length < this.config.customize.numberDigits @@ -68,16 +70,16 @@ export default { this.config.option.data.toString().split('').length for (let i = 0; i < len; i++) { // eslint-disable-next-line vue/no-side-effects-in-computed-properties - this.config.option.data = + str = (this.config.customize.placeHolder ? this.config.customize.placeHolder - : ' ') + this.config.option.data + : ' ') + str } } const a = this.config.customize.formatter === 0 - ? this.config.option.data - : formatter(this.config.option.data, this.config.customize.formatter) + ? str + : formatter(str, this.config.customize.formatter) const arr = a.toString().split('') if (this.config.customize.slotRight !== '') {