42 lines
962 B
TypeScript
42 lines
962 B
TypeScript
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 } from 'vant';
|
|
import enUS from 'vant/es/locale/lang/en-US';
|
|
Locale.use('en-US', enUS);
|
|
import { Loading } from 'vant';
|
|
|
|
|
|
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(Loading)
|
|
.component("SvgIcon", SvgIcon)
|
|
.mount('#app')
|
|
|
|
flexible();
|
|
|