-
Notifications
You must be signed in to change notification settings - Fork 323
Open
Labels
need confirmneed confirmneed confirm
Description
tdesign 技术栈
t-tabs
tdesign 技术栈版本
1.9.7
重现链接
No response
重现步骤
在开发微信小程序时,基础库用的3.8.12,TDsign用的1.9.7。出现报错TypeError: Cannot read property 'distance' of undefined(env: Windows,mp,1.06.2503290; lib: 3.8.12)经过查找,发现错误出现在这里。查不出原因和解决办法
<view class="home-content">
<t-tabs defaultValue="recommend">
<t-tab-panel label="推荐" value="recommend">
<t-pull-down-refresh
value="{{enable}}"
bind:refresh="onRefresh"
loadingTexts="{{['下拉刷新', '松手刷新', '正在刷新', '刷新完成']}}"
>
<view class="home-card-list">
<card
wx:for="{{cardInfo}}"
wx:key="index"
desc="{{item.desc}}"
url="{{item.url}}"
tags="{{item.tags}}"
bindtap="onCardClick"
data-index="{{index}}"
/>
</view>
</t-pull-down-refresh>
</t-tab-panel>
<t-tab-panel label="我的关注" value="follow">
<view class="home-card-list">
</view>
</t-tab-panel>
</t-tabs>
</view> async onLoad() {
if (!app.globalData.isLogin) {
// 未登录:跳转到我的页面
wx.switchTab({ url: `/pages/my/index` });
}
const res = await app.call({ path:'/api/cards'});
this.setData({
cardInfo: res.data.data,
});
},期望结果
怎么做控制台才不会报错
实际结果
TypeError: Cannot read property 'distance' of undefined(env: Windows,mp,1.06.2503290; lib: 3.8.12)
框架版本
No response
浏览器版本
No response
系统版本
No response
Node版本
No response
补充说明
No response
Metadata
Metadata
Assignees
Labels
need confirmneed confirmneed confirm