import Vue from 'vue'; import App from './App'; import store from './store'; // store import plugins from './plugins'; // plugins import './permission'; // permission //全局过滤器 import * as filters from '@/utils/filters' import SvgIcon from '@/components/SvgIcon/index.vue'; import NoData from '@/components/NoData/index.vue'; import {getConfigKey} from "@/api/system/config"; import { parseTime, getNow, arraySum, getTimeDifference, sortDesByKey, sortAscByKey, debounce } from './utils/pnkx.js'; Object.keys(filters).forEach(key => { // 插入过滤器名和对应方法 Vue.filter(key, filters[key]) }); Vue.use(plugins); Vue.config.productionTip = false; Vue.prototype.$store = store; // 全局组件 Vue.component("SvgIcon", SvgIcon); Vue.component("NoData", NoData); // 全局方法 Vue.prototype.$getConfigKey = getConfigKey; Vue.prototype.$parseTime = parseTime; Vue.prototype.$getNow = getNow; Vue.prototype.$arraySum = arraySum; Vue.prototype.$getTimeDifference = getTimeDifference; Vue.prototype.$sortDesByKey = sortDesByKey; Vue.prototype.$sortAscByKey = sortAscByKey; Vue.prototype.$debounce = debounce; App.mpType = 'app' const app = new Vue({ ...App }) app.$mount()