feat(Cascader): support lazy loading - #4599
Draft
RSS1102 wants to merge 1 commit into
Draft
Conversation
Contributor
|
Size Change: 0 B Total Size: 581 kB ℹ️ View Unchanged
|
Contributor
|
Size Change: 0 B Total Size: 88.5 kB ℹ️ View Unchanged
|
commit: |
Contributor
|
Size Change: +415 B (+0.15%) Total Size: 283 kB 📦 View Changed
ℹ️ View Unchanged
|
Collaborator
TDesign Component Site Preview Open
|
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
💡 需求背景和解决方案
Cascader 目前会将
children: true当作普通叶子节点处理,无法在用户展开节点时按需加载下一级数据。本 PR:
load(node) => Promise<CascaderOption[]>,仅在点击children: true的节点时调用。options。children: true,允许再次点击重试;options更新后忽略旧请求结果。value的完整路径已存在时保持原有初始化行为;路径尚未加载时不自动递归请求,用户逐级展开后,若新子树包含当前value,自动恢复完整选中路径,不触发change或关闭面板。keys,并补充懒加载示例、单元测试及 API 文档。📝 更新日志
tdesign-miniprogram
load懒加载children: true节点并恢复初始值@tdesign/uniapp
@tdesign/uniapp-chat
☑️ 请求合并前的自查清单
✅ 验证
pnpm run buildgit diff --check