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) {