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
10024fae
Commit
10024fae
authored
Jul 28, 2023
by
haojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新hover动画
parent
6e056536
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
10 deletions
+22
-10
src/App.vue
+2
-9
src/components/cardTwo.vue
+11
-1
src/utils/init.ts
+9
-0
No files found.
src/App.vue
View file @
10024fae
...
@@ -6,6 +6,7 @@ import { computed, onBeforeUnmount, onMounted } from 'vue';
...
@@ -6,6 +6,7 @@ import { computed, onBeforeUnmount, onMounted } from 'vue';
import
{
useStore
}
from
'vuex'
;
import
{
useStore
}
from
'vuex'
;
import
config
from
'@/config/style'
;
import
config
from
'@/config/style'
;
import
{
useREM
}
from
'@/utils/rem'
;
import
{
useREM
}
from
'@/utils/rem'
;
import
{
devicePixelRatio
}
from
'@/utils/init'
;
// 注册rem事件
// 注册rem事件
useREM
();
useREM
();
...
@@ -16,14 +17,6 @@ const mode = computed(() => {
...
@@ -16,14 +17,6 @@ const mode = computed(() => {
return
store
.
getters
[
'setting/mode'
];
return
store
.
getters
[
'setting/mode'
];
});
});
const
createDevicePixelRatio
=
()
=>
{
const
scale_factor
=
window
.
devicePixelRatio
;
console
.
log
(
'屏幕缩放比例:'
+
scale_factor
);
let
zoom_value
=
1
/
scale_factor
;
const
container
=
document
.
documentElement
;
container
.
style
.
zoom
=
zoom_value
;
};
const
contextMenuListener
=
(
event
:
any
)
=>
{
const
contextMenuListener
=
(
event
:
any
)
=>
{
event
.
preventDefault
();
event
.
preventDefault
();
};
};
...
@@ -35,7 +28,7 @@ const destroyContextMenuListener = () => {
...
@@ -35,7 +28,7 @@ const destroyContextMenuListener = () => {
onMounted
(()
=>
{
onMounted
(()
=>
{
store
.
dispatch
(
'setting/changeTheme'
,
{
...
config
});
store
.
dispatch
(
'setting/changeTheme'
,
{
...
config
});
createD
evicePixelRatio
();
d
evicePixelRatio
();
// 阻止右键事件
// 阻止右键事件
document
.
addEventListener
(
'contextmenu'
,
contextMenuListener
);
document
.
addEventListener
(
'contextmenu'
,
contextMenuListener
);
...
...
src/components/cardTwo.vue
View file @
10024fae
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
>
>
<div
class=
"custom-card-two-image"
>
<div
class=
"custom-card-two-image"
>
<img
:src=
"img"
alt=
""
/>
<img
:src=
"img"
alt=
""
/>
<div
v-show=
"showHover"
class=
"hover
"
>
<div
v-show=
"showHover"
:class=
"['hover']
"
>
<slot
name=
"hover"
></slot>
<slot
name=
"hover"
></slot>
</div>
</div>
<slot
name=
"live"
></slot>
<slot
name=
"live"
></slot>
...
@@ -75,6 +75,16 @@ const nameChange = (value: string) => {
...
@@ -75,6 +75,16 @@ const nameChange = (value: string) => {
}
}
}
}
@keyframes
hide
{
0
%
{
opacity
:
1
;
transform
:
translateX
(
0
);
}
100
%
{
opacity
:
0
;
transform
:
translateX
(
-10%
);
}
}
.custom-card-two-box
{
.custom-card-two-box
{
width
:
200px
;
width
:
200px
;
height
:
310px
;
height
:
310px
;
...
...
src/utils/init.ts
0 → 100644
View file @
10024fae
export
const
devicePixelRatio
=
()
=>
{
const
scale_factor
=
window
.
devicePixelRatio
;
console
.
log
(
'屏幕缩放比例:'
+
scale_factor
);
let
zoom_value
=
1
/
scale_factor
;
const
container
=
document
.
documentElement
;
container
.
style
.
zoom
=
zoom_value
;
// container.style.transform = `scale(${zoom_value})`;
// container.style.transformOrigin = '0% 0%';
};
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