deguodaigou/utils/dist/mixins/link.js

18 lines
381 B
JavaScript
Raw Normal View History

2019-12-23 14:13:27 +08:00
export const link = Behavior({
properties: {
url: String,
linkType: {
type: String,
value: 'navigateTo'
}
},
methods: {
jumpLink(urlKey = 'url') {
const url = this.data[urlKey];
if (url) {
wx[this.data.linkType]({ url });
}
}
}
});