使用weui,在2.10.4基础库上出现渲染错误
发布于 4 年前 作者 chaoliang 12069 次浏览 来自 官方Issues

“useExtendedLib”: {

"weui": true

},

“usingComponents”: {

"mp-icon": "weui-miniprogram/icon/icon",

"mp-loading": "weui-miniprogram/loading/loading",

"mp-actionSheet": "weui-miniprogram/actionsheet/actionsheet"

},

<mp-icon icon=“add2” class=‘addIcon’ type=“field” color="#6cb1eb" size="{{25}}"></mp-icon>

<mp-loading type=“circle” class=‘loading’ tips="{{’’}}" wx:if="{{isGettingStatus}}"></mp-loading>

[渲染层错误] TypeError: Cannot read property ‘replace’ of undefined

    at rewritor (http://127.0.0.1:41300/__pageframe__/__extendedlib__/weui/latest/pageframe.js:176:44)

    at http://127.0.0.1:41300/__pageframe__/__extendedlib__/weui/latest/pageframe.js:194:127

[渲染层错误] webviewScriptError

Cannot read property ‘replace’ of undefined

TypeError: Cannot read property ‘replace’ of undefined

    at rewritor (http://127.0.0.1:41300/__pageframe__/__extendedlib__/weui/latest/pageframe.js:176:44)

    at http://127.0.0.1:41300/__pageframe__/__extendedlib__/weui/latest/pageframe.js:194:127

[渲染层错误] Uncaught

2 回复

你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)(提高基础库版本尝试下先)

今天早晨遇到同样的问题,环境相同,错误信息如下:

[渲染层错误] TypeError: Cannot read property ‘replace’ of undefined

    at rewritor (http://127.0.0.1:64581/__pageframe__/__extendedlib__/weui/latest/pageframe.js:176:44)

    at http://127.0.0.1:64581/__pageframe__/__extendedlib__/weui/latest/pageframe.js:194:127

将调试基础库变更为2.12.2,错误消失;将基础库改回2.10.4,错误提示重新。

该错误造成weui组件中被隐藏的文字信息被显示出来了,还有部分wx:if和同组的wx:else均被显示出来。

回到顶部