diff --git a/docs/markdown/v2-progress-tracking.md b/docs/markdown/v2-progress-tracking.md index 6ea832a49..87a0375bf 100644 --- a/docs/markdown/v2-progress-tracking.md +++ b/docs/markdown/v2-progress-tracking.md @@ -103,4 +103,7 @@ - 新增`preview-open`事件 - 新增`preview-close`事件 - \ No newline at end of file + +### Tabbar + +- 新增`inactive-color`属性 diff --git a/packages/tabbar-item/index.js b/packages/tabbar-item/index.js index dd86f78be..f5343576b 100644 --- a/packages/tabbar-item/index.js +++ b/packages/tabbar-item/index.js @@ -37,10 +37,10 @@ export default sfc({ render(h) { const { icon, slots, active } = this; - const style = active ? { color: this.$parent.activeColor } : null; + const color = this.$parent[active ? 'activeColor' : 'inactiveColor']; return ( -