Commit 27221567 authored by 李苏's avatar 李苏 💬

添加缩放按钮

parent ceb6441a
...@@ -7,7 +7,10 @@ ...@@ -7,7 +7,10 @@
width="100%" width="100%"
> >
<div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;"> <div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;">
<div style='transform:scale(0.36);height: 85vh;width: 100%;'> <div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 60px;" @click="showSize=b" ></div>
<div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 90px;" @click="showSize=m" ></div>
<div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 120px;" @click="showSize=s" ></div>
<div :style="showSize" style='height: 85vh;width: 100%;'>
<pdf ref="show" v-if="showType=='pdf'" v-for="i in numPages" :key="i" :src="url" :page="i" ></pdf> <pdf ref="show" v-if="showType=='pdf'" v-for="i in numPages" :key="i" :src="url" :page="i" ></pdf>
</div> </div>
...@@ -122,6 +125,10 @@ ...@@ -122,6 +125,10 @@
}, },
data() { data() {
return{ return{
showSize:'transform:scale(0.36)',
s:'transform:scale(0.36)',
m:'transform:scale(0.6)',
b:'transform:scale(0.9)',
numPages:1, numPages:1,
show:false, show:false,
isupLoad:false, isupLoad:false,
......
...@@ -6,18 +6,21 @@ ...@@ -6,18 +6,21 @@
:visible.sync="show" :visible.sync="show"
width="100%" width="100%"
> >
<div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;"> <div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;">
<div style='transform:scale(0.36);height: 85vh;width: 100%;'> <div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 60px;" @click="showSize=b" ></div>
<pdf ref="show" v-if="showType=='pdf'" v-for="i in numPages" :key="i" :src="url" :page="i" ></pdf> <div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 90px;" @click="showSize=m" ></div>
</div> <div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 120px;" @click="showSize=s" ></div>
<div :style="showSize" style='height: 85vh;width: 100%;'>
<!-- <iframe v-if="showType=='pdf'" :src="url" width="100%" height="100%" border="0"></iframe> --> <pdf ref="show" v-if="showType=='pdf'" v-for="i in numPages" :key="i" :src="url" :page="i" ></pdf>
<img v-if="['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1" :src="url" style="max-height: 100%;position: absolute; </div>
left: 50%;
top: 50%;; <!-- <iframe v-if="showType=='pdf'" :src="url" width="100%" height="100%" border="0"></iframe> -->
transform: translate(-50%,-50%); <img v-if="['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1" :src="url" style="max-height: 100%;position: absolute;
" border="0" > left: 50%;
</div> top: 50%;;
transform: translate(-50%,-50%);
" border="0" >
</div>
</el-dialog> </el-dialog>
<div id='aqwdfileAdd' style="display: none;" > <div id='aqwdfileAdd' style="display: none;" >
<input @change='beginUpload' id='aqglfilesonadd' ref="upload" type="file" style="display: none;"> <input @change='beginUpload' id='aqglfilesonadd' ref="upload" type="file" style="display: none;">
...@@ -123,6 +126,10 @@ ...@@ -123,6 +126,10 @@
}, },
data() { data() {
return{ return{
showSize:'transform:scale(0.36)',
s:'transform:scale(0.36)',
m:'transform:scale(0.6)',
b:'transform:scale(0.9)',
numPages:1, numPages:1,
show:false, show:false,
isupLoad:false, isupLoad:false,
......
...@@ -6,11 +6,15 @@ ...@@ -6,11 +6,15 @@
:visible.sync="show" :visible.sync="show"
width="100%" width="100%"
> >
<div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;"> <div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;">
<div style='transform:scale(0.36);height: 85vh;width: 100%;'> <div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 60px;" @click="showSize=b" ></div>
<div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 90px;" @click="showSize=m" ></div>
<div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 120px;" @click="showSize=s" ></div>
<div :style="showSize" style='height: 85vh;width: 100%;'>
<pdf ref="show" v-if="showType=='pdf'" v-for="i in numPages" :key="i" :src="url" :page="i" ></pdf> <pdf ref="show" v-if="showType=='pdf'" v-for="i in numPages" :key="i" :src="url" :page="i" ></pdf>
</div> </div>
<!-- <iframe v-if="showType=='pdf'" :src="url" width="100%" height="100%" border="0"></iframe> --> <!-- <iframe v-if="showType=='pdf'" :src="url" width="100%" height="100%" border="0"></iframe> -->
<img v-if="['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1" :src="url" style="max-height: 100%;position: absolute; <img v-if="['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1" :src="url" style="max-height: 100%;position: absolute;
left: 50%; left: 50%;
...@@ -120,6 +124,10 @@ ...@@ -120,6 +124,10 @@
}, },
data() { data() {
return{ return{
showSize:'transform:scale(0.36)',
s:'transform:scale(0.36)',
m:'transform:scale(0.6)',
b:'transform:scale(0.9)',
numPages:1, numPages:1,
show:false, show:false,
isupLoad:false, isupLoad:false,
......
...@@ -7,7 +7,10 @@ ...@@ -7,7 +7,10 @@
width="100%" width="100%"
> >
<div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;"> <div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;">
<div style='transform:scale(0.36);height: 85vh;width: 100%;'> <div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 60px;" @click="showSize=b" ></div>
<div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 90px;" @click="showSize=m" ></div>
<div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 120px;" @click="showSize=s" ></div>
<div :style="showSize" style='height: 85vh;width: 100%;'>
<pdf ref="show" v-if="showType=='pdf'" v-for="i in numPages" :key="i" :src="url" :page="i" ></pdf> <pdf ref="show" v-if="showType=='pdf'" v-for="i in numPages" :key="i" :src="url" :page="i" ></pdf>
</div> </div>
...@@ -122,6 +125,10 @@ ...@@ -122,6 +125,10 @@
}, },
data() { data() {
return{ return{
showSize:'transform:scale(0.36)',
s:'transform:scale(0.36)',
m:'transform:scale(0.6)',
b:'transform:scale(0.9)',
numPages:1, numPages:1,
show:false, show:false,
isupLoad:false, isupLoad:false,
......
...@@ -7,17 +7,20 @@ ...@@ -7,17 +7,20 @@
width="100%" width="100%"
> >
<div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;"> <div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;">
<div style='transform:scale(0.36);height: 85vh;width: 100%;'> <div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 60px;" @click="showSize=b" ></div>
<pdf ref="show" v-if="showType=='pdf'" v-for="i in numPages" :key="i" :src="url" :page="i" ></pdf> <div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 90px;" @click="showSize=m" ></div>
</div> <div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 120px;" @click="showSize=s" ></div>
<div :style="showSize" style='height: 85vh;width: 100%;'>
<pdf ref="show" v-if="showType=='pdf'" v-for="i in numPages" :key="i" :src="url" :page="i" ></pdf>
</div>
<!-- <iframe v-if="showType=='pdf'" :src="url" width="100%" height="100%" border="0"></iframe> --> <!-- <iframe v-if="showType=='pdf'" :src="url" width="100%" height="100%" border="0"></iframe> -->
<img v-if="['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1" :src="url" style="max-height: 100%;position: absolute; <img v-if="['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1" :src="url" style="max-height: 100%;position: absolute;
left: 50%; left: 50%;
top: 50%;; top: 50%;;
transform: translate(-50%,-50%); transform: translate(-50%,-50%);
" border="0" > " border="0" >
</div> </div>
</el-dialog> </el-dialog>
<div id='approvefileAdd' style="display: none;" > <div id='approvefileAdd' style="display: none;" >
<input @change='beginUpload' id='aqglfilesonadd' ref="upload" type="file" style="display: none;"> <input @change='beginUpload' id='aqglfilesonadd' ref="upload" type="file" style="display: none;">
...@@ -121,6 +124,10 @@ ...@@ -121,6 +124,10 @@
}, },
data() { data() {
return{ return{
showSize:'transform:scale(0.36)',
s:'transform:scale(0.36)',
m:'transform:scale(0.6)',
b:'transform:scale(0.9)',
numPages:1, numPages:1,
show:false, show:false,
isupLoad:false, isupLoad:false,
......
...@@ -7,18 +7,21 @@ ...@@ -7,18 +7,21 @@
width="100%" width="100%"
> >
<div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;"> <div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;">
<div style='transform:scale(0.36);height: 85vh;width: 100%;'> <div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 60px;" @click="showSize=b" ></div>
<pdf ref="show" v-if="showType=='pdf'" v-for="i in numPages" :key="i" :src="url" :page="i" ></pdf> <div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 90px;" @click="showSize=m" ></div>
</div> <div v-if="showType=='pdf'" style="color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 120px;" @click="showSize=s" ></div>
<div :style="showSize" style='height: 85vh;width: 100%;'>
<!-- <iframe v-if="showType=='pdf'" :src="url" width="100%" height="100%" border="0"></iframe> --> <pdf ref="show" v-if="showType=='pdf'" v-for="i in numPages" :key="i" :src="url" :page="i" ></pdf>
<img v-if="['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1" :src="url" style="max-height: 100%;position: absolute;
left: 50%;
top: 50%;;
transform: translate(-50%,-50%);
" border="0" >
</div> </div>
<!-- <iframe v-if="showType=='pdf'" :src="url" width="100%" height="100%" border="0"></iframe> -->
<img v-if="['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1" :src="url" style="max-height: 100%;position: absolute;
left: 50%;
top: 50%;;
transform: translate(-50%,-50%);
" border="0" >
</div>
</el-dialog> </el-dialog>
<div id='approvefileAdd' style="display: none;" > <div id='approvefileAdd' style="display: none;" >
<input @change='beginUpload' id='aqglfilesonadd' ref="upload" type="file" style="display: none;"> <input @change='beginUpload' id='aqglfilesonadd' ref="upload" type="file" style="display: none;">
...@@ -123,6 +126,10 @@ ...@@ -123,6 +126,10 @@
}, },
data() { data() {
return{ return{
showSize:'transform:scale(0.36)',
s:'transform:scale(0.36)',
m:'transform:scale(0.6)',
b:'transform:scale(0.9)',
numPages:1, numPages:1,
show:false, show:false,
isupLoad:false, isupLoad:false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment