<template>
  <el-link type="primary" @click="handleClick" :disabled="id == null">{{name | defaultValue}}</el-link>
</template>

<script>

export default {
  name: 'TeamLink',
  props: {
    id: {
      type: [Number,String],
      default: null
    },
    name: {
      type: String,
      default: null,
    },
  },
  methods: {
    handleClick() {
      this.$emit('click');
        this.$router.push(`/view/team/${this.id}`)
    }
  }
}
</script>
