Files
uniapp-im-shop/components/cb-button/cb-button.vue
2025-12-24 02:01:34 +08:00

47 lines
880 B
Vue

<script setup>
const props = defineProps({
disabled: {
type: Boolean,
default: false
}
})
// 抛出点击事件
const emits = defineEmits(['click'])
</script>
<template>
<view class="cb-button">
<button
:disabled="props.disabled"
@click="emits('click')"
class="cb-button"
>
<slot></slot>
</button>
</view>
</template>
<style lang="scss" scoped>
.cb-button {
button {
height: 96rpx;
line-height: 96rpx;
border-radius: 96rpx;
background: linear-gradient(180deg, #00d993 0%, #00d9c5 100%);
font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 32rpx;
color: #ffffff;
font-style: normal;
text-transform: none;
&::after {
border: none;
}
&[disabled] {
background: #d9d9d9;
}
}
}
</style>