picviewer

This commit is contained in:
chenjianan
2018-12-25 16:23:24 +08:00
parent f5c56f1cac
commit 2154b69223
3 changed files with 39 additions and 40 deletions

View File

@@ -17,10 +17,17 @@ import curd from '@/utils/curd'
import time from 'time-formater'
import htmlToPdf from '@/vendor/htmlToPdf'
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
Vue.use(curd)
Vue.use(htmlToPdf)
Vue.use(ElementUI)
// 查看图片
Vue.use(Viewer)
Viewer.setDefaults({
Options: { 'inline': true, 'button': true, 'navbar': true, 'title': true, 'toolbar': true, 'tooltip': true, 'movable': true, 'zoomable': true, 'rotatable': true, 'scalable': true, 'transition': true, 'fullscreen': true, 'keyboard': true, 'url': 'data-source' }
})
// 处理时间字符串格式全局过滤器 '2018/1/23 00:00:00' to '2018-01-23'
Vue.filter('formatTime', function(value) {
if (!value) return ''