Button.vue
435 Bytes
<template>
<el-button class="button" :class="nativeType" @click.prevent="handleClick" :type="nativeType">
<slot></slot>
</el-button>
</template>
<script>
export default {
name: 'Button',
props: {
nativeType: {
type: String,
default: 'cx'
},
},
methods: {
handleClick (evt) {
this.$emit('click', evt);
}
}
};
</script>
<style scoped lang="scss">
</style>