当前位置:网站首页>uniapp 预览功能
uniapp 预览功能
2022-06-13 01:56:00 【小四是个处女座】
项目文件结构
hybrid 文件是核心自行百度下载
previewPdf.vue
<template>
<view style="width: 100%;" >
<view style="height: 100rpx;">
<uni-nav-bar left-icon="left" title="文件预览" @clickLeft="back" />
</view>
<view >
<web-view style="paddin-top: 120rpx;" :src="allUrl"></web-view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
src: '',
allUrl:'',
viewerUrl: '/hybrid/html/web/viewer.html', // 格式化文件流的一个js 文件 文末会分享出来
}
},
onLoad(options) {
let fileUrl = encodeURIComponent(options.links) // encodeURIComponent 函数可把字符串作为 URI 组件进行编码。
this.allUrl = this.viewerUrl + '?file=' + fileUrl
console.log("pdf",options)
}
}
</script>
<style>
</style>
预览效果
边栏推荐
- (no plug-in) summary of vim basic shortcut keys
- Explanation and application of prefix sum (one-dimensional, two-dimensional)
- Pyflink implements custom sourcefunction
- 谷歌的智能出价有几种?
- 深度学习调参技巧详解
- Compiling minicom-2.7.1 under msys2
- Jeux de plombiers
- JSON and protobuf Any interchange
- 白噪声的详细理解
- [arithmetic, relation, logic, bit, compound assignment, self increasing, self decreasing and other] operators (learning note 4 -- C language operators)
猜你喜欢
![[the third day of actual combat of smart lock project based on stm32f401ret6 in 10 days] communication foundation and understanding serial port](/img/82/ed215078da0325b3adf95dcd6ffe30.jpg)
[the third day of actual combat of smart lock project based on stm32f401ret6 in 10 days] communication foundation and understanding serial port

万字讲清 synchronized 和 ReentrantLock 实现并发中的锁

什么是立体角

Interruption of 51 single chip microcomputer learning notes (external interruption, timer interruption, interrupt nesting)
![[andoid][step pit]cts 11_ Testbootclasspathandsystemserverclasspath at the beginning of R3_ Analysis of nonduplicateclasses fail](/img/b5/7ea603775dc0448368d209de037a43.png)
[andoid][step pit]cts 11_ Testbootclasspathandsystemserverclasspath at the beginning of R3_ Analysis of nonduplicateclasses fail
![[the 4th day of the 10 day smart lock project based on stm32f401ret6] what is interrupt, interrupt service function, system tick timer](/img/c4/0d97def5fb587b8301bcb907fc6fcf.jpg)
[the 4th day of the 10 day smart lock project based on stm32f401ret6] what is interrupt, interrupt service function, system tick timer

白噪声的详细理解

四、入库管理功能的完善

Devaxpress Chinese description -- tdxgallerycontrol object (gallery component)

The new wild prospect of JD instant retailing from the perspective of "hour shopping"
随机推荐
Vs how to enter chromium subprocess debugging
In the third quarter, the revenue and net profit increased "against the trend". What did vatti do right?
Numpy multidimensional array transpose transpose
什么是立体角
微服务开发环境搭建
Decompression and compression of chrome resource file Pak
Répertoire d'exclusion du transport rsync
[the third day of actual combat of smart lock project based on stm32f401ret6 in 10 days] communication foundation and understanding serial port
[MathType] use MathType to output latex style formula
四、入库管理功能的完善
Delphi Google API text to speech MP3 file
What did Hello travel do right for 500million users in five years?
Quickly set the computer to turn off automatically
Gome's ambition of "folding up" app
Ctrip reshapes new Ctrip
[the second day of actual combat of smart lock project based on stm32f401ret6 in 10 days] (lighting with library function and register respectively)
受众群体应该选择观察模式还是定位模式?
Super complete regular expressions
numpy多维数组转置transpose
How to solve practical problems through audience positioning?