w***@163.com
w***@163.com
  • 发布:2024-04-26 19:27
  • 更新:2024-04-28 08:54
  • 阅读:39

关于picker组件change事件传值的问题

分类:uni-app

使用picker组件
<picker @change="oilpumptype_change" :value="oilpumptype" :range="oilpumptypelist">
<view class="uni-input">{{ oilpumptypelist[oilpumptype] }}</view>
</picker>

oilpumptype_change: function(e) {
let _this = this;

            _this.cmd = 17;  
            _this.data = e.detail.value;  

}

报错
[Vue warn]: Unhandled error during execution of native event handler
at <ParameterpageId=3pagePath="pages/parameter/parameter"__pageQuery={} ...>
19:19:16.051 TypeError: Cannot read property 'detail' of undefined
这是为什么?

2024-04-26 19:27 负责人:无 分享
已邀请:
爱豆豆

爱豆豆 - 办法总比困难多

你运行的那个端?运行你提供的代码片段后是正常的 无法复现
能提供一个完整的复现demo吗

要回复问题请先登录注册