tdesign-vue-next icon indicating copy to clipboard operation
tdesign-vue-next copied to clipboard

[Notification] 多个NotificationPlugin 生成的Notification无法指定close某一个

Open wanghewanghe opened this issue 11 months ago • 3 comments

tdesign-vue-next 版本

1.8.1

重现链接

No response

重现步骤

    const re = []
          ;[1,2,3,4,5,6].forEach((o, i) => {
            re[i] = NotifyPlugin.warning({
              title: o,
              duration: 10000,
              footer: foo(i, re)
            })
          })
      const foo = (idx, re) => () => (
        <div className="t-notification__detail">
          <span className="t-notification__detail-item t-is-active" onClick={() => NotifyPlugin.close(re[idx])}>知道了</span>
        </div>
      )

期望结果

No response

实际结果

只关闭了最后一个

框架版本

vue3.3.4

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

wanghewanghe avatar Mar 05 '24 10:03 wanghewanghe

👋 @wanghewanghe,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

github-actions[bot] avatar Mar 05 '24 10:03 github-actions[bot]

同步调用的情况下 NotificationFunction 函数在 nextTick 获取到的 Promise<NotificationInstance> 有错误,获取到会是最后一个导致的。 image

XBIsland avatar Mar 11 '24 13:03 XBIsland

@uyarn 1.9.3 修复了,可以关闭。

XBIsland avatar Apr 06 '24 13:04 XBIsland