current position:Home>How does Vue Preview PDF, word, xls, PPT and txt files
How does Vue Preview PDF, word, xls, PPT and txt files
2022-04-29 17:26:23【Billion cloud speed】
vue How to preview pdf、word、xls、ppt、txt file
This article mainly explains “vue How to preview pdf、word、xls、ppt、txt file ”, Interested friends might as well come and have a look . The method introduced in this paper is simple and fast , Practical . Now let Xiaobian take you to learn “vue How to preview pdf、word、xls、ppt、txt file ” Well !
Say the method
1. Add... To the page iframe
src The address is the file address to be displayed
So here I'm going to use theta elementui , If you use others, you also use iframe That's it
2. word、xls、ppt These documents
Use Microsoft's official preview address
Be careful :1. File address must be public network ;2. Do not have access to static resources
Last , All you control is src Address
Microsoft address :https://view.officeapps.live.com/op/view.aspx?src= Your file address
I just control here imgVisbleURL Variable then iframe Of src Just take the of this variable Address
3. Final effect
(1)txt
(2)word、xls、ppt
(3)pdf
Here we are , I'm sure you're right “vue How to preview pdf、word、xls、ppt、txt file ” Have a deeper understanding of , You might as well put it into practice ! This is the Yisu cloud website , For more relevant contents, you can enter the relevant channels for inquiry , Pay attention to our , Continue to learn !
copyright notice
author[Billion cloud speed],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/119/202204291539467055.html
The sidebar is recommended
- 07 Chrome browser captures hover element style
- WebGIS development training (ArcGIS API for JavaScript)
- Solution to the blank page of the project created by create react app after packaging
- 19. Html2canvas implements ArcGIS API for JavaScript 4 X screenshot function
- Introduction to JavaScript API for ArcGIS 13
- Development of ArcGIS API for JavaScript under mainstream front-end framework
- Nginx learning notes
- Less learning notes tutorial
- Vue2 cannot get the value in props in the data of the child component, or it is always the default value (the value of the parent component comes from asynchrony)
- LeetCode 217. Determine whether there are duplicate elements in the array
guess what you like
I'll write a website collection station myself. Do you think it's ok? [HTML + CSS + JS] Tan Zi
Front end browser debugging tips
Application of anti chattering and throttling in JavaScript
How to create JavaScript custom events
Several ways of hiding elements in CSS
node. Js-3 step out the use of a server and express package
CSS matrix function
Fastapi series - synchronous and asynchronous mutual conversion processing practice
How to extend the functionality of Axios without interceptors
Read pseudo classes and pseudo elements
Random recommended
- About node JS server related concepts
- Access control module (2)
- About virtual lists
- Developing figma plug-in using Vue 3 + vite
- Learn more about the garbage collection engine of chrome V8 JavaScript engine
- Vue3 uses vite instead of webpack
- How to upload applet code through node? Just take a look
- Using H5 video tag in Vue to play local video in pop-up window
- What is the difference between classes in Es5 and ES6?
- [Vue] play with the slot
- [Part 4 of front-end deployment] using docker to build cache and multi-stage construction to optimize single page applications
- Vue2 simple use of vant (based on Vue CLI)
- node. JS server
- React uses concurrent mode. When the rendering phase exceeds the time slice, high priority tasks jump the queue. How will the lanes on the fiber of the previous task be solved
- Vuecli2 multi page, how to remove HTML suffix
- Vue router dynamically modifies routing parameters
- How to use webpack or configure quasar after context isolation is turned on by electron?
- Vue3 how do parent components call child component methods
- Es learning notes (I): http request
- 【Java WEB】AJAX
- Java project: nursing home management system (java + springboot + thymeleaf + HTML + JS + MySQL)
- Java project: drug management system (java + springboot + HTML + layui + bootstrap + seals + MySQL)
- Java project: agricultural material management system (java + springboot + easyUI + HTML + Maven + MySQL)
- How do Vue, native JS and jQuery feel about development
- The Ajax backend accepts post data and writes it directly to the database
- Java project: agricultural material management system (java + springboot + easyUI + HTML + Maven + MySQL)
- Brother Lao Yu takes you to play with esp32:14 and personally make a two-way wireless remote control (I)
- How to create JavaScript custom events
- A king's time, I learned nginx
- Vue quick start (with actual small items: Notepad, weather forecast, music player)
- Vue: convert user input to numeric type
- - Status code: 404 for http://mirrors.cloud.aliyuncs.com/centos/8/AppStream/x86_64/os/repodata/repom
- vue. config. Understanding of agent in JS
- After the node is successfully installed, CMD can be executed, but the compiler webstorm runs NPM install and prompts that there is no solution to this command
- How to develop and deploy front-end code in large companies
- Vue assigns permissions to buttons through instructions
- [development diary from 22 years to April] Vue problems encountered in actual projects and their solutions
- [methodology 1] CSS development skills - global style setting and local style
- vue3. 0 dynamically bind and obtain DOM through ref;
- How to use HTML for touch event in mobile terminal