mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 20:04:09 +00:00
[new feature] Tabbar: add active-color prop (#2372)
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user