forked from natuka/web.puabadge.com
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.
41 lines
1.1 KiB
41 lines
1.1 KiB
import { createApp } from 'vue' |
|
import { createPinia } from 'pinia' |
|
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate' |
|
import { createRouterScroller } from 'vue-router-better-scroller' |
|
import App from './Oauth.vue' |
|
import router from './router/oauth' |
|
|
|
import './app.less' |
|
import './assets/icon/iconfont.css' |
|
|
|
// Vant 桌面端适配 |
|
import '@vant/touch-emulator' |
|
|
|
/* -------------------------------- |
|
Vant 中有个别组件是以函数的形式提供的, |
|
包括 Toast,Dialog,Notify 和 ImagePreview 组件。 |
|
在使用函数组件时,unplugin-vue-components |
|
无法自动引入对应的样式,因此需要手动引入样式。 |
|
------------------------------------- */ |
|
import 'vant/es/toast/style' |
|
import 'vant/es/dialog/style' |
|
import 'vant/es/notify/style' |
|
import 'vant/es/image-preview/style' |
|
|
|
const app = createApp(App) |
|
const pinia = createPinia() |
|
pinia.use(piniaPluginPersistedstate) |
|
|
|
app.use(router) |
|
app.use(pinia) |
|
|
|
// 增强了 Vue Router v4 的滚动行为 |
|
app.use(createRouterScroller({ |
|
selectors: { |
|
'window': true, |
|
'body': true, |
|
'.scrollable': true, |
|
}, |
|
})) |
|
|
|
app.mount('#app')
|
|
|