Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
source-trace-manage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenqikuai
source-trace-manage
Commits
28791da8
Commit
28791da8
authored
Aug 04, 2022
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
59a8f53c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
23 deletions
+13
-23
index.vue
src/components/ImageDisplay/index.vue
+9
-21
index.vue
src/views/CopyRightDetail/index.vue
+1
-0
index.vue
src/views/copyrightManagement/index.vue
+3
-2
No files found.
src/components/ImageDisplay/index.vue
View file @
28791da8
...
...
@@ -2,7 +2,7 @@
<Transition>
<div
v-if=
"visible"
class=
"fixed h-screen w-screen top-0 left-0 flex items-center
justify-center
flex-col z-30"
class=
"fixed h-screen w-screen top-0 left-0 flex items-center flex-col z-30"
>
<div
class=
"opacity-70 bg-black absolute w-full h-full"
></div>
<div
...
...
@@ -11,25 +11,31 @@
>
<img
src=
"@/assets/img/close.png"
class=
"w-9"
alt=
""
srcset=
""
/>
</div>
<div
style=
"height: 100%"
class=
"flex flex-col justify-center items-center"
>
<ElImage
id=
"imageDisplay"
:src=
"url"
:style=
"
{
transform: `scale(${scale})`
,
height: '70%'
,
zIndex: 1,
position: 'relative',
overflow: 'hidden',
}"
/>
<div
class=
"relative z-10"
>
<slot></slot>
</div>
</div>
</div>
</Transition>
</
template
>
<
script
setup
lang=
"ts"
>
import
{
ElImage
}
from
"element-plus"
;
import
{
ref
,
watch
}
from
"vue"
;
import
{
ref
,
useSlots
,
watch
}
from
"vue"
;
import
{
useEventListener
}
from
"@vueuse/core"
;
const
props
=
defineProps
<
{
...
...
@@ -37,30 +43,12 @@ const props = defineProps<{
url
:
string
;
}
>
();
const
emit
=
defineEmits
([
"update:visible"
]);
const
scale
=
ref
(
1
);
watch
(
()
=>
[
props
.
visible
,
props
.
url
],
()
=>
{
scale
.
value
=
1
;
}
);
useEventListener
(
window
,
"keydown"
,
(
e
)
=>
{
if
(
e
.
key
===
"Escape"
)
{
emit
(
"update:visible"
,
false
);
}
});
useEventListener
(
document
,
"wheel"
,
(
e
)
=>
{
if
(
e
.
deltaY
>
0
)
{
if
(
scale
.
value
<
0.2
)
return
;
scale
.
value
/=
1.1
;
}
else
{
if
(
scale
.
value
>
7
)
return
;
scale
.
value
*=
1.1
;
}
});
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
src/views/CopyRightDetail/index.vue
View file @
28791da8
...
...
@@ -66,6 +66,7 @@
打印证书
</div>
</div>
<div
class=
"flex-grow"
></div>
</ImageDisplay>
</div>
</div>
...
...
src/views/copyrightManagement/index.vue
View file @
28791da8
...
...
@@ -94,8 +94,9 @@
<div
class=
"imgBtn"
@
click=
"printJS('imageDisplay', 'html')"
>
打印证书
</div>
</div></ImageDisplay
>
</div>
<div
class=
"flex-grow"
></div>
</ImageDisplay>
</LayoutVue>
</
template
>
<
script
lang=
"ts"
setup
>
...
...
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