Skip to content

fix: 修复"导入意图包"导入成功后不触发列表刷新的问题 - #447

Open
openjiuwen-sync-bot[bot] wants to merge 1 commit into
openJiuwen-ai:studio-2.0from
openjiuwenai:sync/pr-1901
Open

fix: 修复"导入意图包"导入成功后不触发列表刷新的问题#447
openjiuwen-sync-bot[bot] wants to merge 1 commit into
openJiuwen-ai:studio-2.0from
openjiuwenai:sync/pr-1901

Conversation

@openjiuwen-sync-bot

@openjiuwen-sync-bot openjiuwen-sync-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

Paired: GitHub #447GitCode !1901

fix: 修复"导入意图包"导入成功后不触发列表刷新的问题

Linked Closing Issues:

- 新增 @optional() @Inject(NZ_MODAL_DATA) 注入 nzData
- 导入成功后除了 @output() refreshTable.emit(),还调用 nzData.outputs.refreshTable()
  动态创建(nzModalService.create)的模态不会订阅 @output,
  必须通过 nzData 传入的回调通知父组件刷新列表
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@openjiuwen-collaboration-bot

openjiuwen-collaboration-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

head_sha: 3dfb2be3239c69cffda317004462a5fedc90f557

变更摘要

该 PR 主要修复了“导入意图包”导入成功后未触发列表刷新的问题。改动集中在 import-package-modal.component.ts:为 ImportPackageModalComponent 注入 NZ_MODAL_DATA,在导入成功并触发原有 refreshTable 事件后,额外检测并调用由弹窗数据 nzData 传入的 outputs.refreshTable 回调,从而在通过弹窗数据传递刷新回调的场景下也能正确刷新列表。

主要改动

  • 注入弹窗数据: 从 @angular/core 引入 Inject,并从 ng-zorro-antd/modal 引入 NZ_MODAL_DATA,在构造函数中通过 @Optional() @Inject(NZ_MODAL_DATA) 注入 nzData
  • 补充导入成功后的刷新触发: 在 this.refreshTable.emit() 之后,新增对 this.nzData?.outputs?.refreshTable 的判断,并在存在该回调时调用它,使弹窗数据中传入的刷新回调在导入成功后被执行。

@openjiuwen-collaboration-bot

openjiuwen-collaboration-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

head_sha: 3dfb2be3239c69cffda317004462a5fedc90f557

代码审查

✅ 未发现问题

@openjiuwen-collaboration-bot

Copy link
Copy Markdown

head_sha: 3dfb2be3239c69cffda317004462a5fedc90f557

TASK STATUS DETAILS
CodeCheck ✅SUCCESS Click here
AntiPoison ✅SUCCESS Click here
Software Composition Analysis ✅SUCCESS Click here
Npm Build ✅SUCCESS See CHECK tab
Ruff Check ✅SUCCESS See CHECK tab
UT测试 ✅SUCCESS 点此跳转

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 新增意图包界面,点击左侧导入意图包,导入意图对话框的“取消”按钮不生效

2 participants