当前位置:网站首页>Uniapp preview function
Uniapp preview function
2022-06-13 02:02:00 【Little four is a Virgo】
Project file structure 
hybrid The file is the core download by Baidu itself
previewPdf.vue
<template>
<view style="width: 100%;" >
<view style="height: 100rpx;">
<uni-nav-bar left-icon="left" title=" File preview " @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', // A format file stream js file The end of the article will be shared
}
},
onLoad(options) {
let fileUrl = encodeURIComponent(options.links) // encodeURIComponent Function can take a string as URI Components are encoded .
this.allUrl = this.viewerUrl + '?file=' + fileUrl
console.log("pdf",options)
}
}
</script>
<style>
</style>
Preview effect 
边栏推荐
- 深度学习调参技巧详解
- The method of drawing rounded panel with Delphi
- Calculation of accuracy, recall rate, F1 value and accuracy rate of pytorch prediction results (simple implementation)
- Répertoire d'exclusion du transport rsync
- Introduction to Google unit testing tools GTEST and gmoke
- Viewing the ambition of Xiaodu technology from intelligent giant screen TV v86
- rsync 传输排除目录
- Detailed understanding of white noise
- STM32 steering gear controller
- What is solid angle
猜你喜欢

Mac下搭建MySQL环境

华为设备配置双反射器优化虚拟专用网骨干层

Why is "iFLYTEK Super Brain 2030 plan" more worthy of expectation than "pure" virtual human

What is solid angle

The new wild prospect of JD instant retailing from the perspective of "hour shopping"

SQLserver2008 拒绝了对对象 '****' (数据库 '****',架构 'dbo')的 SELECT 权限
![[learning notes] xr872 GUI littlevgl 8.0 migration (display part)](/img/5e/fc8c3fe3029c36648fbc3f48bc0c2f.jpg)
[learning notes] xr872 GUI littlevgl 8.0 migration (display part)

一、搭建django自动化平台(实现一键执行sql)

Detailed understanding of white noise

When AI meets music, iFLYTEK music leads the industry reform with technology
随机推荐
SQLserver2008 拒绝了对对象 '****' (数据库 '****',架构 'dbo')的 SELECT 权限
Introduction to Google unit testing tools GTEST and gmoke
Server installation jupyterab and remote login configuration
C语言压缩字符串保存到二进制文件,从二进制文件读取压缩字符串后解压。
Plumber game
万字讲清 synchronized 和 ReentrantLock 实现并发中的锁
Application and examples of C language structure
Magics 23.0 how to activate and use the slice preview function of the view tool page
6、 Implementation of warehouse out management function
移动IPv6光猫登录的一般ip地址账号与密码,移动光猫变桥接模式
如何解决通过new Date()获取时间写出数据库与当前时间相差8小时问题【亲测有效】
Decoding iFLYTEK open platform 2.0 is a fertile land for developers and a source of industrial innovation
Day 1 of the 10 day smart lock project (understand the SCM stm32f401ret6 and C language foundation)
pytorch : srcIndex < srcSelectDimSize
Detailed explanation of C language conditional compilation
Use mediapipe+opencv to make a simple virtual keyboard
STM32 timer interrupt learning notes
Simple ranging using Arduino and ultrasonic sensors
微服务开发环境搭建
When AI meets music, iFLYTEK music leads the industry reform with technology