<template>
  <span class="uif-link" :class="'uif-link-' + type"><span @click="handleClick"><slot></slot></span></span>
</template>
<script>
import { oneOf } from '@uif/hq/src/utils/assist'
export default {
  name: 'u-link',
  props: {
    type: {
      validator (value) {
        return oneOf(value, ['default', 'label', 'ghost'])
      },
      default: 'default'
    }
  },
  methods: {
    handleClick (event) {
      this.$emit('click', event)
    }
  }
}
</script>
