This commit is contained in:
zhuxiang
2017-03-01 15:51:31 +08:00
parent dc2d685a34
commit a9b4b6a27b
5 changed files with 22 additions and 20 deletions

View File

@@ -5,19 +5,21 @@
</template>
<script>
export default {
name: 'zan-badge-group',
props: {
// 当前激活 tab 面板的 key
activeKey: {
type: [Number, String],
default: 0
export default {
name: 'zan-badge-group',
props: {
// 当前激活 tab 面板的 key
activeKey: {
type: [Number, String],
default: 0
}
},
data() {
return {
computedActiveKey: this.activeKey
};
}
},
data () {
return {
computedActiveKey: this.activeKey
}
}
};
};
</script>

View File

@@ -30,10 +30,10 @@ export default {
}
},
computed: {
classNames () {
classNames() {
return {
'is-select': this.mark == this.$parent.computedActiveKey ? true : false
}
'is-select': this.mark === this.$parent.computedActiveKey
};
}
}
};

View File

@@ -49,7 +49,7 @@ export default {
set(val) {
if (this.isGroup && this.parentGroup) {
this.parentGroup.$emit('input', val);
this.parentGroup.$emit('input', val);
} else {
this.$emit('input', val);
}

View File

@@ -48,7 +48,7 @@
},
handleSearch() {
// input输入回车后发送回调
this.$emit('search', this.value)
this.$emit('search', this.value);
}
}
};