#
zjj
2024-08-21 54fce333aae7d6f596616a6eb5e65c27c28a9994
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
<template>
    <view class="canvas flex-center" v-show="show">
        <view class="main">
            <view class="titles flex-center">
                {{title}}
            </view>
            <view class="decs flex-center">
                <uni-number-box v-model="num" :max="max" :min="min"></uni-number-box>
            </view>
            <view class="operation flex-center">
                <button size="mini" @click="confrim">确认</button>
            </view>
        </view>
    </view>
</template>
 
<script>
    export default {
        props: {
            title: {
                type: [String,Number],
                default: 'title'
            },
            // num: {
            //     type: Number,
            //     default: 0
            // },
            max: {
                type: Number,
                default: 100
            },
            min: {
                type: Number,
                default: 0
            },
            show: {
                type: Boolean,
                default: false
            }
        },
        watch: {
            // num(num) {
            //     this.num = num
            // },
            show(show) {
                this.show = show
            }
        },
        data() {
            return {
                num: 0,
            };
        },
        methods: {
            confrim() {
                this.show = false
            },
        }
    }
</script>
 
<style>
    .flex-center {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .canvas {
        height: 100vh;
        width: 100%;
        background-color: rgba(0, 0, 0, .3);
        position: fixed;
        left: 0;
        top: 0;
    }
    .main {
        width: 80%;
        height: 400rpx;
        background-color: #fff;
        border-radius: 20rpx;
    }
    .titles {
        width: 100%;
        height: 100rpx;
        /* background-color: black; */
        text-align: center;
        line-height: 120rpx;
        font-size: 34rpx;
        font-weight: bold;
        letter-spacing: 8rpx;
        color: #555555;
    }
    .decs {
        width: 100%;
        height: 200rpx;
        /* background-color: aqua; */
    }
    .operation {
        width: 100%;
        height: 100rpx;
        /* background-color: aquamarine; */
    }
</style>