vant-weapp/dist/cell/index.js
2018-04-28 12:08:10 +08:00

25 lines
691 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 属性可选值为 navigateToredirectToswitchTabreLaunch', this.data.linkType)
return
}
wx[this.data.linkType].call(wx, { url })
},
cellTap () {
if (!this.data.onlyTapFooter) {
this.navigateTo()
}
},
notLastCell () {
this.setData({ isLastCell: false })
}
}
})