[navbar] navbar 冷启动首屏与右上角胶囊错位

Aperta
#4,732 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@lnuxe ci sta già lavorando.

Dal 17/11/2026.

  • #4733 di @lnuxe — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript
Ambito
frontend, mobile

Direzione di ricerca

Start with the t-navbar implementation and its tests, then inspect how it reads the WeChat system information used to position the navigation bar during page startup. Reproduce the cold-start misalignment on a real device using the linked example; done means the navbar content and the top-right capsule are vertically aligned on the first entry, without backgrounding the app.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

🐞 bug 🧐 unconfirmed
选择框架

tdesign-miniprogram

NPM 包版本

1.18

基础库调试库版本(如果出现问题的框架为 tdesign-miniprogram,请提供基础调试库版本)

3.17.6

重现链接

https://developers.weixin.qq.com/s/No37vFm688dy

重现步骤
  1. 页面开启自定义导航栏(navigationStyle: "custom"),按官方示例使用 t-navbar:

  2. 用真机(非开发者工具)冷启动进入该页面;

  3. 观察:右上角胶囊位置偏上,与导航栏内容(标题 / 左侧图标)不在同一水平线;

  4. 把小程序切到后台,再从「最近使用」切回,胶囊归位,与导航栏内容对齐。

环境

  • tdesign-miniprogram:1.18.0
  • 基础库:3.17.6
  • 微信版本:8.0.80
  • 机型 / 系统:小米 14 / Android 16
  • 开发者工具模拟器:正常(不重现)
image
期望结果

首次进入页面时,t-navbar 的内容中线应与右上角胶囊中线直接对齐,不需要切后台或重新进入才归位。
1
2

实际结果

冷启动进入页面时,右上角胶囊按钮的位置偏上:
3

把小程序切到后台,再从「最近使用」切回后,右侧的胶囊才会与navbar导航栏内容居中对齐(图中红线为对齐后的基线):
4

补充说明

No response

Lingua principale
Vue
Stelle
1.8k
Fork
351
Merge medio
22h 9m
PR unite (30g)
17

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Tencent/tdesign-miniprogram

Tutte le issue di Tencent/tdesign-miniprogram

Issue simili

Altre issue su Web Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.