feat: v1.0.0

This commit is contained in:
王奥斯
2021-08-25 14:39:54 +08:00
parent 7f831bf205
commit 0909c3e4bc
114 changed files with 46733 additions and 15 deletions
+34
View File
@@ -0,0 +1,34 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [
{ path: '/', redirect: '/establishShop' },
{
path: '/',
name: 'layout',
redirect: '/home',
component: () => import('@/layout'),
children: [
{
//首页
path: '/home',
name: 'home',
component: () => import('@/layout/home'),
},
],
},
{
//创建页面
path: '/establishShop',
name: 'establishShop',
component: () => import('@/views/establishShop'),
},
]
const router = new VueRouter({
routes,
})
export default router
+14
View File
@@ -0,0 +1,14 @@
import router from '@/router/index'
/* 引入进度条 */
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
NProgress.configure({ showSpinner: false })
router.beforeEach(async (to, from, next) => {
NProgress.start()
next()
})
router.afterEach(() => {
NProgress.done()
window.scroll(0, 0)
})