uni-app store-home组件appid数据绑定后显示错误
uni-app store-home组件appid数据绑定后显示错误
开发环境 | 版本号 | 项目创建方式 |
---|---|---|
Windows | 11 | HBuilderX |
示例代码:
<template>
<view class="storeView">
<view class="storeTitle">微信小店首页</view>
<store-home :appid="appid" />
<view class="storeTitle">微信小店商品</view>
<store-product :appid="appid" :productId="productId" />
</view>
</template>
<script>
export default {
data() {
return {
appid: 'wx34ac10017......',
productId: '10000212......'
}
}
}
</script>
操作步骤:
<template>
<store-home :appid="appid" />
</template>
<script>
export default {
data() {
return {
appid: 'wx34ac10017......'
}
}
}
</script>
预期结果:
微信小店正常显示
实际结果:
微信小店显示空白
bug描述:
问题:store-home组件appid直接在行内赋值,显示正确,用数据绑定之后,无法显示; 验证:
- store-product组件的appid和productId数据绑定之后,可以正常显示
- 在原生微信小程序中store-home组件appid用数据绑定的,可以正常显示store-home内容
- 图片为示例代码在开发者工具中的显示情况
更多关于uni-app store-home组件appid数据绑定后显示错误的实战教程也可以访问 https://www.itying.com/category-93-b0.html
3 回复
暂时判断,可能是微信做出了限制应该,你可以通过加一个 v-if 来解决
更多关于uni-app store-home组件appid数据绑定后显示错误的实战教程也可以访问 https://www.itying.com/category-93-b0.html
已解决,十分感谢!