layout-link.vue 583 Bytes
<template>
  <a href="javascript:;" class="layout-link" @click="jumpTo">
    <slot></slot>
  </a>
</template>

<script>
export default {
  name: 'LayoutLink',
  props: {
    href: String,
    report: {
      type: Object,
    }
  },
  watch: {
    'report': function(newVal) {
      // console.log(newVal);
    }
  },
  // activated() {
  //   console.log(this.report);
  //   console.log("this.report");
  // },
  methods: {
    jumpTo() {
      if (!this.href) {
        return;
      }

      this.$xianyu.goXianyuNewPage({
        url: this.href
      });
    }
  }
};
</script>