43 lines
1009 B
Vue
43 lines
1009 B
Vue
|
<template>
|
||
|
<div class="custom-btn" :class="props.isBottom ? 'custom-btn-bottom' : ''">
|
||
|
<wd-button custom-class="custom-btn-class" @click="clickBtn">{{ props.btnText }}</wd-button>
|
||
|
</div>
|
||
|
</template>
|
||
|
<script setup>
|
||
|
import { reactive } from 'vue'
|
||
|
import { defineProps, defineEmits } from 'vue'
|
||
|
const state = reactive({})
|
||
|
const emits = defineEmits(['clickBtn'])
|
||
|
const props = defineProps({
|
||
|
isBottom: false, //是否底部按钮
|
||
|
btnText: '', //按钮文字
|
||
|
})
|
||
|
|
||
|
//点击
|
||
|
const clickBtn = () => {
|
||
|
emits('clickBtn')
|
||
|
}
|
||
|
</script>
|
||
|
<style scoped lang="scss">
|
||
|
.custom-btn {
|
||
|
display: flex;
|
||
|
flex-direction: row;
|
||
|
align-items: center;
|
||
|
justify-content: center;
|
||
|
.custom-btn-class {
|
||
|
background-color: $theme-primary;
|
||
|
padding: 18rpx 185rpx;
|
||
|
border-radius: 8rpx;
|
||
|
box-shadow: 0 6px 12px 2px rgba(188, 188, 188, 0.08);
|
||
|
font-size: 28rpx;
|
||
|
font-weight: 500;
|
||
|
line-height: 40rpx;
|
||
|
}
|
||
|
}
|
||
|
.custom-btn-bottom {
|
||
|
width: 100%;
|
||
|
background-color: #fff;
|
||
|
padding: 14rpx 0 72rpx;
|
||
|
}
|
||
|
</style>
|