From 220d760d7b4c880e1c8e13b815d6b206a528de8a Mon Sep 17 00:00:00 2001 From: FungLeo Date: Fri, 8 May 2020 10:39:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BD=93=E4=BC=A0=E5=85=A5?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=B8=BA=20null=20=E6=97=B6=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + App.vue | 2 +- src/components/pro/pro.js | 3 +-- src/components/simple/simple.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index f3c5475..354c71a 100755 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ Thumbs.db .vscode .idea /docs/.vuepress/dist/ +package-lock.json diff --git a/App.vue b/App.vue index 451c12a..bc6552b 100755 --- a/App.vue +++ b/App.vue @@ -23,7 +23,7 @@ }, data: function () { return { - val: '' + val: null } }, methods: { diff --git a/src/components/pro/pro.js b/src/components/pro/pro.js index 1e9e135..b8d0d50 100644 --- a/src/components/pro/pro.js +++ b/src/components/pro/pro.js @@ -25,10 +25,9 @@ export default { }, methods: { init() {// 初始化 - this.currentValue = this.value; this.themeName = this.theme; this.preview = this.isPreview; - this.currentValue = this.value; + this.currentValue = this.value || ''; if (this.isPreview) { return; } diff --git a/src/components/simple/simple.js b/src/components/simple/simple.js index 7ee9af7..0ee40f5 100644 --- a/src/components/simple/simple.js +++ b/src/components/simple/simple.js @@ -14,7 +14,7 @@ export default { }, methods: { init() { - this.currentValue = this.value; + this.currentValue = this.value || ''; this.themeName = this.theme; this.preview = this.isPreview; if (this.isPreview) {