fix(webview):修复页面关闭时未正确移除消息监听器的问题

- 在页面关闭时移除对 HTML 的消息监听器
- 确保 UUID 相关的监听器被正确清理
- 防止因未清理监听器导致的内存泄漏问题
这个提交包含在:
徐勤民 2025-10-27 17:15:26 +08:00
父节点 28a3df495c
当前提交 d7ffd228b7

查看文件

@ -64,6 +64,7 @@ export struct XWebview {
if (this.closeTag !== undefined) {
SZYXLocalStorageHelper.storage.setOrCreate(SZYXLocalStorageKeys.XWebViewCLose, this.closeTag)
}
XWebManager.removeOnMessageToWeb(this._uuidToHtml)
XWebManager.removeOnMessage(this._uuid)
XWebManager.removeOnMessageToHtml(this._uuidToHtml)
if (this._uuidToHtml) {