|
|
@ -15,17 +15,14 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<u-popup :show="show" @close="handleClose" mode="center"> |
|
|
|
<view class="popup-close" @click='handleClose'> |
|
|
|
<uni-icons |
|
|
|
class="popup-icons" |
|
|
|
type="closeempty" |
|
|
|
size="30" |
|
|
|
></uni-icons></view> |
|
|
|
<view class="popup-close" @click='handleClose'> |
|
|
|
<uni-icons class="popup-icons" type="closeempty" size="30"></uni-icons> |
|
|
|
</view> |
|
|
|
<view class="popup-box"> |
|
|
|
<view class="view-pdf" > |
|
|
|
<pdf v-if='show' ref="pdf" :page="pageNum" @progress="loadedRatio = $event" @page-loaded="pageLoaded($event)" |
|
|
|
@num-pages="pageTotalNum=$event" @error="pdfError($event)" @link-clicked="page = $event" |
|
|
|
:src="filePdfUrl"> |
|
|
|
<view class="view-pdf"> |
|
|
|
<pdf v-if='show' ref="pdf" :page="pageNum" @progress="loadedRatio = $event" |
|
|
|
@page-loaded="pageLoaded($event)" @num-pages="pageTotalNum=$event" @error="pdfError($event)" |
|
|
|
@link-clicked="page = $event" :src="filePdfUrl"> |
|
|
|
</pdf> |
|
|
|
<div class="tools"> |
|
|
|
<button :theme="'default'" type="submit" @click.stop="prePage" class="mr10"> |
|
|
@ -38,7 +35,7 @@ |
|
|
|
</div> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
</u-popup> |
|
|
|
</view> |
|
|
|
</template> |
|
|
@ -53,7 +50,7 @@ |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
show:false, |
|
|
|
show: false, |
|
|
|
filePdfUrl: "", |
|
|
|
pageNum: 1, |
|
|
|
pageTotalNum: 1, |
|
|
@ -67,9 +64,9 @@ |
|
|
|
console.log('infos', infos) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
|
|
// 关闭弹窗 |
|
|
|
handleClose(){ |
|
|
|
handleClose() { |
|
|
|
this.pdfId = '' |
|
|
|
this.show = false |
|
|
|
}, |
|
|
@ -105,20 +102,34 @@ |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
.popup-close{ |
|
|
|
.popup-close { |
|
|
|
position: fixed; |
|
|
|
right: 20px; |
|
|
|
top:20px; |
|
|
|
top: 20px; |
|
|
|
z-index: 9999; |
|
|
|
/deep/.uni-icons{ |
|
|
|
|
|
|
|
/deep/.uni-icons { |
|
|
|
font-size: 40px !important; |
|
|
|
color:#fff !important; |
|
|
|
color: #fff !important; |
|
|
|
} |
|
|
|
} |
|
|
|
.popup-box{ |
|
|
|
|
|
|
|
/deep/.u-popup__content{ |
|
|
|
position: relative; |
|
|
|
.tools { |
|
|
|
position: absolute; |
|
|
|
left:10px; |
|
|
|
right:10px; |
|
|
|
bottom:0px; |
|
|
|
background:#fff; |
|
|
|
padding-bottom:10px; |
|
|
|
} |
|
|
|
} |
|
|
|
.popup-box { |
|
|
|
max-height: 80vh; |
|
|
|
overflow: auto; |
|
|
|
} |
|
|
|
|
|
|
|
.view-gb { |
|
|
|
max-width: 100px; |
|
|
|
margin-left: 16px; |
|
|
@ -130,10 +141,10 @@ |
|
|
|
|
|
|
|
.view-pdf { |
|
|
|
width: 50vw; |
|
|
|
padding: 16px; |
|
|
|
padding: 16px 16px 50px 16px; |
|
|
|
border: 1px solid #ededed; |
|
|
|
background: #fff; |
|
|
|
|
|
|
|
|
|
|
|
.tools { |
|
|
|
display: flex; |
|
|
|
|
|
|
|