【问题标题】:javascript component vaadin 23JavaScript 组件 vaadin 23
【发布时间】:2022-12-22 15:45:30
【问题描述】:

在 Vaadin 23 中,这个组件“Vaadin v14+ 的系统通知”有问题

这是错误:

Exception is thrown during JavaScript execution. Stacktrace will be dumped separately.

The error has occurred in the JS code: '$0, $1, $2, $3, $4, window.notify.sendNotification($0, $1, $2, $3, $4)'

Uncaught TypeError: Cannot read properties of undefined (reading 'sendNotification') (http://localhost:8080/VAADIN/@fs/C:/Users/carusom/sviluppo/workspace/xxx/xx/node_modules/.vite/deps/FlowClient-6OLYZ7QO.js?v=143fabf3:738:7)

Exception is thrown during JavaScript execution. Stacktrace will be dumped separately.

The error has occurred in the JS code: '$0, $1, $2, $3, $4, window.notify.sendNotification($0, $1, $2, $3, $4)'

Uncaught TypeError: Cannot read properties of undefined (reading 'sendNotification') (http://localhost:8080/VAADIN/@fs/C:/Users/carusom/sviluppo/workspace/xxxxxx/xxxx/node_modules/.vite/deps/FlowClient-6OLYZ7QO.js?v=143fabf3:738:7)

你能帮助我吗?

谢谢马西米利亚诺

错误的原因是什么?

【问题讨论】:

    标签: components vaadin


    【解决方案1】:

    该错误表明 window.notify 不存在,但 JS 是以假定它存在的方式编写的。要解决此问题,您可以确保实际包含初始化 window.notify 的脚本,或者更改已执行的 JS 以优雅地处理不存在的 window.notify

    【讨论】:

      猜你喜欢
      • 2022-12-24
      • 2022-08-18
      • 2022-11-28
      • 2019-05-29
      • 1970-01-01
      • 2012-12-25
      • 1970-01-01
      • 1970-01-01
      • 2023-02-03
      相关资源
      最近更新 更多