Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
agcs2.0-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liang
agcs2.0-web
Commits
1e4ad6b2
Commit
1e4ad6b2
authored
May 12, 2023
by
miaojiale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改pdf
parent
9c1e1697
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
+18
-5
index.vue
src/views/Home/PdfDialog/index.vue
+11
-3
index.vue
src/views/Home/PdfView/index.vue
+7
-2
No files found.
src/views/Home/PdfDialog/index.vue
View file @
1e4ad6b2
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
<el-dialog
<el-dialog
custom-class=
"pdfDialog"
custom-class=
"pdfDialog"
:title=
"''"
:title=
"''"
:width=
"dWidth + 'px'"
:visible.sync=
"showPdf"
:visible.sync=
"showPdf"
:close-on-click-modal=
"true"
:close-on-click-modal=
"true"
:close-on-press-escape=
"false"
:close-on-press-escape=
"false"
...
@@ -14,7 +15,7 @@
...
@@ -14,7 +15,7 @@
<div
class=
"title"
>
{{
curPdf
.
articleTitle
}}
</div>
<div
class=
"title"
>
{{
curPdf
.
articleTitle
}}
</div>
<div
class=
"refuteList"
>
<div
class=
"refuteList"
>
<!--
<pdf
:src=
"pdfSrc"
></pdf>
-->
<!--
<pdf
:src=
"pdfSrc"
></pdf>
-->
<pdf-view
ref=
"pdfView"
:pdfUrl=
"pdfSrc"
></pdf-view>
<pdf-view
ref=
"pdfView"
:pdfUrl=
"pdfSrc"
@
scale=
"setScale"
></pdf-view>
</div>
</div>
</div>
</div>
</el-dialog>
</el-dialog>
...
@@ -33,8 +34,16 @@ export default {
...
@@ -33,8 +34,16 @@ export default {
data
()
{
data
()
{
return
{
return
{
showPdf
:
false
,
showPdf
:
false
,
width
:
750
,
dWidth
:
750
,
}
}
},
},
methods
:
{
setScale
(
val
)
{
console
.
log
(
val
)
this
.
dWidth
=
this
.
width
*
(
val
/
100
)
},
},
watch
:
{
watch
:
{
showPdf
(
v
)
{
showPdf
(
v
)
{
if
(
v
)
{
if
(
v
)
{
...
@@ -66,8 +75,7 @@ export default {
...
@@ -66,8 +75,7 @@ export default {
</
style
>
</
style
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.pdfDialog
{
.pdfDialog
{
width
:
750px
;
max-height
:
958px
;
max-height
:
858px
;
.el-dialog__header
{
.el-dialog__header
{
// display: none;
// display: none;
padding
:
0px
!
important
;
padding
:
0px
!
important
;
...
...
src/views/Home/PdfView/index.vue
View file @
1e4ad6b2
...
@@ -104,8 +104,12 @@ export default {
...
@@ -104,8 +104,12 @@ export default {
//放大
//放大
scaleD
()
{
scaleD
()
{
if
(
this
.
scale
==
120
)
{
return
}
this
.
scale
+=
5
this
.
scale
+=
5
this
.
$refs
.
pdf
.
$el
.
style
.
width
=
parseInt
(
this
.
scale
)
+
"
%
"
this
.
$refs
.
pdf
.
$el
.
style
.
width
=
parseInt
(
this
.
scale
)
+
"
%
"
this
.
$emit
(
"
scale
"
,
this
.
scale
)
},
},
//缩小
//缩小
...
@@ -115,8 +119,9 @@ export default {
...
@@ -115,8 +119,9 @@ export default {
return
return
}
}
this
.
scale
+=
-
5
this
.
scale
+=
-
5
console
.
log
(
parseInt
(
this
.
scale
)
+
"
%
"
)
//
console.log(parseInt(this.scale) + "%")
this
.
$refs
.
pdf
.
$el
.
style
.
width
=
parseInt
(
this
.
scale
)
+
"
%
"
this
.
$refs
.
pdf
.
$el
.
style
.
width
=
parseInt
(
this
.
scale
)
+
"
%
"
this
.
$emit
(
"
scale
"
,
this
.
scale
)
},
},
// 切换上一页
// 切换上一页
prePage
()
{
prePage
()
{
...
@@ -190,7 +195,7 @@ export default {
...
@@ -190,7 +195,7 @@ export default {
.show
{
.show
{
overflow
:
auto
;
overflow
:
auto
;
margin
:
auto
;
margin
:
auto
;
max-width
:
790px
;
//
max-width: 790px;
max-height
:
660px
;
max-height
:
660px
;
}
}
.pdf_footer
{
.pdf_footer
{
...
...
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