<image src="https://www.jimaoyi.com/resource/template/jimaoyi/assets/img/logo/logo_white.png" mode="cover" style="width:160rpx;height:70rpx;margin-left:20rpx;"></image>
<view style="width:40%;margin-left: 20rpx;border-radius: 50rpx 50rpx 0 50rpx;background-color: rgba(255,255,255,0.5);padding-top:5rpx;" class="flex align-center padding-lr-sm">
<uni-icons type="search" size="18" color="#ffffff"></uni-icons>
<input class="text-sm" style="color:#fff;" placeholder="输入搜索关键词" type="text" confirm-type="search" v-model="searchKey" @confirm="search"/>
</view>
</view> ```

- 发布:2023-06-06 13:40
- 更新:2023-06-06 13:40
- 阅读:213
产品分类: HbuilderX
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: 12.6.5
HBuilderX版本号: 3.8.4
示例代码:
操作步骤:
上方代码使用的 <uni-icons type="search" size="18" color="#ffffff"></uni-icons>
会引起上述错误
上方代码使用的 <uni-icons type="search" size="18" color="#ffffff"></uni-icons>
会引起上述错误
预期结果:
自定义组件正常显示
自定义组件正常显示
实际结果:
自定义组件显示异常,但在运行在模拟器时正常,不使用发行模式在真机上也正常,只要用发行模式编译就不正常。
自定义组件显示异常,但在运行在模拟器时正常,不使用发行模式在真机上也正常,只要用发行模式编译就不正常。
bug描述:
运行在模拟器时,一切正常,打包发行为微信小程序后,运行报错,经排查,主要是引入自定义组件后会出现如错误,组件显示不正常:
ReferenceError: _2 is not defined WAServiceMainContext.js?t=wechat&s=1686029712748&v=2.32.0:1 ReferenceError: _2 is not defined
at _loop2 (vendor.js? [sm]:1)
at xr (vendor.js? [sm]:1)
at Yr (vendor.js? [sm]:1)
at vendor.js? [sm]:1
at Xr (vendor.js? [sm]:1)
at xi (vendor.js? [sm]:1)
at i (vendor.js? [sm]:1)
at $vm.type (vendor.js? [sm]:1)
at di.attached (vendor.js? [sm]:1)
at o.safeCallback (WASubContext.js?t=wechat&s=1686029712748&v=2.32.0:1)(env: macOS,mp,1.06.2303220; lib: 2.32.0)
0 个回复