Skip to content

Commit ae2ad18

Browse files
Hieriferhutengclaude
authored
fix(fe,container): remove unnecessary border colors (#233)
* feat(fe): border color issue * fix(fe): remove unused borderColor and borderStyle variables in _renderTabBar Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: huteng <huteng@echo.tech> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 58ee0ec commit ae2ad18

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

fe/packages/container/src/pages/miniApp/miniApp.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -903,17 +903,15 @@ export class MiniApp {
903903
this.tabBarEl = this.el.querySelector('.dimina-mini-app__tabbar')
904904
if (!this.tabBarEl) return
905905

906-
const { color, backgroundColor, borderStyle, list } = this.tabBarConfig
906+
const { color, backgroundColor, list } = this.tabBarConfig
907907
const normalColor = this._sanitizeCssColor(color) || '#999999'
908908
const bg = this._sanitizeCssColor(backgroundColor) || '#ffffff'
909-
const borderColor = borderStyle === 'white' ? '#FFFFFF' : '#E0E0E0'
910909

911910
// 用 DOM API 构建,避免 innerHTML 拼接被配置中的引号 / HTML 片段污染宿主 DOM
912911
this.tabBarEl.textContent = ''
913912
const tabbar = document.createElement('div')
914913
tabbar.className = 'dimina-tabbar'
915-
tabbar.style.backgroundColor = bg
916-
tabbar.style.borderTop = `0.5px solid ${borderColor}`
914+
tabbar.style.backgroundColor = bg;
917915

918916
list.forEach((item, index) => {
919917
const path = this._normalizePagePath(item.pagePath)
@@ -1162,11 +1160,7 @@ export class MiniApp {
11621160
// 2. 更新已渲染的 tabbar DOM(背景 / 边框)
11631161
const tabbar = this.tabBarEl.querySelector('.dimina-tabbar')
11641162
if (tabbar) {
1165-
if (safeBg) tabbar.style.backgroundColor = safeBg
1166-
if (validBorderStyle) {
1167-
const borderColor = validBorderStyle === 'white' ? '#FFFFFF' : '#E0E0E0'
1168-
tabbar.style.borderTop = `0.5px solid ${borderColor}`
1169-
}
1163+
if (safeBg) tabbar.style.backgroundColor = safeBg;
11701164
}
11711165

11721166
// 3. 文字颜色按当前选中态重新刷一遍(同时处理 color 和 selectedColor)

0 commit comments

Comments
 (0)