import { createApp } from 'vue'

import App from './App.vue'
import router from './router'
import store from './stores/index'
import 'normalize.css/normalize.css'
import './assets/css/style.css'
import SvgIcon from "@/components/SvgIcon/index.vue";
import "virtual:svg-icons-register";

// vant组件库
import 'vant/lib/index.css'
import { Locale, Lazyload, Loading } from 'vant';
import enUS from 'vant/es/locale/lang/en-US';
Locale.use('en-US', enUS);


import flexible from "./utils/flexible.js";

import './assets/main.css'
import "./router/router-config"  // 路由守卫，做动态路由的地方

let lastTouchEnd = 0;
document.addEventListener('touchend', function(event) {
  const now = (new Date()).getTime();
  if (now - lastTouchEnd <= 300) {
	event.preventDefault();
  }
  lastTouchEnd = now;
}, false);

const app = createApp(App)
app.use(router)
.use(store)
.use(Lazyload)
.use(Loading)
.component("SvgIcon", SvgIcon)
.mount('#app')

flexible();

