From d7d08675c612b3a154d81702be828512499a2096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=A1=E5=A4=8D=E4=B9=A0?= <2353956224@qq.com> Date: Thu, 3 Apr 2025 20:25:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8F=B0=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jsconfig.json | 2 +- src/App.vue | 22 ++++++ src/components/HelloWorld.vue | 66 ------------------ src/components/Sidebar.vue | 48 +++++++++++++ src/router/index.js | 18 ++++- src/views/HomeView.vue | 9 +-- src/views/{ => hosts}/hostsList.vue | 22 ++++-- src/views/hosts/workbenches.vue | 101 ++++++++++++++++++++++++++++ src/views/nav.vue | 43 ++++++++++++ 9 files changed, 250 insertions(+), 81 deletions(-) delete mode 100644 src/components/HelloWorld.vue create mode 100644 src/components/Sidebar.vue rename src/views/{ => hosts}/hostsList.vue (89%) create mode 100644 src/views/hosts/workbenches.vue create mode 100644 src/views/nav.vue diff --git a/jsconfig.json b/jsconfig.json index 4aafc5f..587b289 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -16,4 +16,4 @@ "scripthost" ] } -} +} \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index a14d0c3..5261031 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,3 +3,25 @@ + + \ No newline at end of file diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue deleted file mode 100644 index a4cc6dd..0000000 --- a/src/components/HelloWorld.vue +++ /dev/null @@ -1,66 +0,0 @@ - - - {{ msg }} - - For a guide and recipes on how to configure / customize this project, - check out the - vue-cli documentation. - - Installed CLI Plugins - - babel - router - vuex - - Essential Links - - Core Docs - Forum - Community Chat - Twitter - News - - Ecosystem - - vue-router - vuex - vue-devtools - - vue-loader - awesome-vue - - - - - - - - diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue new file mode 100644 index 0000000..3d5eb63 --- /dev/null +++ b/src/components/Sidebar.vue @@ -0,0 +1,48 @@ + + + 导航菜单 + + + 工作台 + + + 主播列表 + + + + + + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 48fcbce..aeccb57 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -7,10 +7,22 @@ const routes = [ name: 'home', component: HomeView }, + { - path: '/hostsList', - name: 'hostsList', - component: () => import(/* webpackChunkName: "hostsList" */ '../views/hostsList.vue') + path: '/nav', + name: 'nav', + component: () => import(/* webpackChunkName: "hostsList" */ '../views/nav.vue'), + children: [ + { + path: '/hostsList', + name: 'hostsList', + component: () => import(/* webpackChunkName: "hostsList" */ '../views/hosts/hostsList.vue') + }, + { + path: '/workBenches', + name: 'workBenches', + component: () => import(/* webpackChunkName: "hostsList" */ '../views/hosts/workbenches.vue') + },] } ] diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 8b8fb40..f1c9b48 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -91,6 +91,9 @@ const router = useRouter(); // let inputValue = ref('999'); // const output = ref(''); // const { callPython, getPythonData } = usePythonBridge(); + + + const formData = ref({ userId: '', password: '', @@ -106,7 +109,7 @@ const onSubmit = () => { console.log(res) setToken(res.currcode) setUser(res) - router.push('/hostsList'); + router.push('/nav'); }) @@ -117,9 +120,7 @@ const onSubmit = () => { \ No newline at end of file diff --git a/src/views/nav.vue b/src/views/nav.vue new file mode 100644 index 0000000..ce34458 --- /dev/null +++ b/src/views/nav.vue @@ -0,0 +1,43 @@ + + + + + + + + + + + + \ No newline at end of file
- For a guide and recipes on how to configure / customize this project, - check out the - vue-cli documentation. -