九旬大爷的梦 f17e29309a
Update link.ts (#3821)
fix(mixins): 页面栈上限后导致的跳转失败
2020-12-08 15:25:55 +08:00

17 lines
276 B
JavaScript

Component({
properties: {
group: Object,
},
methods: {
onClick(event) {
const { url } = event.target.dataset;
if (getCurrentPages().length > 9) {
wx.redirectTo({ url });
} else {
wx.navigateTo({ url });
}
},
},
});