当前位置:网站首页>V-viewer use
V-viewer use
2022-07-27 00:22:00 【_ Virgo programmer's daily life】
v-viewer Is an enlarged preview of the picture , He can zoom in and out with the mouse wheel , Full screen is also possible , Previous, next , Mouse drag .
1. Install first
npm install v-viewer --save
2.main.js introduce
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
Vue.use(Viewer)
notes : If you don't want to display buttons and picture names , You can main.js
Vue.use(Viewer, {
defaultOptions: {
button: false,
navbar: false,
title: false,
toolbar: true,
}
})
3. Use
<viewer :images="photo">
//photo Be sure to an array , Otherwise, the report will be wrong , stay data Address of the picture written in
<img
v-for="(src,index) in photo"
:src="src"
:key="index"
:onerror="errorImg"
>
</viewer>

边栏推荐
- 12_ Binding style
- 3 esp8266 nodemcu network server
- SSRF (server side request forgery) -- Principle & bypass & Defense
- Deeplabcut uses 1
- 08_ Event modifier
- Sliding window problem summary
- Leetcode - hash table
- Deep learning of parameter adjustment skills
- "Could not load host key" error when xshell connects to the server
- uni-app学习(二)
猜你喜欢
随机推荐
Leetcode - hash table
C and pointers Chapter 18 runtime environment 18.4 summary
13_集成学习和随机森林(Ensemble Learning and Random Forests)
4. Talk about the famous Zhang Zhengyou calibration method
The attorney general and the director of the national security service of Ukraine were dismissed
[literature reading] hat: hardware aware transformers for efficient natural language processing
Dynamic memory management
Deep learning of parameter adjustment skills
14_ Basic list
Uni app learning (II)
C and pointer Chapter 18 runtime environment 18.1 judgment of runtime environment
4-4 对象生命周期
第1章 拦截器入门及使用技巧
滑动窗口问题总结
C and pointers Chapter 18 runtime environment 18.8 programming exercises
08_ Event modifier
torch.相关函数
ResNet论文解读及代码实现(pytorch)
Chapter 3 cross domain issues
Relationship between Unicode and UTF-8








