From 59978c3c93ae5b4e8ecdaa5839757bdc24d037ea Mon Sep 17 00:00:00 2001 From: "Y." Date: Wed, 8 Jan 2025 16:42:03 +0800 Subject: [PATCH] fix(Tabbar): fix style error (#3436) --- src/tab-bar/tab-bar.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tab-bar/tab-bar.ts b/src/tab-bar/tab-bar.ts index 4cd2964d3..7190a3ad6 100644 --- a/src/tab-bar/tab-bar.ts +++ b/src/tab-bar/tab-bar.ts @@ -48,9 +48,10 @@ export default class Tabbar extends SuperComponent { const { value } = this.data; this.$children.forEach((child) => { + child.setData({ crowded: this.$children.length > 3 }); + if (child.properties.value === value) { child.showSpread(); - child.setData({ crowded: this.$children > 3 }); } }); },