Files
frontend-app/components/common/my-btn.vue
T
2025-11-16 18:30:50 +08:00

68 lines
932 B
Vue

<template>
<view class="my-btn" @click.stop="onClick"
:style="{
'border-radius':br,'min-height':mh,'background':bg,width:wd,'height':mh
}">
<text :style="{
color:color,'font-size':fz,'font-weight':fw
}">{{text}}</text>
</view>
</template>
<script>
export default {
props:{
text:{
type:String,
default:'确认'
},
wd:{
type:String,
default:'100%'
},
mh:{
type:String,
default:'88rpx'
},
bg:{
type:String,
default:'#7934F6'
},
br:{
type:String,
default:'16rpx'
},
color:{
type:String,
default:'#fff'
},
fz:{
type:String,
default:'32rpx'
},
fw:{
type:String,
default:'500'
}
},
mounted(){
},
methods: {
onClick(){
this.$emit('ok');
}
}
}
</script>
<style lang="scss" scoped>
.my-btn{
width:100%;
display: flex;
align-items: center;
justify-content: center;
}
</style>