From 7f6fc656fe079f4baaf0e7c5bf0fe64965af8c5b Mon Sep 17 00:00:00 2001
From: whycq <you@example.com>
Date: 星期四, 22 九月 2022 21:01:41 +0800
Subject: [PATCH] #

---
 components/y-popup/y-popup.vue |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/components/y-popup/y-popup.vue b/components/y-popup/y-popup.vue
index 36e718d..da8c275 100644
--- a/components/y-popup/y-popup.vue
+++ b/components/y-popup/y-popup.vue
@@ -1,16 +1,15 @@
 <template>
 	<view v-if="showPopup" class="y-popup-mask">
 		<uni-transition key="1" mode-class="fade" :styles="maskClass" :show="show" @click="onTap"/>
-		<uni-transition key="2" :styles="transClass" :show="showTrans">
-			
-			<view style="height: 70rpx;background-color: aliceblue;">title</view>
+		<uni-transition key="2" :styles="transClass" :show="showTrans" mode-class="fade" :duration="duration">
+			<view style="height: 70rpx;background-color: aliceblue;">{{titleText}}</view>
 			<scroll-view scroll-y class="scroll-Y">
-				<view style="width: 500rpx;height: 300rpx;background-color: aqua;">
-					<slot />
-				</view>
+				<slot>
+					<input type="text">
+				</slot>
 			</scroll-view>
 			<view>
-				<button size="mini">鎸夐挳</button>
+				<button size="mini" @click="close">鎸夐挳</button>
 			</view>
 		</uni-transition>
 	</view>
@@ -19,12 +18,23 @@
 <script>
 	export default {
 		name: 'y-popup',
+		props: {
+			title: {
+				type: String,
+				default: ''
+			},
+		},
+		computed: {
+			titleText() {
+				return this.title || t("uni-popup.title")
+			}
+		},
 		data() {
 			return {
 				show:false,
 				showPopup:false,
 				showTrans: false,
-				duration: 300,
+				duration: 500,
 				ani: [],
 				maskClass: {
 					position: 'fixed',

--
Gitblit v1.9.1