Repository navigation
feat(table):新增KeepAdding参数,用来处理连续新增 - #8506
Open
Tony-ST0754 wants to merge 1 commit into
Open
Tony-ST0754 wants to merge 1 commit into
Tony-ST0754 wants to merge 1 commit into
Conversation
1、给`Table`组件新增参数`KeepAdding`,用来处理新增数据时是否能连续新增,即编辑弹窗不关闭连续新增 2、在连续新增时,如果需要全部保留或部分保留上一轮的信息,可通过组件中`OnAddAsync`回调来处理 3、由于要在不关闭编辑弹窗的情况下继续新增数据,因此,在弹窗中`Popup`、`Drawer`模式中,既要考虑下一轮新增时编辑弹窗中的绑定验证的模型是否成功创建或创建异常,还要考虑弹窗关闭时的清理问题,整体对`Popup`、`Drawer`模式的弹窗改动比较大 3.1、给`ITableEditDialogOption`及相应的`...DialogOption`新增`KeepOpenAfterSave`参数,用来告知编辑弹窗保存成功后是否继续保存弹窗为打开状态,新增`CreateNextModelAsync`回调供弹窗内部配合`KeepOpenAfterSave`参数使用,作用为连续新增时创建新的绑定模型 3.2、新增`DialogCloseContext`类,用来负责弹窗关闭相关的职责处理,`Popup`、`Drawer`模式,使用统一关闭状态;关闭检查按所属窗口执行,逐个等待回调并尊重否决结要,避免重复关闭及旧窗口清理误伤新窗口 3.3、关闭状态、检查和收尾按当前展示实例管理,保存后的回调或刷新失败时,显示错误并禁止重复保存当前记录,同时不允许初始化下一条记录。 3.4、编辑弹窗的关闭逻辑,由原来的直接关闭,变更为判断是否允许关闭 3.5、连续新增时,保存成功后创建下一条模型,重建表单状态;正文、编辑项和Footer使用同一当前模型 3.6、保存、创建下一条期间禁止重复提交和关闭;忽略旧表单、旧展示及组件销毁后的异步提交 3.7、保存未成功时允许重试;已实际保存、但后续处理失败时阻止重复保存。下一条初始化失败会提示错误,允许正常关闭并清理。
|
Thanks for your PR, @Tony-ST0754. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Contributor
|
Sorry @Tony-ST0754, your pull request is larger than the review limit of 150,000 diff characters |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8506 +/- ##
===========================================
- Coverage 100.00% 99.96% -0.04%
===========================================
Files 777 778 +1
Lines 35175 35583 +408
Branches 0 1 +1
===========================================
+ Hits 35175 35571 +396
- Misses 0 12 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been 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.
Table组件新增参数KeepAdding,用来处理新增数据时是否能连续新增,即编辑弹窗不关闭连续新增OnAddAsync回调来处理Popup、Drawer模式中,既要考虑下一轮新增时编辑弹窗中的绑定验证的模型是否成功创建或创建异常,还要考虑弹窗关闭时的清理问题,整体对Popup、Drawer模式的弹窗改动比较大ITableEditDialogOption及相应的...DialogOption新增KeepOpenAfterSave参数,用来告知编辑弹窗保存成功后是否继续保存弹窗为打开状态,新增CreateNextModelAsync回调供弹窗内部配合KeepOpenAfterSave参数使用,作用为连续新增时创建新的绑定模型DialogCloseContext类,用来负责弹窗关闭相关的职责处理,Popup、Drawer模式,使用统一关闭状态;关闭检查按所属窗口执行,逐个等待回调并尊重否决结要,避免重复关闭及旧窗口清理误伤新窗口Link issues
fixes #8489
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge