bottom-button.vue
969 Bytes
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
<!--
* @Date: 2022-09-28 10:43:53
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-09-28 11:07:39
* @FilePath: /swx/src/components/bottom-button.vue
* @Description: 文件描述
-->
<template>
<view class="confirm-wrapper-page">
<view class="box">
<view @tap="onSubmit" class="button"><slot></slot></view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
const emit = defineEmits(['on-submit'])
const onSubmit = () => {
emit('on-submit', true)
}
</script>
<style lang="less">
.confirm-wrapper-page {
background-color: #FFFFFF;
box-shadow: 0rem -0.17rem 0.67rem 0rem rgba(0,0,0,0.05);
position: fixed;
bottom: 0;
width: 100%;
.box {
padding: 1rem 0;
margin: 1rem;
padding-bottom: 2rem;
margin-top: 0;
text-align: center;
.button {
color: #FFFFFF;
background-color: #199A74;
padding: 0.65rem 1rem;
border-radius: 1.5rem;
}
}
}
</style>