Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
live-management-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haojie
live-management-web
Commits
beeedb0d
Commit
beeedb0d
authored
Jul 28, 2023
by
haojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复页面跳转时,弹窗没有关闭且不可关闭的问题
parent
6b2fb3b7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletions
+12
-1
src/components/AddVideoPlay.vue
+8
-1
src/components/ConfirmDialog.vue
+3
-0
src/router/index.ts
+1
-0
No files found.
src/components/AddVideoPlay.vue
View file @
beeedb0d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<div
v-show=
"!showFirstVideo"
>
<div
v-show=
"!showFirstVideo"
>
<video
ref=
"videoSecond"
class=
"video-default2"
:src=
"video2"
@
ended=
"onVideoEnded"
@
canplay=
"canplay2"
></video>
<video
ref=
"videoSecond"
class=
"video-default2"
:src=
"video2"
@
ended=
"onVideoEnded"
@
canplay=
"canplay2"
></video>
</div>
</div>
<ConfirmDialog
v-model=
"confirmVisible"
:footer=
"footerStatus"
@
confirm=
"confirm"
>
<ConfirmDialog
v-model=
"confirmVisible"
:
closeOnOverlayClick=
"false"
:
footer=
"footerStatus"
@
confirm=
"confirm"
>
<template
#
body
>
<template
#
body
>
<template
v-if=
"loading"
>
<template
v-if=
"loading"
>
<Loading></Loading>
<Loading></Loading>
...
@@ -26,6 +26,7 @@ import ConfirmDialog from '@/components/ConfirmDialog.vue';
...
@@ -26,6 +26,7 @@ import ConfirmDialog from '@/components/ConfirmDialog.vue';
import
{
computed
,
onBeforeUnmount
,
ref
,
watch
}
from
'vue'
;
import
{
computed
,
onBeforeUnmount
,
ref
,
watch
}
from
'vue'
;
import
{
useStore
}
from
'vuex'
;
import
{
useStore
}
from
'vuex'
;
import
Loading
from
'@/components/Loading/FirstCircle.vue'
;
import
Loading
from
'@/components/Loading/FirstCircle.vue'
;
import
{
onBeforeRouteLeave
}
from
'vue-router'
;
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
video1
:
string
;
video1
:
string
;
...
@@ -47,6 +48,7 @@ const showFirstVideo = ref(true);
...
@@ -47,6 +48,7 @@ const showFirstVideo = ref(true);
const
videoSecondPlay
=
ref
(
false
);
const
videoSecondPlay
=
ref
(
false
);
const
confirmVisible
=
ref
(
true
);
const
confirmVisible
=
ref
(
true
);
// 第二个视频是否首次播放
// 第二个视频是否首次播放
const
videoSecondFirstPlay
=
ref
(
true
);
const
videoSecondFirstPlay
=
ref
(
true
);
...
@@ -57,6 +59,11 @@ let interval = null;
...
@@ -57,6 +59,11 @@ let interval = null;
const
total
=
ref
(
0
);
const
total
=
ref
(
0
);
// 离开前先关闭弹窗
onBeforeRouteLeave
((
to
,
from
,
next
)
=>
{
confirmVisible
.
value
=
false
;
next
();
});
// 打开计时
// 打开计时
const
openInterval
=
()
=>
{
const
openInterval
=
()
=>
{
interval
=
setInterval
(()
=>
{
interval
=
setInterval
(()
=>
{
...
...
src/components/ConfirmDialog.vue
View file @
beeedb0d
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
:destroyOnClose=
"destroyOnClose"
:destroyOnClose=
"destroyOnClose"
class=
"c-dialog-confirm-default"
class=
"c-dialog-confirm-default"
:placement=
"placement"
:placement=
"placement"
:closeOnOverlayClick=
"closeOnOverlayClick"
>
>
<template
#
body
>
<template
#
body
>
<div
class=
"custom-confirm-dialog-body"
>
<div
class=
"custom-confirm-dialog-body"
>
...
@@ -38,6 +39,7 @@ const props = withDefaults(
...
@@ -38,6 +39,7 @@ const props = withDefaults(
destroyOnClose
?:
boolean
;
destroyOnClose
?:
boolean
;
className
?:
string
;
className
?:
string
;
title
?:
string
;
title
?:
string
;
closeOnOverlayClick
?:
boolean
;
}
>
(),
}
>
(),
{
{
footer
:
null
,
footer
:
null
,
...
@@ -45,6 +47,7 @@ const props = withDefaults(
...
@@ -45,6 +47,7 @@ const props = withDefaults(
destroyOnClose
:
false
,
destroyOnClose
:
false
,
className
:
''
,
className
:
''
,
title
:
''
,
title
:
''
,
closeOnOverlayClick
:
true
,
},
},
);
);
const
emit
=
defineEmits
([
'update:modelValue'
,
'confirm'
]);
const
emit
=
defineEmits
([
'update:modelValue'
,
'confirm'
]);
...
...
src/router/index.ts
View file @
beeedb0d
import
{
createRouter
,
createWebHashHistory
,
RouteRecordRaw
}
from
'vue-router'
;
import
{
createRouter
,
createWebHashHistory
,
RouteRecordRaw
}
from
'vue-router'
;
import
{
getSiteRouter
}
from
'../config/site'
;
import
{
getSiteRouter
}
from
'../config/site'
;
import
store
from
'@/store'
;
const
routerList
=
getSiteRouter
();
const
routerList
=
getSiteRouter
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment