Repository navigation
feat(Popup): 补齐移动端 maxWidth API 源定义及生成产物 - #1074
Merged
anlyyao merged 3 commits intoNov 26, 2026
Merged
Conversation
Huuyii-sleeping
requested review from
anlyyao,
chaishi,
liweijie0812 and
uyarn
as code owners
November 16, 2026 15:15
This was referenced Nov 16, 2026
anlyyao
reviewed
Nov 23, 2026
8 tasks done
anlyyao
approved these changes
Nov 26, 2026
8 tasks done
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.
🤔 这个 PR 的性质是?
🔗 相关 Issue
关联 Tencent/tdesign-common#2743,按维护者确认的方案提供可选 maxWidth,仅顶部和底部生效,无需新增 Popup 示例。
配套 PR:
💡 需求背景和解决方案
顶部、底部 Popup 在宽屏下可通过可选
maxWidth限宽并水平居中。数字单位为 px,也支持600px、70vw、none等字符串。未传参数时保留原有全宽及已有自定义宽度;移除参数恢复原布局。左右和居中弹层忽略该属性。参数无默认值。API 描述统一为:弹出层最大宽度,仅顶部和底部弹出场景有效。
在
packages/data/Popup.json中登记同一条可选 maxWidth API,覆盖Vue(Mobile)、React(Mobile)、Miniprogram、UniApp,并通过生成器更新四端文档、类型及 props/defaultProps,避免后续生成覆盖组件实现。packages/products完整保留当前源数据的生成结果,包括生成器的类型导入与英文标点调整。生成产物中原有 UniApp zIndex 默认值、visible-change 类型与组件当前实现存在差异;配套组件 PR 只同步本次 maxWidth,保留现有 zIndex 和事件契约,不引入无关行为变更。未引入其他 API 名。Vue/React 需要配套 common 样式;小程序与 UniApp 实现位于同一份 tdesign-miniprogram PR 中。请协调数据源、组件实现和样式的集成。
✅ 验证
pnpm api:lint:4076 条记录、246 个组件文件通过。pnpm run lint、pnpm run build通过。api:docs及finalProject导出;再次生成后 16 个产物 SHA-256 保持一致。git diff --check通过。📝 更新日志
maxWidthAPI。☑️ 请求合并前的自查清单