import Vue from 'vue'
import moment from 'moment'
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
// Vue.use(Table)
/**组件全局按需注册 */

const plglib = require('plglib')


Vue.use(plglib)

require('plglib/lib/plglib.css')

// 图片预览
Vue.use(Viewer)
Viewer.setDefaults({
  Options: {
    inline: true,
    button: false,
    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'
  }
})
Vue.prototype.$exception = plglib.ExceptionModal

import blocks from '../blocks'
blocks.forEach((item) => {
  Vue.component(item.name, item)
})

Vue.prototype.$moment = Vue.prototype.moment = moment
