Repository navigation
TOWER-25363 fix(Banner): allow overriding the root id - #1401
Draft
liangyuyuyu wants to merge 1 commit into
Draft
liangyuyuyu wants to merge 1 commit into
liangyuyuyu wants to merge 1 commit into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
|
@chenenpei @netweng PTAL |
Member
|
一个组件有默认 id 这个行为就很奇怪。。。。id 应该是唯一性,这个组件会在很多地方用,这样相当于 getelementbyid 会影响到很多地方。 |
Member
|
哦,这个组件在 4.11 对齐了,建议是不要带默认 global banner 的 id 了。 你的优化可以放到 4.11 一并处理吗,因为 4.11 也调整了 tower global banner 的处理。 |
Collaborator
Author
这是那个 ticket 呀?我这边是 TOWER-25363 ,那我沟通一下移到 4.11.0 |
liangyuyuyu
marked this pull request as draft
November 19, 2026 03:16
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题描述
Banner 组件默认设置了 id 为 global-banner ,如果同一个页面展示了多个 global-banner ,且有一些功能依赖 global-banner 时会出现问题。
解决方案
id 可以通过 Banner prop 传入,同时为了兼容旧的使用方式,id prop 默认值为 global-banner ,不期望设置 id 时可以把 id 设置为空字符串。
自测结果