diff --git a/code/web/task_schedule/package.json b/code/web/task_schedule/package.json
index 6305714..d1f753c 100644
--- a/code/web/task_schedule/package.json
+++ b/code/web/task_schedule/package.json
@@ -9,6 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
+ "@babel/eslint-parser": "^7.19.1",
"@element-plus/icons-vue": "^2.0.10",
"element-plus": "^2.2.30",
"moment": "^2.29.4",
@@ -17,7 +18,12 @@
"vuex": "^4.1.0"
},
"devDependencies": {
+ "@babel/eslint-parser": "^7.19.1",
"@vitejs/plugin-vue": "^4.0.0",
+ "@vue/cli-plugin-eslint": "^5.0.8",
+ "eslint": "^8.35.0",
+ "eslint-config-recommended": "^4.1.0",
+ "eslint-plugin-vue": "^9.9.0",
"vite": "^4.1.0"
}
}
diff --git a/code/web/task_schedule/src/App.vue b/code/web/task_schedule/src/App.vue
index 682767c..91b9849 100644
--- a/code/web/task_schedule/src/App.vue
+++ b/code/web/task_schedule/src/App.vue
@@ -2,7 +2,7 @@
* @Author: Kane
* @Date: 2023-02-15 09:25:52
* @LastEditors: Kane
- * @LastEditTime: 2023-02-19 13:58:23
+ * @LastEditTime: 2023-02-28 01:15:01
* @FilePath: /task_schedule/src/App.vue
* @Description:
*
@@ -10,12 +10,7 @@
-->
-
-
- s{{ ui.counter }}
-
-
-
+
@@ -40,16 +35,16 @@ export default {
console.log(ui.counter);
};
- setInterval(() =>
- {
- ui.counter += 1;
- // console.log(counter);
- }, 1000);
+ // setInterval(() =>
+ // {
+ // ui.counter += 1;
+ // // console.log(counter);
+ // }, 1000);
- setInterval(() =>
- {
- location.reload();
- }, 5000);
+ // setInterval(() =>
+ // {
+ // location.reload();
+ // }, 5000);
return { locale, ui, onCount };
},
diff --git a/code/web/task_schedule/src/components/login/Login.vue b/code/web/task_schedule/src/components/login/Login.vue
new file mode 100644
index 0000000..0727b59
--- /dev/null
+++ b/code/web/task_schedule/src/components/login/Login.vue
@@ -0,0 +1,24 @@
+
+
+ 登录页面
+
+
+
+
+
\ No newline at end of file
diff --git a/code/web/task_schedule/src/main.js b/code/web/task_schedule/src/main.js
index 9b481e7..7d47e76 100644
--- a/code/web/task_schedule/src/main.js
+++ b/code/web/task_schedule/src/main.js
@@ -9,9 +9,12 @@
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
import { createApp } from 'vue';
-import './style.css';
+import { router } from "./router/index.js";
+
import App from './App.vue';
+import './style.css';
+
//css
import("element-plus/dist/index.css");
@@ -28,4 +31,5 @@ for (const [key, component,] of Object.entries(ElementPlusIconsVue))
}
app.use(ElementPlus);
+app.use(router);
app.mount('#app');
diff --git a/code/web/task_schedule/src/router/index.js b/code/web/task_schedule/src/router/index.js
new file mode 100644
index 0000000..f8781f7
--- /dev/null
+++ b/code/web/task_schedule/src/router/index.js
@@ -0,0 +1,34 @@
+/*
+ * @Author: Kane
+ * @Date: 2023-02-28 00:20:48
+ * @LastEditors: Kane
+ * @FilePath: /task_schedule/src/router/index.js
+ * @Description: 路由配置文件
+ *
+ * Copyright (c) ${2022} by Kane, All Rights Reserved.
+ */
+import { createRouter, createWebHashHistory } from "vue-router";
+
+const routes = [
+ {
+ path: "/",
+ name: "Root",
+ redirect: "Login",
+ hidden: true,
+ },
+ {
+ path: "/login",
+ name: "Login",
+ hidden: true,
+ component: () => import("@/components/login/login.vue"),
+ },
+];
+
+const router = createRouter(
+ {
+ history: createWebHashHistory(),
+ routes,
+ }
+);
+
+export { router };
\ No newline at end of file
diff --git a/code/web/task_schedule/vite.config.js b/code/web/task_schedule/vite.config.js
index b8e1dfa..c0906c2 100644
--- a/code/web/task_schedule/vite.config.js
+++ b/code/web/task_schedule/vite.config.js
@@ -2,17 +2,31 @@
* @Author: Kane
* @Date: 2023-02-15 09:25:52
* @LastEditors: Kane
- * @LastEditTime: 2023-02-15 10:40:43
+ * @LastEditTime: 2023-02-28 01:06:12
* @FilePath: /task_schedule/vite.config.js
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
-import { defineConfig } from 'vite'
-import vue from '@vitejs/plugin-vue'
+import { defineConfig } from 'vite';
+import vue from '@vitejs/plugin-vue';
+import path from 'path';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
base: './',
-})
+ resolve: {
+ //配置别名
+ alias: [
+ {
+ find: /^~/,
+ replacement: '',
+ },
+ {
+ find: '@',
+ replacement: path.resolve(__dirname, 'src'),
+ },
+ ],
+ },
+});