mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-09-03 06:39:45 +08:00
25 lines
691 B
JavaScript
25 lines
691 B
JavaScript
const warn = (msg, getValue) => {
|
||
console.warn(msg)
|
||
return;
|
||
|
||
if (type !== 'boolean' && type !== 'string') {
|
||
warn('isLink 属性值必须是一个字符串或布尔值', this.data.isLink)
|
||
return
|
||
}
|
||
|
||
if (['navigateTo', 'redirectTo', 'switchTab', 'reLaunch'].indexOf(this.data.linkType) === -1) {
|
||
warn('linkType 属性可选值为 navigateTo,redirectTo,switchTab,reLaunch', this.data.linkType)
|
||
return
|
||
}
|
||
wx[this.data.linkType].call(wx, { url })
|
||
},
|
||
cellTap () {
|
||
if (!this.data.onlyTapFooter) {
|
||
this.navigateTo()
|
||
}
|
||
},
|
||
notLastCell () {
|
||
this.setData({ isLastCell: false })
|
||
}
|
||
}
|
||
}) |