jin-yufeng / mp-html

小程序富文本组件,支持渲染和编辑 html,支持在微信、QQ、百度、支付宝、头条和 uni-app 平台使用
https://jin-yufeng.gitee.io/mp-html
MIT License
3.26k stars 478 forks source link

点击收藏按钮改变按钮状态(传入变量)使用了colgroup的表格丢失问题 #522

Closed PillarChen closed 7 months ago

PillarChen commented 1 year ago

使用环境

HBuilder、UniAPP、微信小程序、库版本V2.4.2

问题描述

<table><colgroup><col width="57"></colgroup><tbody><tr><td height="4" width="57"><p align="CENTER" data="text-indent: 0.35cm">序号</p></td></tr></tbody></table>

表格展示时,若是表格中有<colgroup><col width="57"></colgroup>,页面中的收藏按钮传入变量控制收藏/未收藏状态变化,点击收藏按钮则会出现表格丢失的问题(后台出异常,异常提示: [渲染层错误] [Component] : parse error TypeError: Cannot read property 'replace' of null(env: macOS,mp,1.06.2303220; lib: 2.32.0))

PillarChen commented 1 year ago

自测发现,该bug是因为使用了Vue3,后台出异常了,异常定位位置(node.vue中的第70行的rich-text标签代码,注释掉该行代码表格展示正常也不会出现这个bug了):

截屏2023-05-29 10 08 07