From fc8847640c87d685b2d21e15a13bc22631b1ae83 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期二, 23 五月 2023 14:54:53 +0800
Subject: [PATCH] #
---
components/y-pop/y-pop.vue | 54 +++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 45 insertions(+), 9 deletions(-)
diff --git a/components/y-pop/y-pop.vue b/components/y-pop/y-pop.vue
index 403dacc..ec5e617 100644
--- a/components/y-pop/y-pop.vue
+++ b/components/y-pop/y-pop.vue
@@ -1,14 +1,14 @@
<template>
- <view class="canvas">
+ <view class="canvas flex-center" v-show="show">
<view class="main">
- <view class="titles">
+ <view class="titles flex-center">
{{title}}
</view>
- <view class="decs">
- <slot></slot>
+ <view class="decs flex-center">
+ <uni-number-box v-model="num" :max="max" :min="min"></uni-number-box>
</view>
- <view class="operation">
- {{title}}
+ <view class="operation flex-center">
+ <button size="mini" @click="confrim">纭</button>
</view>
</view>
</view>
@@ -21,11 +21,50 @@
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%;
@@ -33,9 +72,6 @@
position: fixed;
left: 0;
top: 0;
- display: flex;
- align-items: center;
- justify-content: center;
}
.main {
width: 80%;
--
Gitblit v1.9.1