自定义组件 传入动态值 真机无法显示
发布于 5 年前 作者 yanshi 13039 次浏览 来自 问答

自定义属性 empty-hidden 传入动态数据后 真机无法展示页面

3 回复

测试是有显示的

谢邀,麻烦写个代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html),我帮你改下。

<empty-component

    empty-image="…/…/pages/images/[email protected]"

    empty-message=“暂无可用优惠券”

    empty-hidden="{{!attrEmpty}}"

> </empty-component>

attrEmpty 为动态数据 true


效果图如下 模拟器

真机

回到顶部