From 5c543fdf26d5b57fda7f9539fe85607a47b0c3a6 Mon Sep 17 00:00:00 2001 From: "LIONCITYS\\lioncity" <18026623439@163.com> Date: Tue, 17 Nov 2020 10:52:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E5=90=8E?= =?UTF-8?q?=20index.vue=20=E7=BC=96=E8=BE=91=E8=A1=A8=E5=8D=95=E4=B8=AD?= =?UTF-8?q?=E5=AD=97=E5=85=B8=E8=BF=94=E7=8E=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dict/Dict.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/Dict/Dict.js b/src/components/Dict/Dict.js index 48554de..94ecc89 100644 --- a/src/components/Dict/Dict.js +++ b/src/components/Dict/Dict.js @@ -18,8 +18,13 @@ export default class Dict { ps.push(getDictDetail(n).then(data => { this.dict[n].splice(0, 0, ...data.content) data.content.forEach(d => { - Vue.set(this.dict.dict[n], d.value, d) - Vue.set(this.dict.label[n], d.value, d.label) + if (parseFloat(d.value).toString() == 'NaN') { + Vue.set(this.dict.dict[n], d.value, d) + Vue.set(this.dict.label[n], d.value, d.label) + } else { + Vue.set(this.dict.dict[n], parseFloat(d.value), d) + Vue.set(this.dict.label[n], parseFloat(d.value), d.label) + } }) })) })