From 6712859535575f81c672b3062d4f02315c7037db Mon Sep 17 00:00:00 2001 From: GUjiYN <2946459904@qq.com> Date: Thu, 21 Dec 2023 17:29:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E8=A6=81=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 90 +++------------- src/components/index.vue | 206 ++++++++++++++++++++++++++++++++++++ src/components/login.vue | 35 ++++++ src/components/register.vue | 48 +++++++++ src/components/success.vue | 3 + src/router/index.js | 25 +++-- 6 files changed, 320 insertions(+), 87 deletions(-) create mode 100644 src/components/index.vue create mode 100644 src/components/login.vue create mode 100644 src/components/register.vue create mode 100644 src/components/success.vue diff --git a/src/App.vue b/src/App.vue index e864195..edd1526 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,85 +1,19 @@ - - - + \ No newline at end of file diff --git a/src/components/index.vue b/src/components/index.vue new file mode 100644 index 0000000..5bf3c1f --- /dev/null +++ b/src/components/index.vue @@ -0,0 +1,206 @@ + + \ No newline at end of file diff --git a/src/components/login.vue b/src/components/login.vue new file mode 100644 index 0000000..7cee211 --- /dev/null +++ b/src/components/login.vue @@ -0,0 +1,35 @@ + + \ No newline at end of file diff --git a/src/components/register.vue b/src/components/register.vue new file mode 100644 index 0000000..8f9590b --- /dev/null +++ b/src/components/register.vue @@ -0,0 +1,48 @@ + + \ No newline at end of file diff --git a/src/components/success.vue b/src/components/success.vue new file mode 100644 index 0000000..af9fa97 --- /dev/null +++ b/src/components/success.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index a49ae50..2e202b1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,21 +1,28 @@ import { createRouter, createWebHistory } from 'vue-router' -import HomeView from '../views/HomeView.vue' + const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), routes: [ { path: '/', - name: 'home', - component: HomeView + name: 'index', + component:() => import('../components/index.vue') }, { - path: '/about', - name: 'about', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/AboutView.vue') + path:'/login', + name:'login', + component:()=>import('../components/login.vue') + }, + { + path:'/register', + name:'register', + component:()=>import('../components/register.vue') + }, + { + path:'/success', + name:'success', + component:()=>import('../components/success.vue') } ] })