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 () {
|
data () {
|
||||||
return {
|
return {
|
||||||
currentValue: this.value,
|
currentValue: this.value || [],
|
||||||
childrens: []
|
children: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue