From 47f2f0e92301f5c0894f0a7884bc1c6e56a2c73e Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期四, 23 十一月 2023 08:21:20 +0800
Subject: [PATCH] #
---
components/y-popup/y-popup.vue | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/components/y-popup/y-popup.vue b/components/y-popup/y-popup.vue
index 36e718d..0b03137 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">
+ <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