提交 1582a8b1 编写于 作者: View Design's avatar View Design

Checkbox value support null

上级 7a1b1cc7
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
}, },
data () { data () {
return { return {
currentValue: this.value, currentValue: this.value || [],
childrens: [] children: []
}; };
}, },
computed: { computed: {
...@@ -49,10 +49,10 @@ ...@@ -49,10 +49,10 @@
}, },
methods: { methods: {
updateModel (update) { updateModel (update) {
this.childrens = findComponentsDownward(this, 'Checkbox'); this.children = findComponentsDownward(this, 'Checkbox');
if (this.childrens) { if (this.children) {
const { value } = this; const value = this.value || [];
this.childrens.forEach(child => { this.children.forEach(child => {
child.model = value; child.model = value;
if (update) { if (update) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册