<picker @change="bindUserDataChange" mode="selector" :value="userDataIndex" :range="userData" :range-key="'name'" >
<view class="line-h-40 d-flex-row a-center">
<text class="text-white font line-h-40">{{userData[userDataIndex].name}}</text>
<image class="ml" style="width: 20rpx;height: 12rpx;" src="../../static/images/sy/sj_img.png" ></image>
</view>
</picker>
<script>
export default {
data() {
return {
userDataIndex:0,
userData:[
{
jiaoyi: 0,
jihuo: 0,
name: "今日",
shouyi: 0
}
],
}
},
methods: {
bindUserDataChange(e){
console.log(e);
this.userDataIndex = e.detail.value
}
}
}
- 发布:2023-04-08 13:49
- 更新:2023-05-22 16:23
- 阅读:613
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win11
HBuilderX类型: 正式
HBuilderX版本号: 3.7.3
手机系统: Android
手机系统版本号: Android 11
手机厂商: OPPO
手机机型: OPPO Reno4 5G
页面类型: nvue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
点击picker
点击picker
预期结果:
弹窗下来选择框
弹窗下来选择框
实际结果:
点击没有效果,代码报错
[Vue warn]: Unhandled error during execution of native event handler
at <PickeronChange=fn<bound bindUserDataChange>mode="selector"value=0 ...>
at <Index__pageId=1__pagePath="pages/index/index"__pageQuery={}>
12:18:54.583 [JS Framework] Failed to invoke the event handler of "click" on view (104):
ReferenceError: __uniConfig is not defined
12:18:54.594 reportJSException >>>> exception function:__WEEX_CALL_JAVASCRIPT__, exception:JavaScript execute error!Uncaught ReferenceError: __uniConfig is not defined
at Jt (uni-jsframework.js:2:7574)
at Ie (uni-jsframework.js:2:40215)
at He (uni-jsframework.js:2:41065)
at _t (uni-jsframework.js:2:41094)
at Ht (uni-jsframework.js:6:1762)
at In (uni-jsframework.js:6:1849)
at h (uni-jsframework.js:16:15431)
at fireEvent (uni-jsframework.js:18:11179)
at fireEvent (uni-jsframework.js:32:248565)
at PN (uni-jsframework.js:19:3873)
点击没有效果,代码报错
[Vue warn]: Unhandled error during execution of native event handler
at <PickeronChange=fn<bound bindUserDataChange>mode="selector"value=0 ...>
at <Index__pageId=1__pagePath="pages/index/index"__pageQuery={}>
12:18:54.583 [JS Framework] Failed to invoke the event handler of "click" on view (104):
ReferenceError: __uniConfig is not defined
12:18:54.594 reportJSException >>>> exception function:__WEEX_CALL_JAVASCRIPT__, exception:JavaScript execute error!Uncaught ReferenceError: __uniConfig is not defined
at Jt (uni-jsframework.js:2:7574)
at Ie (uni-jsframework.js:2:40215)
at He (uni-jsframework.js:2:41065)
at _t (uni-jsframework.js:2:41094)
at Ht (uni-jsframework.js:6:1762)
at In (uni-jsframework.js:6:1849)
at h (uni-jsframework.js:16:15431)
at fireEvent (uni-jsframework.js:18:11179)
at fireEvent (uni-jsframework.js:32:248565)
at PN (uni-jsframework.js:19:3873)
bug描述:
nvue 中使用uniapp picker 组件,点击无效,并提示错误,编译成微信小程序没有问题
[Vue warn]: Unhandled error during execution of native event handler
at <PickeronChange=fn<bound bindUserDataChange>mode="selector"value=0 ...>
at <IndexpageId=1pagePath="pages/index/index"pageQuery={}>
12:18:54.583 [JS Framework] Failed to invoke the event handler of "click" on view (104):
ReferenceError: uniConfig is not defined
12:18:54.594 reportJSException >>>> exception function:WEEX_CALL_JAVASCRIPT, exception:JavaScript execute error!Uncaught ReferenceError: __uniConfig is not defined
at Jt (uni-jsframework.js:2:7574)
at Ie (uni-jsframework.js:2:40215)
at He (uni-jsframework.js:2:41065)
at _t (uni-jsframework.js:2:41094)
at Ht (uni-jsframework.js:6:1762)
at In (uni-jsframework.js:6:1849)
at h (uni-jsframework.js:16:15431)
at fireEvent (uni-jsframework.js:18:11179)
at fireEvent (uni-jsframework.js:32:248565)
at PN (uni-jsframework.js:19:3873)
c***@gmail.com
现在官网的正式版本是3.7.9 什么时候迭代到正式版本啊
2023-04-19 15:26