Button.vue
1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!--
* @Author: xiaomiao 1158771342@qq.com
* @Date: 2023-03-09 15:24:53
* @LastEditors: xiaomiao 1158771342@qq.com
* @LastEditTime: 2023-04-03 09:04:26
* @FilePath: \上报\bdcjg-web\src\components\Button.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<el-button class="button" :disabled="disableds" :class="nativeType" @click.prevent="handleClick" :type="nativeType">
<slot></slot>
</el-button>
</template>
<script>
export default {
name: 'Button',
props: {
nativeType: {
type: String,
default: 'cx'
},
disableds: {
type: Boolean,
default: false
}
},
methods: {
/**
* @description: handleClick
* @param {*} evt
* @author: renchao
*/
handleClick (evt) {
this.$emit('click', evt);
}
}
};
</script>
<style scoped lang="scss">
</style>