[new feature] Tabbar: add active-color prop (#2372)

This commit is contained in:
neverland
2018-12-25 21:41:57 +08:00
committed by GitHub
parent fb9a5fe727
commit 728a0e26c5
6 changed files with 79 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
<template>
<div
:class="b({ active })"
:style="style"
@click="onClick"
>
<div :class="b('icon', { dot })">
@@ -47,6 +48,12 @@ export default create({
};
},
computed: {
style() {
return this.active ? { color: this.$parent.activeColor } : null;
}
},
beforeCreate() {
this.$parent.items.push(this);
},