更新记录
1.0.0(2026-02-02)
下载此版本
- 五种按钮类型:default、primary、success、warning、danger
- 支持幽灵样式(透明背景+边框)
- 支持禁用状态
- 点击反馈效果
平台兼容性
uni-app(5.0)
| Vue2 |
Vue3 |
Chrome |
Safari |
app-vue |
app-nvue |
Android |
iOS |
鸿蒙 |
| - |
√ |
√ |
- |
√ |
- |
- |
- |
- |
| 微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
小红书小程序 |
快应用-华为 |
快应用-联盟 |
| - |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
Button-Cop 按钮组件
通用按钮组件,支持多种类型、幽灵样式和禁用状态。

功能特性
- 五种按钮类型:default、primary、success、warning、danger
- 支持幽灵样式(透明背景+边框)
- 支持禁用状态
- 点击反馈效果
Props
| 属性名 |
类型 |
默认值 |
说明 |
| type |
String |
"default" |
按钮类型:default、primary、success、warning、danger |
| plain |
Boolean |
false |
是否为幽灵样式 |
| disabled |
Boolean |
false |
是否禁用 |
Events
| 事件名 |
参数 |
说明 |
| click |
- |
点击按钮时触发 |
使用示例
<template>
<ButtonCop type="primary" @click="handleSubmit">提交</ButtonCop>
<ButtonCop type="success" plain>幽灵按钮</ButtonCop>
<ButtonCop type="danger" disabled>禁用按钮</ButtonCop>
</template>
<script setup>
import ButtonCop from '@/components/Button-Cop.vue';
const handleSubmit = () => {
console.log('按钮被点击');
};
</script>