This commit is contained in:
pangxie1991
2017-03-23 20:05:33 +08:00
parent ae79851ee4
commit fed600e1eb
3 changed files with 30 additions and 15 deletions
-6
View File
@@ -14,12 +14,6 @@
type: [Number, String],
default: 0
}
},
data() {
return {
computedActiveKey: this.activeKey
};
}
};
</script>
+10 -4
View File
@@ -19,21 +19,27 @@ export default {
required: true
},
url: {
type: String
type: String,
default: 'javascript:;'
},
info: {
type: String
}
},
methods: {
handleClick() {
this.$parent.computedActiveKey = this.mark;
handleClick(e) {
this.$emit('click', e, {
mark: this.mark,
title: this.title,
url: this.url,
info: this.info
});
}
},
computed: {
classNames() {
return {
'is-select': this.mark === this.$parent.computedActiveKey
'is-select': this.mark === this.$parent.activeKey
};
}
}