Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ffd5f106
authored
Apr 09, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
组件
1 parent
1c55c877
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
21 deletions
components/MessageBox/index.vue
mixin/click.js
components/MessageBox/index.vue
View file @
ffd5f10
<
template
>
<
template
>
<uni-popup
ref=
"tips"
type=
"center"
:is-mask-click=
"false"
:animation=
"false"
>
<uni-popup
<view
class=
"tips-wrapper"
>
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-content"
>
<view
class=
"tips-title"
<view
class=
"tips-title"
>
{{
title
}}
>
{{
title
}}
<view
class=
"icon-close"
@
click=
"close"
>
×
</view>
<view
class=
"icon-close"
@
click=
"close"
>
×
</view>
</view>
</view>
<view
class=
"tips-text"
>
{{
content
}}
</view>
<view
class=
"tips-text"
v-if=
"content"
>
{{
content
}}
</view>
<slot></slot>
</view>
</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 close"
@
click=
"close()"
>
{{
cancelBtnText
}}
</view>
<view
class=
"tips-btn preview"
@
click=
"confirm()"
>
{{
<view
class=
"tips-btn preview"
@
click=
"confirm()"
>
{{
confirmBtnText
confirmBtnText
...
@@ -24,13 +33,29 @@ export default {
...
@@ -24,13 +33,29 @@ export default {
return
{};
return
{};
},
},
props
:
{
props
:
{
position
:
{
type
:
String
,
default
:
"center"
,
},
popupW
:
{
type
:
Number
,
default
:
704
,
},
popupH
:
{
type
:
Number
,
default
:
372
,
},
isFooter
:
{
type
:
Boolean
,
default
:
true
,
},
title
:
{
title
:
{
type
:
String
,
type
:
String
,
default
:
"提示"
,
default
:
"提示"
,
},
},
content
:
{
content
:
{
type
:
String
,
type
:
String
,
default
:
"
提示
"
,
default
:
""
,
},
},
confirmBtnText
:
{
confirmBtnText
:
{
type
:
String
,
type
:
String
,
...
@@ -42,7 +67,7 @@ export default {
...
@@ -42,7 +67,7 @@ export default {
},
},
},
},
mounted
()
{
mounted
()
{
this
.
$refs
.
tips
.
open
(
"center"
);
this
.
$refs
.
tips
.
open
();
},
},
methods
:
{
methods
:
{
close
()
{
close
()
{
...
@@ -58,8 +83,6 @@ export default {
...
@@ -58,8 +83,6 @@ export default {
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.tips-wrapper
{
.tips-wrapper
{
width
:
704
rpx
;
height
:
372
rpx
;
background
:
#ffffff
;
background
:
#ffffff
;
border-radius
:
20
rpx
;
border-radius
:
20
rpx
;
.tips-content
{
.tips-content
{
...
@@ -75,7 +98,7 @@ export default {
...
@@ -75,7 +98,7 @@ export default {
.icon-close
{
.icon-close
{
position
:
absolute
;
position
:
absolute
;
right
:
0
;
right
:
0
;
top
:
-
24
rpx
;
top
:
-
30
rpx
;
width
:
160
rpx
;
width
:
160
rpx
;
font-size
:
50
rpx
;
font-size
:
50
rpx
;
text-align
:
right
;
text-align
:
right
;
...
...
mixin/click.js
View file @
ffd5f10
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48
* @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-09 1
3:36:48
* @LastEditTime: 2024-04-09 1
6:26:16
* @FilePath: \gl_tape\mixin\click.js
* @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -15,9 +15,8 @@ export default {
...
@@ -15,9 +15,8 @@ export default {
voicePath
:
""
,
voicePath
:
""
,
timer
:
null
,
timer
:
null
,
times
:
0
,
times
:
0
,
timeout
:
10
*
60
,
timeout
:
600
,
//十分钟提示
reaction
:
10
,
reaction
:
10
,
message
:
"3"
,
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -93,23 +92,18 @@ export default {
...
@@ -93,23 +92,18 @@ export default {
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
this
.
times
++
;
this
.
times
++
;
if
(
this
.
times
>=
this
.
timeout
)
{
if
(
this
.
times
>=
this
.
timeout
)
{
// this.showToast(
);
console
.
log
(
"弹框"
);
}
}
if
(
this
.
times
>=
this
.
reaction
+
this
.
timeout
)
{
if
(
this
.
times
>=
this
.
reaction
+
this
.
timeout
)
{
this
.
handleEnd
();
//结束接待
this
.
stopAudio
();
}
}
},
1000
);
},
1000
);
},
},
handleTouchStart
()
{
handleTouchStart
()
{
console
.
log
(
"点击"
);
this
.
times
=
0
;
this
.
times
=
0
;
},
},
handleVisibilityChange
()
{
this
.
message
=
999
;
if
(
document
.
visibilityState
===
"hidden"
)
{
// 屏幕被关闭
this
.
message
=
999
;
}
},
},
},
beforeCreate
()
{
beforeCreate
()
{
clearInterval
(
this
.
timer
);
clearInterval
(
this
.
timer
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment