Commit ffd5f106 by 前端

组件

1 parent 1c55c877
<template>
<uni-popup ref="tips" type="center" :is-mask-click="false" :animation="false">
<view class="tips-wrapper">
<uni-popup
ref="tips"
:type="position"
:is-mask-click="false"
:animation="false"
>
<view
class="tips-wrapper"
:style="{ width: popupW + 'rpx', height: popupH + 'rpx' }"
>
<view class="tips-content">
<view class="tips-title"
>{{ title }}
<view class="icon-close" @click="close">×</view>
</view>
<view class="tips-text">{{ content }}</view>
<view class="tips-text" v-if="content">{{ content }}</view>
<slot></slot>
</view>
<view class="tips-footer">
<view class="tips-footer" v-if="isFooter">
<view class="tips-btn close" @click="close()">{{ cancelBtnText }}</view>
<view class="tips-btn preview" @click="confirm()">{{
confirmBtnText
......@@ -24,13 +33,29 @@ export default {
return {};
},
props: {
position: {
type: String,
default: "center",
},
popupW: {
type: Number,
default: 704,
},
popupH: {
type: Number,
default: 372,
},
isFooter: {
type: Boolean,
default: true,
},
title: {
type: String,
default: "提示",
},
content: {
type: String,
default: "提示",
default: "",
},
confirmBtnText: {
type: String,
......@@ -42,7 +67,7 @@ export default {
},
},
mounted() {
this.$refs.tips.open("center");
this.$refs.tips.open();
},
methods: {
close() {
......@@ -58,8 +83,6 @@ export default {
</script>
<style scoped lang="scss">
.tips-wrapper {
width: 704rpx;
height: 372rpx;
background: #ffffff;
border-radius: 20rpx;
.tips-content {
......@@ -75,7 +98,7 @@ export default {
.icon-close {
position: absolute;
right: 0;
top: -24rpx;
top: -30rpx;
width: 160rpx;
font-size: 50rpx;
text-align: right;
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-09 13:36:48
* @LastEditTime: 2024-04-09 16:26:16
* @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -15,9 +15,8 @@ export default {
voicePath: "",
timer: null,
times: 0,
timeout: 10 * 60,
timeout: 600, //十分钟提示
reaction: 10,
message: "3",
};
},
mounted() {
......@@ -93,23 +92,18 @@ export default {
this.timer = setInterval(() => {
this.times++;
if (this.times >= this.timeout) {
// this.showToast();
console.log("弹框");
}
if (this.times >= this.reaction + this.timeout) {
this.handleEnd();
//结束接待
this.stopAudio();
}
}, 1000);
},
handleTouchStart() {
console.log("点击");
this.times = 0;
},
handleVisibilityChange() {
this.message = 999;
if (document.visibilityState === "hidden") {
// 屏幕被关闭
this.message = 999;
}
},
},
beforeCreate() {
clearInterval(this.timer);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!