<template>
|
<view class="bottom-fixed">
|
<view class="agree-area">
|
<label class="checkbox-group" @tap="toggle">
|
<checkbox :checked="modelValue" color="#1677ff" />
|
<text class="agree-text">我已阅读并理解上述内容,自愿签署</text>
|
<text class="required">*</text>
|
</label>
|
</view>
|
<view class="btn-group">
|
<button class="cancel-btn" @tap="$emit('cancel')">取消</button>
|
<button
|
class="next-btn"
|
:class="{ disabled: !modelValue }"
|
:disabled="!modelValue || loading"
|
@tap="$emit('confirm')"
|
>
|
{{ loading ? '处理中...' : '下一步' }}
|
</button>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
name: 'BottomFixedBar',
|
props: {
|
modelValue: {
|
type: Boolean,
|
default: false
|
},
|
loading: {
|
type: Boolean,
|
default: false
|
}
|
},
|
methods: {
|
toggle() {
|
this.$emit('update:modelValue', !this.modelValue)
|
}
|
}
|
}
|
</script>
|
|
<style scoped>
|
.bottom-fixed {
|
position: fixed;
|
left: 0;
|
right: 0;
|
bottom: 0;
|
background-color: #ffffff;
|
border-top: 1rpx solid #f5f5f5;
|
z-index: 99;
|
}
|
|
.agree-area {
|
padding: 20rpx 30rpx;
|
}
|
|
.checkbox-group {
|
display: flex;
|
align-items: center;
|
}
|
|
checkbox {
|
transform: scale(0.8);
|
}
|
|
.agree-text {
|
font-size: 28rpx;
|
color: #333;
|
margin-left: 10rpx;
|
}
|
|
.required {
|
font-size: 28rpx;
|
color: #ff4d4f;
|
margin-left: 4rpx;
|
}
|
|
/* 按钮 */
|
.btn-group {
|
display: flex;
|
gap: 20rpx;
|
padding: 20rpx 30rpx 40rpx;
|
}
|
|
.cancel-btn,
|
.next-btn {
|
flex: 1;
|
height: 90rpx;
|
line-height: 90rpx;
|
font-size: 32rpx;
|
border-radius: 8rpx;
|
border: none;
|
}
|
|
.cancel-btn {
|
color: #333;
|
background-color: #f5f5f5;
|
}
|
|
.next-btn {
|
color: #fff;
|
background-color: #1677ff;
|
}
|
|
.next-btn.disabled {
|
background-color: #c9d8e9;
|
opacity: 0.7;
|
}
|
</style>
|