Checkbox value support null
This commit is contained in:
parent
7a1b1cc711
commit
1582a8b1c6
1 changed files with 6 additions and 6 deletions
|
@ -30,8 +30,8 @@
|
|||
},
|
||||
data () {
|
||||
return {
|
||||
currentValue: this.value,
|
||||
childrens: []
|
||||
currentValue: this.value || [],
|
||||
children: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -49,10 +49,10 @@
|
|||
},
|
||||
methods: {
|
||||
updateModel (update) {
|
||||
this.childrens = findComponentsDownward(this, 'Checkbox');
|
||||
if (this.childrens) {
|
||||
const { value } = this;
|
||||
this.childrens.forEach(child => {
|
||||
this.children = findComponentsDownward(this, 'Checkbox');
|
||||
if (this.children) {
|
||||
const value = this.value || [];
|
||||
this.children.forEach(child => {
|
||||
child.model = value;
|
||||
|
||||
if (update) {
|
||||
|
|
Loading…
Add table
Reference in a new issue