<uni-nav-bar :fixed="true" :statusBar="true">
<block slot="left">
<view class="city">
<view>
<text class="uni-nav-bar-text">{{ shopName }}</text>
</view>
<uni-icons type="arrowdown" color="#666" size="18" />
</view>
</block>
</uni-nav-bar>
- 发布:2023-09-21 16:53
- 更新:2023-09-21 17:40
- 阅读:239
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win 11
HBuilderX类型: 正式
HBuilderX版本号: 3.8.12
第三方开发者工具版本号: 1.06.2308291
基础库版本号: 3.0.1
项目创建方式: HBuilderX
示例代码:
操作步骤:
<uni-nav-bar :fixed="true" :statusBar="true">
<block slot="left">
<view class="city">
<view>
<text class="uni-nav-bar-text">{{ shopName }}</text>
</view>
<uni-icons type="arrowdown" color="#666" size="18" />
</view>
</block>
</uni-nav-bar>
<uni-nav-bar :fixed="true" :statusBar="true">
<block slot="left">
<view class="city">
<view>
<text class="uni-nav-bar-text">{{ shopName }}</text>
</view>
<uni-icons type="arrowdown" color="#666" size="18" />
</view>
</block>
</uni-nav-bar>
预期结果:
正常编译,自定义导航栏左侧显示我想要的内容
正常编译,自定义导航栏左侧显示我想要的内容
实际结果:
不显示、并且控制台报错
vendor.js? [sm]:2828 TypeError: Cannot read property 'uid' of null
at renderProps (VM1533 vendor.js:6084)
at Object.p (VM1533 vendor.js:6235)
at Proxy.<anonymous> (index.js:19)
at renderComponentRoot (vendor.js? [sm]:5442)
at ReactiveEffect.componentUpdateFn [as fn] (vendor.js? [sm]:5526)
at ReactiveEffect.run (vendor.js? [sm]:1701)
at setupRenderEffect (vendor.js? [sm]:5576)
at mountComponent (vendor.js? [sm]:5414)
at createComponent3 (vendor.js? [sm]:5627)
at $createComponent (VM1533 vendor.js:6905)(env: Windows,mp,1.06.2308291; lib: 3.1.0)
不显示、并且控制台报错
vendor.js? [sm]:2828 TypeError: Cannot read property 'uid' of null
at renderProps (VM1533 vendor.js:6084)
at Object.p (VM1533 vendor.js:6235)
at Proxy.<anonymous> (index.js:19)
at renderComponentRoot (vendor.js? [sm]:5442)
at ReactiveEffect.componentUpdateFn [as fn] (vendor.js? [sm]:5526)
at ReactiveEffect.run (vendor.js? [sm]:1701)
at setupRenderEffect (vendor.js? [sm]:5576)
at mountComponent (vendor.js? [sm]:5414)
at createComponent3 (vendor.js? [sm]:5627)
at $createComponent (VM1533 vendor.js:6905)(env: Windows,mp,1.06.2308291; lib: 3.1.0)
bug描述:
vue3版本情况下,编译到微信小程序端 使用插槽报错
m***@163.com (作者)
收到,我复制的咱们uni-ui项目文档中的代码,我看文档说是已经兼容了vue3。然后报错,现在已经好了。感谢
2023-09-22 09:42