This commit is contained in:
梁灏 2018-06-20 17:09:11 +08:00
parent 5fe393db5c
commit e77474de9e
2 changed files with 21 additions and 12 deletions

17
src/mixins/link.js Normal file
View file

@ -0,0 +1,17 @@
export default {
computed: {
linkUrl () {
}
},
methods: {
handleClick () {
const isRoute = this.$router;
if (isRoute) {
this.replace ? this.$router.replace(this.to) : this.$router.push(this.to);
} else {
window.location.href = this.to;
}
}
}
}