Blame view

src/mixins/link.js 467 Bytes
e77474de   梁灏   update
1
2
3
  export default {
      computed: {
          linkUrl () {
32a17436   梁灏   Breadcrumb update...
4
5
              const type = typeof this.to;
              return type === 'string' ? this.to : null;
e77474de   梁灏   update
6
7
8
9
10
11
12
13
14
15
16
17
18
          }
      },
      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;
              }
          }
      }
  }