优化当传入参数为 null 时报错的问题
This commit is contained in:
parent
7e84df37bd
commit
220d760d7b
1
.gitignore
vendored
1
.gitignore
vendored
@ -18,3 +18,4 @@ Thumbs.db
|
||||
.vscode
|
||||
.idea
|
||||
/docs/.vuepress/dist/
|
||||
package-lock.json
|
||||
|
2
App.vue
2
App.vue
@ -23,7 +23,7 @@
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
val: ''
|
||||
val: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user