diff --git a/package.json b/package.json index 02b3cafd..4bf74258 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "nprogress": "0.2.0", "qrcode": "^1.3.2", "time-formater": "^1.0.3", + "v-viewer": "^1.3.1", "vue": "2.5.17", "vue-router": "3.0.1", "vuex": "3.0.1", diff --git a/src/main.js b/src/main.js index 487c94b2..3831fa72 100644 --- a/src/main.js +++ b/src/main.js @@ -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 '' diff --git a/src/views/PurchasingCenter/PurchaseInvoiceDelivery/index.vue b/src/views/PurchasingCenter/PurchaseInvoiceDelivery/index.vue index 57887dd3..4135a530 100644 --- a/src/views/PurchasingCenter/PurchaseInvoiceDelivery/index.vue +++ b/src/views/PurchasingCenter/PurchaseInvoiceDelivery/index.vue @@ -9,17 +9,6 @@ :label="item.label" :value="item.value"/> - - - - - - - - - - - - + - + - + - - - + + +