import './public-path'; import Vue from 'vue'; import VueI18n from 'vue-i18n' import axios from "axios"; // import "sv-print/dist/style.css"; import ElementUI from 'element-ui'; import App from './App.vue'; import router from './router'; import store from './store'; import api from './api/api'; import tool from './utils/tool'; import basicData from './utils/basic-data'; import Directive from './utils/directive.js' import FileType from './utils/matchingFeilType'; import upload from './api/upload'; import './style/style.css' import './style/theme/index.css' import Steps from 'ant-design-vue/lib/steps' import Table from 'ant-design-vue/lib/table' import tableLayout from './components/dynamic-table' import tableNewLayout from './components/dynamic-newTable' import basicLayout from './components/normal-basic-layout' import tableMainLayout from './template/tableMainLayout' import tableDetail from './components/dynamic-table-detail' import tableDetailLayout from './template/tableDetailLayout' import normalLayout from './components/normal-basic-layout/normal.vue' import basicDetails from './components/normal-basic-layout/details' import deleteBtn from './components/delete_btn/index' import customBtn from './components/customBtn/index' import tagPanl from '@/components/tagPanl/tagPanl' import selectTemp from '@/components/selectTemp/index'; import sort from './components/sort'; import '@/style/theme/font-icon/iconfont.css'; import {messages} from './locales/lang.json'; Vue.use(Steps) Vue.use(Table) // import {hiPrintPlugin} from './index' // Vue.use(hiPrintPlugin) Vue.prototype.$api = api console.log(process.env) Vue.prototype.$upload = upload Vue.prototype.tool = tool Vue.prototype.basicData = basicData Vue.prototype.fileType = FileType axios.defaults.timeout = 60 * 1000 axios.defaults.baseURL = tool.getBaseUrl() Vue.prototype.$axios = axios Vue.use(Directive) Vue.prototype.tableHieght = 'calc(100vh - 302px)' Vue.config.productionTip = false; Vue.component('tableLayout', tableLayout) Vue.component('tableNewLayout',tableNewLayout) Vue.component('tableMainLayout',tableMainLayout) Vue.component('tableDetailLayout',tableDetailLayout) Vue.component('tableDetail',tableDetail) Vue.component('basicLayout', basicLayout) Vue.component('basicDetails', basicDetails) Vue.component('normalLayout', normalLayout) Vue.component('deleteBtn',deleteBtn) Vue.component('customBtn',customBtn) Vue.component('selectTemp',selectTemp) Vue.component('sort', sort) /* 标签组件 */ Vue.component('tagPanl',tagPanl) Vue.use(ElementUI); Vue.use(VueI18n) ElementUI.TableColumn.props.showOverflowTooltip ={type:Boolean, default: true} ElementUI.Dialog.props.closeOnClickModal.default = false; ElementUI.Drawer.props.showClose.default = false; Vue.config.lang = 'ZH' /* table懒加载 */ // Vue.directive('tableLoad',{ // bind (el,binding) { // let tableWarp = el.querySelector('.el-table__body-wrapper') // function handleFun (e) { // if (store.state.loading) return // if (tableWarp.scrollTop + tableWarp.clientHeight == tableWarp.scrollHeight) { // binding.value() // } // } // tableWarp.addEventListener('scroll',handleFun) // el.tableWarp = tableWarp // el.handleFun = handleFun // }, // unbind (el,binding) { // /* 解绑 */ // el.tableWarp.removeEventListener('scroll',el.handleFun) // } // }) new Vue({ router, store, render: (h) => h(App), }).$mount('#app');