<template>
  <el-link type="primary" @click="handleClick" :disabled="!id">
    {{text | dv}}
  </el-link>
</template>

<script>
export default {
  name: 'CustomerLink',
  props: {
    id: {
      type: String,
      required: null
    },
    text: {
      type: String,
      default: null
    }
  },
  methods: {
    handleClick() {
      this.$router.push(`/view/customer/${this.id}`)
    }
  }
}
</script>
