可视化平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

35 lines
970 B

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')