2024-08-16 14:04:26 +08:00

46 lines
792 B
Vue

<template>
<view class="cus_button" @click.stop="handleClick" :style="[btnStyle]">{{ buttonText }}</view>
</template>
<script>
export default {
name: 'cusButton',
props: {
propData: {
type: Object,
default: () => ({})
},
highlight: {
type: Boolean,
default: false
},
buttonText: {
type: String,
default: ''
},
btnStyle: {
type: Object,
default: {}
}
},
emits: ['onClick'],
methods: {
handleClick() {
this.$emit('onClick', this.propData)
}
}
}
</script>
<style scoped lang="scss">
@import '@/static/style/public.scss';
.cus_button {
border-radius: 45rpx;
display: flex;
font-family: 'PingFang SC';
color: #1d2129;
align-items: center;
justify-content: center;
}
</style>