import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

// 引入清除样式,重置样式,公共样式
import "@/assets/css/normalize.css";
import "@/assets/css/reset.css";
import "@/assets/css/common.css";
// 引入fonts字体
import "@/assets/fonts/iconfont.css";

// moment 时间处理
import moment from "moment";
Vue.prototype.$moment = moment;
// 引入注册全局指令
import * as directives from "@/directive";
Object.keys(directives).forEach((name) =>
  Vue.directive(name, directives[name])
);
// 引入element-ui
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
Vue.use(ElementUI);
import { message } from "@/utils/resetMessage";
Vue.prototype.$message = message;
// 滚动插件
import scroll from "vue-seamless-scroll";
Vue.use(scroll);
// 格式化插件
import format from "vue-text-format";
Vue.use(format);

// 中央事件
Vue.prototype.$bus = new Vue();

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
