This commit is contained in:
cookfront
2017-03-03 16:42:53 +08:00
parent 0637c6eeeb
commit 082b23927b
2 changed files with 13 additions and 13 deletions

View File

@@ -54,14 +54,14 @@ export default {
set(val) {
if (this.isGroup && this.parentGroup) {
let parentValue = this.parentGroup.value.slice();
const parentValue = this.parentGroup.value.slice();
if (val) {
if (parentValue.indexOf(this.name) === -1) {
parentValue.push(this.name);
this.parentGroup.$emit('input', parentValue);
}
} else {
let index = parentValue.indexOf(this.name);
const index = parentValue.indexOf(this.name);
if (index !== -1) {
parentValue.splice(index, 1);
this.parentGroup.$emit('input', parentValue);