Skip to content

[Bug]: 版本更新提示【稍后再说】按钮点击没反应 #46

@baiwumm

Description

@baiwumm

软件版本

1.2.6

运行环境

Windows (64)

运行架构

None

重现步骤

版本更新提示【稍后再说】按钮点击没反应
image

期望的结果是什么?

经过排查,是 /plugins/app 文件下的 destroy 方法带上了 key ,应改成:
window.$notification?.destroy();
或者

const key = `open${Date.now()}`;

window.$notification?.open({
+  key,
  message: $t('system.updateTitle'),
  description: $t('system.updateContent'),
  btn() {
    return h('div', { style: { display: 'flex', justifyContent: 'end', gap: '12px', width: '325px' } }, [
      h(
        Button,
        {
          onClick() {
  -           window.$notification?.destroy(key);
  +          window.$notification?.close(key);
          },
        },
        () => $t('system.updateCancel'),
      ),
      h(
        Button,
        {
          type: 'primary',
          onClick() {
            location.reload();
          },
        },
        () => $t('system.updateConfirm'),
      ),
    ]);
  },
  onClose() {
    isShow = false;
  },
});

实际的结果是什么?

点击能正常关闭

日志记录(可选)

No response

补充说明(可选)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions