sen
1 天以前 7ed2a032d0724e68aec8af940f2ce0023a9f0eb7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<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>