feat(components): 添加 CuteButton 组件
- 创建了统一风格的按钮组件 - 集成了 Element UI 的 el-button 组件 - 支持 type、disabled、loading 等属性配置 - 实现了点击事件传递功能 - 设置了默认的 mini 尺寸样式 - 添加了组件的基础文档注释
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<!--
|
||||
* 统一按钮风格
|
||||
* @author odboy
|
||||
* @email tianjun@odboy.cn
|
||||
* @created 2026-01-30
|
||||
-->
|
||||
<template>
|
||||
<el-button
|
||||
:type="type"
|
||||
size="mini"
|
||||
:disabled="disabled"
|
||||
:loading="loading"
|
||||
@click="handleClick"
|
||||
>
|
||||
<slot />
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'CuteButton',
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: 'primary'
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick(event) {
|
||||
this.$emit('click', event)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user