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
025756e6
Commit
025756e6
authored
Jul 28, 2023
by
haojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
路由切换改为先出后进
parent
beeedb0d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
26 deletions
+41
-26
src/components/cardTwo.vue
+3
-1
src/layouts/components/Content.vue
+2
-2
src/layouts/components/ToolBar.vue
+22
-22
src/router/index.ts
+0
-1
src/utils/command.ts
+14
-0
No files found.
src/components/cardTwo.vue
View file @
025756e6
...
@@ -9,7 +9,8 @@
...
@@ -9,7 +9,8 @@
}"
}"
>
>
<div
class=
"custom-card-two-image"
>
<div
class=
"custom-card-two-image"
>
<img
:src=
"img"
alt=
""
/>
<img
alt=
""
:src=
"img"
/>
<!--
<img
alt=
""
v-lazy=
"img"
/>
-->
<div
v-show=
"showHover"
:class=
"['hover']"
>
<div
v-show=
"showHover"
:class=
"['hover']"
>
<slot
name=
"hover"
></slot>
<slot
name=
"hover"
></slot>
</div>
</div>
...
@@ -27,6 +28,7 @@
...
@@ -27,6 +28,7 @@
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ref
}
from
'vue'
;
import
{
ref
}
from
'vue'
;
import
ChangeName
from
'@/components/changeName.vue'
;
import
ChangeName
from
'@/components/changeName.vue'
;
import
{
vLazy
}
from
'@/utils/command'
;
const
props
=
withDefaults
(
const
props
=
withDefaults
(
defineProps
<
{
defineProps
<
{
id
:
string
|
number
;
id
:
string
|
number
;
...
...
src/layouts/components/Content.vue
View file @
025756e6
<
template
>
<
template
>
<router-view
v-slot=
"
{ Component }">
<router-view
v-slot=
"
{ Component }">
<transition
name=
"fade"
>
<transition
name=
"fade"
mode=
"out-in"
>
<component
:is=
"Component"
/>
<component
:is=
"Component"
/>
</transition>
</transition>
</router-view>
</router-view>
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
.fade-leave-active
,
.fade-leave-active
,
.fade-enter-active
{
.fade-enter-active
{
transition
:
opacity
@
anim-duration-slow
@
anim-time-fn-easing
;
transition
:
opacity
0.3s
;
}
}
.fade-enter
,
.fade-enter
,
.fade-leave-to
{
.fade-leave-to
{
...
...
src/layouts/components/ToolBar.vue
View file @
025756e6
...
@@ -36,28 +36,28 @@ const imgs = {
...
@@ -36,28 +36,28 @@ const imgs = {
close
:
new
URL
(
'../../assets/svg/home/close.svg'
,
import
.
meta
.
url
).
href
,
close
:
new
URL
(
'../../assets/svg/home/close.svg'
,
import
.
meta
.
url
).
href
,
};
};
const
navigatorList
=
[
//
const navigatorList = [
{
//
{
icon
:
imgs
.
live
,
//
icon: imgs.live,
label
:
'直播创建'
,
//
label: '直播创建',
path
:
routerConfig
.
createLive
.
path
,
//
path: routerConfig.createLive.path,
},
//
},
{
//
{
icon
:
imgs
.
person
,
//
icon: imgs.person,
label
:
'形象定制'
,
//
label: '形象定制',
path
:
routerConfig
.
ImageCustomization
.
path
,
//
path: routerConfig.ImageCustomization.path,
},
//
},
{
//
{
icon
:
imgs
.
speak
,
//
icon: imgs.speak,
label
:
'声音定制'
,
//
label: '声音定制',
path
:
routerConfig
.
VocalCustomization
.
path
,
//
path: routerConfig.VocalCustomization.path,
},
//
},
{
//
{
icon
:
imgs
.
interaction
,
//
icon: imgs.interaction,
label
:
'互动回答'
,
//
label: '互动回答',
path
:
routerConfig
.
createInteract
.
path
,
//
path: routerConfig.createInteract.path,
},
//
},
];
//
];
const
goHome
=
()
=>
{
const
goHome
=
()
=>
{
router
.
push
({
router
.
push
({
...
...
src/router/index.ts
View file @
025756e6
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
();
...
...
src/utils/command.ts
0 → 100644
View file @
025756e6
export
const
vLazy
=
(
el
:
HTMLImageElement
,
image
:
any
)
=>
{
el
.
src
=
'https://cdn.staticaly.com/gh/1024huijia/QingChunMeizi@master/loading.5e3wpezjapc0.gif'
;
// 使用obaesrve监听图片是否在可视区域内
const
observe
=
new
IntersectionObserver
((
entries
)
=>
{
entries
.
forEach
((
entry
)
=>
{
if
(
entry
.
isIntersecting
)
{
el
.
src
=
image
.
value
;
// 注销
observe
.
unobserve
(
el
);
}
});
});
observe
.
observe
(
el
);
};
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