From 8e3f3890e93d097df4be744648b9ac404d20a558 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 23 四月 2026 17:58:50 +0800
Subject: [PATCH] 2026.4.23

---
 miniprogram_npm/tdesign-miniprogram/tab-bar/tab-bar.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/miniprogram_npm/tdesign-miniprogram/tab-bar/tab-bar.js b/miniprogram_npm/tdesign-miniprogram/tab-bar/tab-bar.js
index 4985b5b..59a5fef 100644
--- a/miniprogram_npm/tdesign-miniprogram/tab-bar/tab-bar.js
+++ b/miniprogram_npm/tdesign-miniprogram/tab-bar/tab-bar.js
@@ -1 +1 @@
-import{__decorate}from"tslib";import{wxComponent,SuperComponent}from"../common/src/index";import config from"../common/config";import props from"./props";const{prefix:prefix}=config,classPrefix=`${prefix}-tab-bar`;let Tabbar=class extends SuperComponent{constructor(){super(...arguments),this.relations={"../tab-bar-item/tab-bar-item":{type:"descendant"}},this.externalClasses=[`${prefix}-class`],this.backupValue=-1,this.data={prefix:prefix,classPrefix:classPrefix},this.properties=props,this.controlledProps=[{key:"value",event:"change"}],this.observers={value(){this.updateChildren()}},this.lifetimes={ready(){this.showChildren()}},this.methods={showChildren(){const{value:e}=this.data;this.$children.forEach(r=>{r.setData({crowded:this.$children.length>3}),r.properties.value===e&&r.showSpread()})},updateChildren(){const{value:e}=this.data;this.$children.forEach(r=>{r.checkActive(e)})},updateValue(e){this._trigger("change",{value:e})},changeOtherSpread(e){this.$children.forEach(r=>{r.properties.value!==e&&r.closeSpread()})},initName(){return this.backupValue+=1}}}};Tabbar=__decorate([wxComponent()],Tabbar);export default Tabbar;
\ No newline at end of file
+import{__decorate}from"tslib";import{wxComponent,SuperComponent}from"../common/src/index";import config from"../common/config";import props from"./props";import{getRect}from"../common/utils";const{prefix:prefix}=config,classPrefix=`${prefix}-tab-bar`;let Tabbar=class extends SuperComponent{constructor(){super(...arguments),this.relations={"../tab-bar-item/tab-bar-item":{type:"descendant"}},this.externalClasses=[`${prefix}-class`],this.backupValue=-1,this.data={prefix:prefix,classPrefix:classPrefix,placeholderHeight:56},this.properties=props,this.controlledProps=[{key:"value",event:"change"}],this.observers={value(){this.updateChildren()},"fixed, placeholder"(){this.setPlaceholderHeight()}},this.lifetimes={ready(){this.showChildren()}},this.methods={setPlaceholderHeight(){this.properties.fixed&&this.properties.placeholder&&wx.nextTick(()=>{getRect(this,`.${classPrefix}`).then(e=>{this.setData({placeholderHeight:e.height})})})},showChildren(){const{value:e}=this.data;this.$children.forEach(t=>{t.setData({crowded:this.$children.length>3}),t.properties.value===e&&t.showSpread()})},updateChildren(){const{value:e}=this.data;this.$children.forEach(t=>{t.checkActive(e)})},updateValue(e){this._trigger("change",{value:e})},changeOtherSpread(e){this.$children.forEach(t=>{t.properties.value!==e&&t.closeSpread()})},initName(){return this.backupValue+=1}}}};Tabbar=__decorate([wxComponent()],Tabbar);export default Tabbar;
\ No newline at end of file

--
Gitblit v1.9.3