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

img自适应宽高比,pdf缩放

parent fb03287d
......@@ -6,11 +6,18 @@
:visible.sync="show"
width="100%"
>
<div ref='show' v-if="show" style="height: 85vh;width: 100%">
<pdf ref="show" v-if="showType=='pdf'" v-for="i in numPages" :key="i" :src="url" :page="i" ></pdf>
<!-- <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" width="100%" height="100%" border="0" >
</div>
<div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;">
<div style='transform:scale(0.36);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> -->
<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>
<div id='bzzywdfileAdd' style="display: none;" >
<input @change='beginUpload' id='aqglfilesonadd' ref="upload" type="file" style="display: none;">
......
......@@ -6,11 +6,18 @@
:visible.sync="show"
width="100%"
>
<div ref='show' v-if="show" style="height: 85vh;width: 100%">
<pdf ref="show" v-if="showType=='pdf'" v-for="i in numPages" :key="i" :src="url" :page="i" ></pdf>
<!-- <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" width="100%" height="100%" border="0" >
</div>
<div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;">
<div style='transform:scale(0.36);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> -->
<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>
<div id='aqwdfileAdd' style="display: none;" >
<input @change='beginUpload' id='aqglfilesonadd' ref="upload" type="file" style="display: none;">
......
......@@ -6,11 +6,18 @@
:visible.sync="show"
width="100%"
>
<div v-if="show" 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" width="100%" height="100%" border="0" >
</div>
<div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;">
<div style='transform:scale(0.36);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> -->
<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>
<div id='approvefileAdd' style="display: none;" >
<input @change='beginUpload' id='aqglfilesonadd' ref="upload" type="file" style="display: none;">
......
......@@ -6,11 +6,18 @@
:visible.sync="show"
width="100%"
>
<div ref="show" v-if="show" style="height: 85vh;width: 100%">
<pdf ref="show" v-if="showType=='pdf'" v-for="i in numPages" :key="i" :src="url" :page="i" ></pdf>
<!-- <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" width="100%" height="100%" border="0" >
</div>
<div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;">
<div style='transform:scale(0.36);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> -->
<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>
<div id='approvefileAdd' style="display: none;" >
<input @change='beginUpload' id='aqglfilesonadd' ref="upload" type="file" style="display: none;">
......
......@@ -6,10 +6,17 @@
:visible.sync="show"
width="100%"
>
<div ref='show' v-if="show" 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 ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;">
<div style='transform:scale(0.36);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> -->
<img v-if="['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1" :src="url" width="100%" height="100%" border="0" >
<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>
<div id='approvefileAdd' style="display: none;" >
......
......@@ -7,11 +7,18 @@
width="100%"
>
<div v-if="show" 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" width="100%" height="100%" border="0" >
</div>
<div ref='show' v-if="show" style="height: 85vh;width: 100%;position: relative;">
<div style='transform:scale(0.36);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> -->
<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>
<div id='approvefileAdd' style="display: none;" >
<input @change='beginUpload' id='aqglfilesonadd' ref="upload" type="file" style="display: none;">
......
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