import "normalize.css" import Vue from 'vue' import App from '@/App.vue' import router from '@/router'; import store from '@/store' import '@/components/base' import toast from '@/components/toast' import '@/vendor/ant' import {cloneDeep} from "lodash" //http://kazupon.github.io/vue-i18n/api/#constructor-options Vue.prototype.$event = new Vue() Vue.config.productionTip = process.env.NODE_ENV === 'production' ? true : false; Vue.use(toast); Vue.prototype.$computeStyle= function(style){ let myStyle = cloneDeep(style); let attr = ["left", "width", "height", "top", "right", "bottom"]; let attrStr = ["backgroundColor", "color","position",'zIndex']; Object.keys(style).forEach((v) => { if (attr.indexOf(v) != -1 && typeof style[v] == "number") { myStyle[v] = style[v] + "px"; } if (attrStr.indexOf(v) != -1) { myStyle[v] = style[v]; } }); return myStyle }, new Vue({ router, store, render: h => h(App) }).$mount('#app')