详细问题描述
(DCloud产品不会有明显的bug,所以你遇到的问题大都是在特定环境下才能重现的问题,请仔细描述你的环境和重现方式,否则DCloud很难排查解决你的问题)
[内容]
searchType() {
// 搜索类型选择
let that = this;
uni.showActionSheet({
itemList: that.searchTypeArray,
success: function(res) {
switch (res.tapIndex) {
case 0:
// 地区
that.searchDisabled = true;
that.searchTypePage = 'place';
that.$nextTick(() => {
that.companyFocus = false;
});
break;
case 1:
// 公司
that.searchDisabled = false; //【在这个地方会报错,】
that.searchTypePage = 'company';
that.$nextTick(() => {
that.companyFocus = true;
});
break;
}
that.searchTypeText = that.searchTypeArray[res.tapIndex];
that.searchKeyword = '输入' + that.searchTypeArray[res.tapIndex] + '查找……';
}
});
},
重现步骤
[步骤]
[结果]
【报:TypeError: undefined is not an object (evaluating 't.data.attrs._i')】
在没升级v3的时候是没问题的。
[期望]
[如果语言难以表述清晰,拍一个视频或截图,有图有真相]
IDE运行环境说明
win10
[HBuilder 或 HBuilderX。如果你用其他工具开发uni-app,也需要在此说明]
[IDE版本号]
最新版
[windows版本号]
[mac版本号]
uni-app运行环境说明
[运行端是h5或app或某个小程序?]
[运行端版本号]
最新版
[项目是cli创建的还是HBuilderX创建的?如果是cli创建的,请更新到最新版cli再试]
[编译模式是老模板模式还是新的自定义组件模式?]
App运行环境说明
[Android版本号]
红米note7,安卓最新
[iOS版本号]
[手机型号]
[模拟器型号]
附件
[IDE问题请提供HBuilderX运行日志。菜单帮助-查看运行日志,点右键打开文件所在目录,将log文件压缩成zip包上传]
[App问题请提供可重现问题的代码片段,你补充的细一点,问题就解决的快一点]
[App安装包或H5地址]
[可重现代码片段]
联系方式
[QQ]
choin (作者)
好的,谢谢我试试
2020-03-06 21:22