diff --git a/.env.development b/.env.development
index 0c92b76..00d0361 100644
--- a/.env.development
+++ b/.env.development
@@ -5,4 +5,10 @@ NODE_ENV='development'
VITE_APP_TITLE = 'vue3-element-admin'
VITE_APP_PORT = 3000
+
+# API请求前缀
VITE_APP_BASE_API = '/dev-api'
+
+# proxy代理配置
+VITE_APP_TARGET_URL = 'http://localhost:3000'
+VITE_APP_TARGET_BASE_API = ''
diff --git a/.env.production b/.env.production
index fbcbed5..c71bbd5 100644
--- a/.env.production
+++ b/.env.production
@@ -2,4 +2,10 @@
VITE_APP_TITLE = 'vue3-element-admin'
VITE_APP_PORT = 3000
-VITE_APP_BASE_API = '/prod-api'
+
+# API请求前缀
+VITE_APP_BASE_API = 'http://vapi.youlai.tech'
+
+# proxy代理配置
+VITE_APP_TARGET_URL = "http://vapi.youlai.tech"
+VITE_APP_TARGET_BASE_API = ''
diff --git a/.env.staging b/.env.staging
index 7a0b3d3..182572a 100644
--- a/.env.staging
+++ b/.env.staging
@@ -3,4 +3,6 @@ NODE_ENV='staging'
VITE_APP_TITLE = 'vue3-element-admin'
VITE_APP_PORT = 3000
+
+VITE_APP_TARGET_URL = 'http://localhost:3000';
VITE_APP_BASE_API = '/prod--api'
diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json
index 9f36942..3620c18 100644
--- a/.eslintrc-auto-import.json
+++ b/.eslintrc-auto-import.json
@@ -266,4 +266,4 @@
"watchWithFilter": true,
"whenever": true
}
-}
\ No newline at end of file
+}
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index 007ecfa..3300699 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -1,4 +1,5 @@
module.exports = {
+ root: true,
env: {
browser: true,
es2021: true,
@@ -10,11 +11,16 @@ module.exports = {
"plugin:vue/vue3-recommended",
"./.eslintrc-auto-import.json",
"prettier",
+ "plugin:@typescript-eslint/recommended",
+ "plugin:prettier/recommended",
],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
parser: "@typescript-eslint/parser",
+ project: "./tsconfig.*?.json",
+ createDefaultProgram: false,
+ extraFileExtensions: [".vue"],
},
plugins: ["vue", "@typescript-eslint"],
rules: {
@@ -23,6 +29,41 @@ module.exports = {
"@typescript-eslint/no-explicit-any": "off", // 关闭any类型的警告
"vue/no-v-model-argument": "off",
"@typescript-eslint/no-non-null-assertion": "off",
+ "@typescript-eslint/ban-ts-ignore": "off",
+ "@typescript-eslint/ban-ts-comment": "off",
+ "@typescript-eslint/ban-types": "off",
+ "@typescript-eslint/explicit-function-return-type": "off",
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-var-requires": "off",
+ "@typescript-eslint/no-empty-function": "off",
+ "@typescript-eslint/no-use-before-define": "off",
+ "@typescript-eslint/no-non-null-assertion": "off",
+ "@typescript-eslint/explicit-module-boundary-types": "off",
+ "vue/script-setup-uses-vars": "error",
+ "vue/no-reserved-component-names": "off",
+ "vue/custom-event-name-casing": "off",
+ "vue/attributes-order": "off",
+ "vue/one-component-per-file": "off",
+ "vue/html-closing-bracket-newline": "off",
+ "vue/max-attributes-per-line": "off",
+ "vue/multiline-html-element-content-newline": "off",
+ "vue/singleline-html-element-content-newline": "off",
+ "vue/attribute-hyphenation": "off",
+ "vue/require-default-prop": "off",
+ "vue/require-explicit-emits": "off",
+ "vue/html-self-closing": [
+ "error",
+ {
+ html: {
+ void: "always",
+ normal: "never",
+ component: "always",
+ },
+ svg: "always",
+ math: "always",
+ },
+ ],
+ "vue/multi-word-component-names": "off",
},
// eslint不能对html文件生效
overrides: [
diff --git a/.gitignore b/.gitignore
index d5c3e83..1fd449a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,7 +6,6 @@ dist-ssr
# Editor directories and files
.idea
-.vscode
*.suo
*.ntvs*
*.njsproj
@@ -15,3 +14,4 @@ dist-ssr
package-lock.json
pnpm-lock.yaml
+stats.html
diff --git a/.prettierignore b/.prettierignore
index d751f74..f3e9850 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -8,3 +8,4 @@ public
*.md
src/assets
+stats.html
diff --git a/.stylelintignore b/.stylelintignore
index d751f74..f3e9850 100644
--- a/.stylelintignore
+++ b/.stylelintignore
@@ -8,3 +8,4 @@ public
*.md
src/assets
+stats.html
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 0000000..a7cea0b
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,3 @@
+{
+ "recommendations": ["Vue.volar"]
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..8c231e0
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,146 @@
+{
+ "typescript.tsdk": "./node_modules/typescript/lib",
+ "npm.packageManager": "pnpm",
+ "editor.tabSize": 2,
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "files.eol": "\n",
+ "search.exclude": {
+ "**/node_modules": true,
+ "**/*.log": true,
+ "**/*.log*": true,
+ "**/bower_components": true,
+ "**/dist": true,
+ "**/elehukouben": true,
+ "**/.git": true,
+ "**/.gitignore": true,
+ "**/.svn": true,
+ "**/.DS_Store": true,
+ "**/.idea": true,
+ "**/.vscode": false,
+ "**/yarn.lock": true,
+ "**/tmp": true,
+ "out": true,
+ "dist": true,
+ "node_modules": true,
+ "CHANGELOG.md": true,
+ "examples": true,
+ "res": true,
+ "screenshots": true,
+ "yarn-error.log": true,
+ "**/.yarn": true
+ },
+ "files.exclude": {
+ "**/.cache": true,
+ "**/.editorconfig": true,
+ "**/.eslintcache": true,
+ "**/bower_components": true,
+ "**/.idea": true,
+ "**/tmp": true,
+ "**/.git": true,
+ "**/.svn": true,
+ "**/.hg": true,
+ "**/CVS": true,
+ "**/.DS_Store": true
+ },
+ "files.watcherExclude": {
+ "**/.git/objects/**": true,
+ "**/.git/subtree-cache/**": true,
+ "**/.vscode/**": true,
+ "**/node_modules/**": true,
+ "**/tmp/**": true,
+ "**/bower_components/**": true,
+ "**/dist/**": true,
+ "**/yarn.lock": true
+ },
+ "material-icon-theme.folders.color": "#42a5f5",
+ "material-icon-theme.folders.theme": "specific",
+ "material-icon-theme.activeIconPack": "vue_vuex",
+ "path-intellisense.mappings": {
+ "@/": "${workspaceRoot}/src/"
+ },
+ "[javascriptreact]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "[typescript]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "[typescriptreact]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "[html]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "[css]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "[less]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "[scss]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "[markdown]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "editor.codeActionsOnSave": {
+
+ "source.fixAll.eslint": true
+ },
+ "[vue]": {
+ "editor.codeActionsOnSave": {
+ "source.fixAll.eslint": true,
+ "source.fixAll.stylelint": true
+ },
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "i18n-ally.localesPaths": ["src/locales/lang"],
+ "i18n-ally.keystyle": "nested",
+ "i18n-ally.sortKeys": true,
+ "i18n-ally.namespace": true,
+ "i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}",
+ "i18n-ally.enabledParsers": ["ts"],
+ "i18n-ally.sourceLanguage": "en",
+ "i18n-ally.displayLanguage": "zh-CN",
+ "i18n-ally.enabledFrameworks": ["vue", "react"],
+ "cSpell.words": [
+ "antd",
+ "antv",
+ "brotli",
+ "browserslist",
+ "codemirror",
+ "commitlint",
+ "cropperjs",
+ "echarts",
+ "ERUDA",
+ "esnext",
+ "esno",
+ "iconify",
+ "INTLIFY",
+ "lint-staged",
+ "lintstagedrc",
+ "logicflow",
+ "mkcert",
+ "mockjs",
+ "nprogress",
+ "persistedstate",
+ "pinia",
+ "pnpm",
+ "qrcode",
+ "sider",
+ "sortablejs",
+ "stylelint",
+ "tailwindcss",
+ "tdesign",
+ "tinymce",
+ "unocss",
+ "unplugin",
+ "vben",
+ "vditor",
+ "Vite",
+ "vitejs",
+ "vueuse",
+ "windi",
+ "windicss",
+ "zxcvbn"
+ ],
+}
diff --git a/mock/router.ts b/mock/router.ts
new file mode 100644
index 0000000..3e9eef3
--- /dev/null
+++ b/mock/router.ts
@@ -0,0 +1,341 @@
+import { MockMethod } from "vite-plugin-mock";
+const url = "/api/v1/menus/routes";
+const method = "get";
+const data = {
+ code: "00000",
+ data: [
+ {
+ path: "/system",
+ component: "Layout",
+ redirect: "/system/user",
+ meta: {
+ title: "系统管理",
+ icon: "system",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ children: [
+ {
+ path: "user",
+ component: "system/user/index",
+ name: "User",
+ meta: {
+ title: "用户管理",
+ icon: "user",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ {
+ path: "role",
+ component: "system/role/index",
+ name: "Role",
+ meta: {
+ title: "角色管理",
+ icon: "role",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ {
+ path: "menu",
+ component: "system/menu/index",
+ name: "Menu",
+ meta: {
+ title: "菜单管理",
+ icon: "menu",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ {
+ path: "dept",
+ component: "system/dept/index",
+ name: "Dept",
+ meta: {
+ title: "部门管理",
+ icon: "tree",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ {
+ path: "dict",
+ component: "system/dict/index",
+ name: "Dict",
+ meta: {
+ title: "字典管理",
+ icon: "dict",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ ],
+ },
+ {
+ path: "/api",
+ component: "Layout",
+ meta: {
+ title: "接口",
+ icon: "api",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ children: [
+ {
+ path: "apidoc",
+ component: "demo/api-doc",
+ name: "Apidoc",
+ meta: {
+ title: "接口文档",
+ icon: "api",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ ],
+ },
+ {
+ path: "/external-link",
+ component: "Layout",
+ redirect: "noredirect",
+ meta: {
+ title: "外部链接",
+ icon: "link",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ children: [
+ {
+ path: "https://juejin.cn/post/7228990409909108793",
+ meta: {
+ title: "document",
+ icon: "document",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ ],
+ },
+ {
+ path: "/multi-level",
+ component: "Layout",
+ redirect: "/multi-level/multi-level1",
+ meta: {
+ title: "多级菜单",
+ icon: "multi_level",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ children: [
+ {
+ path: "multi-level1",
+ component: "demo/multi-level/level1",
+ redirect: "/multi-level/multi-level2",
+ meta: {
+ title: "菜单一级",
+ icon: "",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ children: [
+ {
+ path: "multi-level2",
+ component: "demo/multi-level/children/level2",
+ redirect: "/multi-level/multi-level2/multi-level3-1",
+ meta: {
+ title: "菜单二级",
+ icon: "",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ children: [
+ {
+ path: "multi-level3-1",
+ component: "demo/multi-level/children/children/level3-1",
+ name: "MultiLevel31",
+ meta: {
+ title: "菜单三级-1",
+ icon: "",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ {
+ path: "multi-level3-2",
+ component: "demo/multi-level/children/children/level3-2",
+ name: "MultiLevel32",
+ meta: {
+ title: "菜单三级-2",
+ icon: "",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ path: "/component",
+ component: "Layout",
+ meta: {
+ title: "组件封装",
+ icon: "menu",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ children: [
+ {
+ path: "wang-editor",
+ component: "demo/wang-editor",
+ name: "WangEditor",
+ meta: {
+ title: "富文本编辑器",
+ icon: "",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ {
+ path: "upload",
+ component: "demo/upload",
+ name: "Upload",
+ meta: {
+ title: "图片上传",
+ icon: "",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ {
+ path: "icon-selector",
+ component: "demo/icon-selector",
+ name: "IconSelector",
+ meta: {
+ title: "图标选择器",
+ icon: "",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ {
+ path: "dict-demo",
+ component: "demo/dict",
+ name: "DictDemo",
+ meta: {
+ title: "字典组件",
+ icon: "",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ {
+ path: "taginput",
+ component: "demo/taginput",
+ name: "Taginput",
+ meta: {
+ title: "标签输入框",
+ icon: "",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ {
+ path: "signature",
+ component: "demo/signature",
+ name: "Signature",
+ meta: {
+ title: "签名",
+ icon: "",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ {
+ path: "table",
+ component: "demo/table",
+ name: "Table",
+ meta: {
+ title: "表格",
+ icon: "",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ ],
+ },
+ {
+ path: "/function",
+ component: "Layout",
+ meta: {
+ title: "功能演示",
+ icon: "menu",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ children: [
+ {
+ path: "websocket",
+ component: "demo/websocket",
+ name: "Websocket",
+ meta: {
+ title: "Websocket",
+ icon: "",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ {
+ path: "other",
+ component: "demo/other",
+ meta: {
+ title: "敬请期待...",
+ icon: "",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ ],
+ },
+ ],
+ msg: "一切ok",
+};
+
+export default [
+ {
+ url: url,
+ method: method,
+ response: () => {
+ return data;
+ },
+ },
+] as MockMethod[];
diff --git a/mock/user.ts b/mock/user.ts
new file mode 100644
index 0000000..6f0cadc
--- /dev/null
+++ b/mock/user.ts
@@ -0,0 +1,95 @@
+import { MockMethod } from "vite-plugin-mock";
+
+export default [
+ {
+ url: "/api/hello_world",
+ method: "get",
+ response: (request) => {
+ return {
+ msg: "hello world",
+ headers: request.headers,
+ };
+ },
+ },
+ {
+ url: "/api/v1/auth/captcha",
+ method: "get",
+ response: () => {
+ return {
+ code: "00000",
+ data: {
+ verifyCodeKey: "534b8ef2b0a24121bec76391ddd159f9",
+ verifyCodeBase64:
+ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAAkCAIAAADNSmkJAAAFKUlEQVR4Xu2ZXUwcVRiGV70wMWo08V5NvPXCrDbFaGpMaZW2hqQxaoiJTRsaMBCNSYtpa2JTKiFSelFa+Q/QZcMWqEhBlh+htbEpZhMrBQrlJ0hBywLLyrJ0WZbje3bqOvPNLHPWrDvdOE9ONmfe78zkzMs335wzWJhJQrBQweS/wTQ6QWgYHdoIOcecOe05O+t2WkutO+p2ZF3Ksg/YV9ZW6FATYajR3nveg60H9327r3O8c35lHgp+r05dPdJzBL73TPSQ8SaCKIxGLsPlop+K0JHrEkPuoT31e5qGmmjARACF0agYyGVNlyVm/pzZXrN9fHGcBkz0UBid+31u93i3XFFT80vN8cvHqWqih8Lo1NpUqS5vwh3vnd223VQ10UNh9NbyrcFQUK6oCawHUipSqGqiB83oBf+CXFGDMp1mS6OqiR4Ko7FexkpOrqhpHGw82nOUqiZ6KIzGrkRuorW0dJMmOy+hOCfYGzb2RBFv6HRO0gEJw/U7y+pgL1bwmTxexN6sZ31TdEwEhdG+gA+7EqyXpUO1uZH20cWL8hMTRt1N9tBXzCJrOIRoCPJpSO2RAp4HmtCdIfZ+2JWgEBN9LbR28seTGU0Zue1tMLp+YIAMSADzfvbkKX4/eb28j4YODiGin3heqmIlLja5hAUCu+nmGY3JWKvpMAlqNGgebsauBOvlqSX+JEx7p7EbTLen53XlzfmWUioqXikrc68Y8N2juJ/fyVsNChGHEE//rBANYWaZz+TRQqpLaBgNsPfDrgSpbS21YtV87IdjrlkX9JZbt5DOma2t9ITo5F+5glN22WwL/n+yDv00mw06orKxOqQ5+J04hhViwzAXETIcJDVm8uxZqktoGx2Nj9t43Wgaul/ERQiGQvtbWnDWgZYW9CXlQFjZ/7ciyHNn+Z2MexTimIeLz59TiIln0M1e+IbPpOAaDUnEYPTi6iqKxpbycs/qKo1tCslfKcffPn9enuMiPPY1vxO/ckeFQ4h46cdGqUWoidE/y54q5tPY5WDrGzQqIXot4BgchEE57e00IMCw2/1qZSVO/7SjA78o9INzcxsbrL+fnTnDDh9mmZn8F30oG1Hm+nABv5mQMopDS/h1HxtqTzWbABMe9sxpPoe9zezeOo1GELqWhPS8t46M0IAYHbdvR1aHbaOjbjfLz2eFhez6dba4yAfgF30o0BFVE8+Mjh/wFxPI+I5mAEHU6Ls+38vhTFwOBGhMDF8gkFpbC5ffsdv/uBs6dIj19dExEtARVXv9YNbop8NFY3aZ6gRRo+tu3IBHnzmdNCBMXldXJKPfL74WzWUJRE+coDUknqsOdZXQbAJYwluVTbOZI3Qt8GFzMwxyjo3RgBiN4fr+elXVpZGRLWXl6PdOTtJBSlBDUK/lnIrjOlrtqWYTQDJaF6FrTXu9sOa1ysrVoM5HVE1GFxZQcyJ/p+xzv6K/rbr6N6+XDpUBl0tKFIrbz78qWB6YnWFMCBld4XLBms+7df75ook/GNzb0GCV7U1Qfz9p64TyQWNjYD3qe9rj4SMJtQP3MyjSDPzWIRHPjH7X4YAvfXoPuyZf9Pbi3PcuXIh4mp3NllYC6XY79C+jl2o8PBipxjnBttn4MgMNnWgfcRJGPI2OL8hTj3LloIlmRicvBhiNykvecpqoa3RSY4DRcLAwyicuOepVR1JjgNFYHWONHL04czTX0UmNAUYD7Pr+xc4wqTHGaBb2OtZvHUmNYUazcA2J6etdUmOk0f8rTKMTxF91RG0D1SwYGwAAAABJRU5ErkJggg==",
+ },
+ msg: "一切ok",
+ };
+ },
+ },
+ {
+ url: "/api/v1/auth/login",
+ method: "post",
+ response: () => {
+ return {
+ code: "00000",
+ data: {
+ accessToken:
+ "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImp0aSI6IjE2YWJkNTlkOTAxNzQwZDliYmI3ZjczODBhZDkyNzNhIiwidXNlcklkIjoyLCJ1c2VybmFtZSI6ImFkbWluIiwiZGVwdElkIjoxLCJkYXRhU2NvcGUiOjEsImF1dGhvcml0aWVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNjkxMTAzMzgyfQ.P4cuIfmPepl3HuguhMS7NXn5a7IUPpsLbmtA_rHOhHk",
+ tokenType: "Bearer",
+ refreshToken: null,
+ expires: null,
+ },
+ msg: "一切ok",
+ };
+ },
+ },
+ {
+ url: "/api/v1/users/me",
+ method: "get",
+ response: () => {
+ return {
+ code: "00000",
+ data: {
+ userId: 2,
+ nickname: "系统管理员",
+ avatar:
+ "https://oss.youlai.tech/youlai-boot/2023/05/16/811270ef31f548af9cffc026dfc3777b.gif",
+ roles: ["ADMIN"],
+ perms: [
+ "sys:menu:delete",
+ "sys:dept:edit",
+ "sys:dict_type:add",
+ "sys:dict:edit",
+ "sys:dict:delete",
+ "sys:dict_type:edit",
+ "sys:menu:add",
+ "sys:user:add",
+ "sys:role:edit",
+ "sys:dept:delete",
+ "sys:user:edit",
+ "sys:user:delete",
+ "sys:user:reset_pwd",
+ "sys:dept:add",
+ "sys:role:delete",
+ "sys:dict_type:delete",
+ "sys:menu:edit",
+ "sys:dict:add",
+ "sys:role:add",
+ ],
+ },
+ msg: "一切ok",
+ };
+ },
+ },
+ {
+ url: "/api/v1/auth/logout",
+ method: "delete",
+ response: () => {
+ return {
+ code: "00000",
+ data: {},
+ msg: "string",
+ };
+ },
+ },
+] as MockMethod[];
diff --git a/package.json b/package.json
index 2aab06c..b3fc900 100644
--- a/package.json
+++ b/package.json
@@ -2,11 +2,10 @@
"name": "vue3-element-admin",
"private": true,
"version": "2.4.1",
- "type": "module",
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "vite serve --mode development",
- "build:prod": "vite build --mode production &&vue-tsc --noEmit",
+ "build:prod": "vite build --mode production && vue-tsc --noEmit",
"prepare": "husky install",
"lint:eslint": "eslint --fix --ext .ts,.js,.vue ./src ",
"lint:prettier": "prettier --write \"**/*.{js,cjs,ts,json,tsx,css,less,scss,vue,html,md}\"",
@@ -68,7 +67,6 @@
"@types/lodash": "^4.14.195",
"@types/nprogress": "^0.2.0",
"@types/path-browserify": "^1.0.0",
- "@types/xlsx": "^0.0.36",
"@typescript-eslint/eslint-plugin": "^5.59.6",
"@typescript-eslint/parser": "^5.59.6",
"autoprefixer": "^10.4.14",
@@ -76,6 +74,7 @@
"cz-git": "^1.6.1",
"eslint": "^8.40.0",
"eslint-config-prettier": "^8.8.0",
+ "eslint-plugin-import": "^2.28.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.13.0",
"fast-glob": "^3.2.11",
@@ -85,14 +84,15 @@
"postcss-html": "^1.5.0",
"postcss-scss": "^4.0.6",
"prettier": "^2.8.8",
+ "rollup-plugin-visualizer": "^5.9.2",
"sass": "^1.58.3",
- "stylelint": "^15.7.0",
+ "stylelint": "^15.10.2",
"stylelint-config-html": "^1.1.0",
"stylelint-config-recess-order": "^4.0.0",
- "stylelint-config-recommended-scss": "11.0.0 ",
- "stylelint-config-recommended-vue": "^1.4.0",
- "stylelint-config-standard": "^33.0.0",
- "stylelint-config-standard-scss": "^9.0.0",
+ "stylelint-config-recommended-scss": "^12.0.0",
+ "stylelint-config-recommended-vue": "^1.5.0",
+ "stylelint-config-standard": "^34.0.0",
+ "stylelint-config-standard-scss": "^10.0.0",
"typescript": "^5.0.4",
"unocss": "^0.51.13",
"unplugin-auto-import": "^0.15.3",
@@ -100,8 +100,9 @@
"unplugin-vue-components": "^0.24.1",
"vite": "^4.4.2",
"vite-plugin-compression": "^0.5.1",
+ "vite-plugin-mock": "^3.0.0",
"vite-plugin-svg-icons": "^2.0.1",
- "vue-tsc": "^1.6.5 "
+ "vue-tsc": "^1.7.0 "
},
"repository": "https://gitee.com/youlaiorg/vue3-element-admin.git",
"author": "有来开源组织",
diff --git a/src/App.vue b/src/App.vue
index 9fb00e0..6638cf3 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,6 +1,7 @@
diff --git a/src/api/dept/index.ts b/src/api/dept/index.ts
index 2ba1e20..2d2cff4 100644
--- a/src/api/dept/index.ts
+++ b/src/api/dept/index.ts
@@ -1,6 +1,6 @@
-import request from '@/utils/request';
-import { AxiosPromise } from 'axios';
-import { DeptForm, DeptQuery, DeptVO } from './types';
+import request from "@/utils/request";
+import { AxiosPromise } from "axios";
+import { DeptForm, DeptQuery, DeptVO } from "./types";
/**
* 部门树形表格
@@ -9,9 +9,9 @@ import { DeptForm, DeptQuery, DeptVO } from './types';
*/
export function listDepts(queryParams?: DeptQuery): AxiosPromise {
return request({
- url: '/api/v1/dept',
- method: 'get',
- params: queryParams
+ url: "/api/v1/dept",
+ method: "get",
+ params: queryParams,
});
}
@@ -20,8 +20,8 @@ export function listDepts(queryParams?: DeptQuery): AxiosPromise {
*/
export function listDeptOptions(): AxiosPromise<[]> {
return request({
- url: '/api/v1/dept/options',
- method: 'get'
+ url: "/api/v1/dept/options",
+ method: "get",
});
}
@@ -32,8 +32,8 @@ export function listDeptOptions(): AxiosPromise<[]> {
*/
export function getDeptForm(id: number): AxiosPromise {
return request({
- url: '/api/v1/dept/' + id + '/form',
- method: 'get'
+ url: "/api/v1/dept/" + id + "/form",
+ method: "get",
});
}
@@ -44,9 +44,9 @@ export function getDeptForm(id: number): AxiosPromise {
*/
export function addDept(data: DeptForm) {
return request({
- url: '/api/v1/dept',
- method: 'post',
- data: data
+ url: "/api/v1/dept",
+ method: "post",
+ data: data,
});
}
@@ -58,9 +58,9 @@ export function addDept(data: DeptForm) {
*/
export function updateDept(id: number, data: DeptForm) {
return request({
- url: '/api/v1/dept/' + id,
- method: 'put',
- data: data
+ url: "/api/v1/dept/" + id,
+ method: "put",
+ data: data,
});
}
@@ -71,7 +71,7 @@ export function updateDept(id: number, data: DeptForm) {
*/
export function deleteDept(ids: string) {
return request({
- url: '/api/v1/dept/' + ids,
- method: 'delete'
+ url: "/api/v1/dept/" + ids,
+ method: "delete",
});
}
diff --git a/src/api/file/index.ts b/src/api/file/index.ts
index 350ce7d..adcc30b 100644
--- a/src/api/file/index.ts
+++ b/src/api/file/index.ts
@@ -1,6 +1,6 @@
-import request from '@/utils/request';
-import { AxiosPromise } from 'axios';
-import { FileInfo } from './types';
+import request from "@/utils/request";
+import { AxiosPromise } from "axios";
+import { FileInfo } from "./types";
/**
* 上传文件
@@ -9,14 +9,14 @@ import { FileInfo } from './types';
*/
export function uploadFileApi(file: File): AxiosPromise {
const formData = new FormData();
- formData.append('file', file);
+ formData.append("file", file);
return request({
- url: '/api/v1/files',
- method: 'post',
+ url: "/api/v1/files",
+ method: "post",
data: formData,
headers: {
- 'Content-Type': 'multipart/form-data'
- }
+ "Content-Type": "multipart/form-data",
+ },
});
}
@@ -27,8 +27,8 @@ export function uploadFileApi(file: File): AxiosPromise {
*/
export function deleteFileApi(filePath?: string) {
return request({
- url: '/api/v1/files',
- method: 'delete',
- params: { filePath: filePath }
+ url: "/api/v1/files",
+ method: "delete",
+ params: { filePath: filePath },
});
}
diff --git a/src/api/menu/index.ts b/src/api/menu/index.ts
index 78761fc..b28b22e 100644
--- a/src/api/menu/index.ts
+++ b/src/api/menu/index.ts
@@ -1,14 +1,14 @@
-import request from '@/utils/request';
-import { AxiosPromise } from 'axios';
-import { MenuQuery, MenuVO, MenuForm } from './types';
+import request from "@/utils/request";
+import { AxiosPromise } from "axios";
+import { MenuQuery, MenuVO, MenuForm } from "./types";
/**
* 获取路由列表
*/
export function listRoutes() {
return request({
- url: '/api/v1/menus/routes',
- method: 'get'
+ url: "/api/v1/menus/routes",
+ method: "get",
});
}
@@ -19,9 +19,9 @@ export function listRoutes() {
*/
export function listMenus(queryParams: MenuQuery): AxiosPromise {
return request({
- url: '/api/v1/menus',
- method: 'get',
- params: queryParams
+ url: "/api/v1/menus",
+ method: "get",
+ params: queryParams,
});
}
@@ -30,8 +30,8 @@ export function listMenus(queryParams: MenuQuery): AxiosPromise {
*/
export function listMenuOptions(): AxiosPromise {
return request({
- url: '/api/v1/menus/options',
- method: 'get'
+ url: "/api/v1/menus/options",
+ method: "get",
});
}
@@ -42,8 +42,8 @@ export function listMenuOptions(): AxiosPromise {
*/
export function getMenuForm(id: number): AxiosPromise {
return request({
- url: '/api/v1/menus/' + id + '/form',
- method: 'get'
+ url: "/api/v1/menus/" + id + "/form",
+ method: "get",
});
}
@@ -54,9 +54,9 @@ export function getMenuForm(id: number): AxiosPromise {
*/
export function addMenu(data: MenuForm) {
return request({
- url: '/api/v1/menus',
- method: 'post',
- data: data
+ url: "/api/v1/menus",
+ method: "post",
+ data: data,
});
}
@@ -68,9 +68,9 @@ export function addMenu(data: MenuForm) {
*/
export function updateMenu(id: string, data: MenuForm) {
return request({
- url: '/api/v1/menus/' + id,
- method: 'put',
- data: data
+ url: "/api/v1/menus/" + id,
+ method: "put",
+ data: data,
});
}
@@ -81,7 +81,7 @@ export function updateMenu(id: string, data: MenuForm) {
*/
export function deleteMenu(id: number) {
return request({
- url: '/api/v1/menus/' + id,
- method: 'delete'
+ url: "/api/v1/menus/" + id,
+ method: "delete",
});
}
diff --git a/src/api/menu/types.ts b/src/api/menu/types.ts
index 7cbd05e..2ba6c21 100644
--- a/src/api/menu/types.ts
+++ b/src/api/menu/types.ts
@@ -1,4 +1,4 @@
-import { MenuTypeEnum } from '@/enums/MenuTypeEnum';
+import { MenuTypeEnum } from "@/enums/MenuTypeEnum";
/**
* 菜单查询参数类型
diff --git a/src/api/role/index.ts b/src/api/role/index.ts
index e0171d6..f5f93a5 100644
--- a/src/api/role/index.ts
+++ b/src/api/role/index.ts
@@ -1,6 +1,6 @@
-import request from '@/utils/request';
-import { AxiosPromise } from 'axios';
-import { RoleQuery, RolePageResult, RoleForm } from './types';
+import request from "@/utils/request";
+import { AxiosPromise } from "axios";
+import { RoleQuery, RolePageResult, RoleForm } from "./types";
/**
* 获取角色分页数据
@@ -11,9 +11,9 @@ export function getRolePage(
queryParams?: RoleQuery
): AxiosPromise {
return request({
- url: '/api/v1/roles/page',
- method: 'get',
- params: queryParams
+ url: "/api/v1/roles/page",
+ method: "get",
+ params: queryParams,
});
}
@@ -26,9 +26,9 @@ export function listRoleOptions(
queryParams?: RoleQuery
): AxiosPromise {
return request({
- url: '/api/v1/roles/options',
- method: 'get',
- params: queryParams
+ url: "/api/v1/roles/options",
+ method: "get",
+ params: queryParams,
});
}
@@ -39,8 +39,8 @@ export function listRoleOptions(
*/
export function getRoleMenuIds(roleId: number): AxiosPromise {
return request({
- url: '/api/v1/roles/' + roleId + '/menuIds',
- method: 'get'
+ url: "/api/v1/roles/" + roleId + "/menuIds",
+ method: "get",
});
}
@@ -54,9 +54,9 @@ export function updateRoleMenus(
data: number[]
): AxiosPromise {
return request({
- url: '/api/v1/roles/' + roleId + '/menus',
- method: 'put',
- data: data
+ url: "/api/v1/roles/" + roleId + "/menus",
+ method: "put",
+ data: data,
});
}
@@ -67,8 +67,8 @@ export function updateRoleMenus(
*/
export function getRoleForm(id: number): AxiosPromise {
return request({
- url: '/api/v1/roles/' + id + '/form',
- method: 'get'
+ url: "/api/v1/roles/" + id + "/form",
+ method: "get",
});
}
@@ -79,9 +79,9 @@ export function getRoleForm(id: number): AxiosPromise {
*/
export function addRole(data: RoleForm) {
return request({
- url: '/api/v1/roles',
- method: 'post',
- data: data
+ url: "/api/v1/roles",
+ method: "post",
+ data: data,
});
}
@@ -93,9 +93,9 @@ export function addRole(data: RoleForm) {
*/
export function updateRole(id: number, data: RoleForm) {
return request({
- url: '/api/v1/roles/' + id,
- method: 'put',
- data: data
+ url: "/api/v1/roles/" + id,
+ method: "put",
+ data: data,
});
}
@@ -106,7 +106,7 @@ export function updateRole(id: number, data: RoleForm) {
*/
export function deleteRoles(ids: string) {
return request({
- url: '/api/v1/roles/' + ids,
- method: 'delete'
+ url: "/api/v1/roles/" + ids,
+ method: "delete",
});
}
diff --git a/src/api/user/index.ts b/src/api/user/index.ts
index 637ab01..c84113d 100644
--- a/src/api/user/index.ts
+++ b/src/api/user/index.ts
@@ -1,14 +1,14 @@
-import request from '@/utils/request';
-import { AxiosPromise } from 'axios';
-import { UserForm, UserInfo, UserPageVO, UserQuery } from './types';
+import request from "@/utils/request";
+import { AxiosPromise } from "axios";
+import { UserForm, UserInfo, UserPageVO, UserQuery } from "./types";
/**
* 登录成功后获取用户信息(昵称、头像、权限集合和角色集合)
*/
export function getUserInfo(): AxiosPromise {
return request({
- url: '/api/v1/users/me',
- method: 'get'
+ url: "/api/v1/users/me",
+ method: "get",
});
}
@@ -21,9 +21,9 @@ export function getUserPage(
queryParams: UserQuery
): AxiosPromise> {
return request({
- url: '/api/v1/users/page',
- method: 'get',
- params: queryParams
+ url: "/api/v1/users/page",
+ method: "get",
+ params: queryParams,
});
}
@@ -34,8 +34,8 @@ export function getUserPage(
*/
export function getUserForm(userId: number): AxiosPromise {
return request({
- url: '/api/v1/users/' + userId + '/form',
- method: 'get'
+ url: "/api/v1/users/" + userId + "/form",
+ method: "get",
});
}
@@ -46,9 +46,9 @@ export function getUserForm(userId: number): AxiosPromise {
*/
export function addUser(data: any) {
return request({
- url: '/api/v1/users',
- method: 'post',
- data: data
+ url: "/api/v1/users",
+ method: "post",
+ data: data,
});
}
@@ -60,9 +60,9 @@ export function addUser(data: any) {
*/
export function updateUser(id: number, data: UserForm) {
return request({
- url: '/api/v1/users/' + id,
- method: 'put',
- data: data
+ url: "/api/v1/users/" + id,
+ method: "put",
+ data: data,
});
}
@@ -74,9 +74,9 @@ export function updateUser(id: number, data: UserForm) {
*/
export function updateUserStatus(id: number, status: number) {
return request({
- url: '/api/v1/users/' + id + '/status',
- method: 'patch',
- params: { status: status }
+ url: "/api/v1/users/" + id + "/status",
+ method: "patch",
+ params: { status: status },
});
}
@@ -88,9 +88,9 @@ export function updateUserStatus(id: number, status: number) {
*/
export function updateUserPassword(id: number, password: string) {
return request({
- url: '/api/v1/users/' + id + '/password',
- method: 'patch',
- params: { password: password }
+ url: "/api/v1/users/" + id + "/password",
+ method: "patch",
+ params: { password: password },
});
}
@@ -101,8 +101,8 @@ export function updateUserPassword(id: number, password: string) {
*/
export function deleteUsers(ids: string) {
return request({
- url: '/api/v1/users/' + ids,
- method: 'delete'
+ url: "/api/v1/users/" + ids,
+ method: "delete",
});
}
@@ -113,9 +113,9 @@ export function deleteUsers(ids: string) {
*/
export function downloadTemplateApi() {
return request({
- url: '/api/v1/users/template',
- method: 'get',
- responseType: 'arraybuffer'
+ url: "/api/v1/users/template",
+ method: "get",
+ responseType: "arraybuffer",
});
}
@@ -127,10 +127,10 @@ export function downloadTemplateApi() {
*/
export function exportUser(queryParams: UserQuery) {
return request({
- url: '/api/v1/users/_export',
- method: 'get',
+ url: "/api/v1/users/_export",
+ method: "get",
params: queryParams,
- responseType: 'arraybuffer'
+ responseType: "arraybuffer",
});
}
@@ -141,14 +141,14 @@ export function exportUser(queryParams: UserQuery) {
*/
export function importUser(deptId: number, file: File) {
const formData = new FormData();
- formData.append('file', file);
+ formData.append("file", file);
return request({
- url: '/api/v1/users/_import',
- method: 'post',
+ url: "/api/v1/users/_import",
+ method: "post",
params: { deptId: deptId },
data: formData,
headers: {
- 'Content-Type': 'multipart/form-data'
- }
+ "Content-Type": "multipart/form-data",
+ },
});
}
diff --git a/src/components/Dictionary/index.vue b/src/components/Dictionary/index.vue
index 892cc64..9f31942 100644
--- a/src/components/Dictionary/index.vue
+++ b/src/components/Dictionary/index.vue
@@ -11,7 +11,7 @@
:key="option.value"
:label="option.label"
:value="option.value"
- >
+ />
diff --git a/src/components/IconSelect/index.vue b/src/components/IconSelect/index.vue
index bea826d..e4f925f 100644
--- a/src/components/IconSelect/index.vue
+++ b/src/components/IconSelect/index.vue
@@ -89,8 +89,8 @@ onMounted(() => {
class="cursor-pointer text-[#999] absolute right-[10px] top-0 height-[32px] leading-[32px]"
@click="visible = !visible"
>
-
-
+
+
diff --git a/src/components/RightPanel/index.vue b/src/components/RightPanel/index.vue
index 01eb464..9dc5509 100644
--- a/src/components/RightPanel/index.vue
+++ b/src/components/RightPanel/index.vue
@@ -54,7 +54,7 @@ onBeforeUnmount(() => {
diff --git a/src/components/SizeSelect/index.vue b/src/components/SizeSelect/index.vue
index a48f914..f0800ba 100644
--- a/src/components/SizeSelect/index.vue
+++ b/src/components/SizeSelect/index.vue
@@ -1,17 +1,17 @@
diff --git a/src/components/TagInput/util.ts b/src/components/TagInput/util.ts
index 3328db7..f216e31 100644
--- a/src/components/TagInput/util.ts
+++ b/src/components/TagInput/util.ts
@@ -1,34 +1,34 @@
/**
* getRePosFromStr 正则匹配字段返回位置信息
* */
-export function getRePosFromStr(text: any = '', re: any = /\$.+?\$/g) {
- const lines = text.split('\n')
- const positions: any = []
- let m
- for (let i = 0; i < lines.length; i++) {
- const l = lines[i]
- while ((m = re.exec(l)) !== null) {
- var tag = m[0].substring(1, m[0].length - 1)
- positions.push({
- line: i,
- start: m.index,
- stop: m.index + m[0].length,
- tag,
- })
- }
+export function getRePosFromStr(text: any = "", re: any = /\$.+?\$/g) {
+ const lines = text.split("\n");
+ const positions: any = [];
+ let m;
+ for (let i = 0; i < lines.length; i++) {
+ const l = lines[i];
+ while ((m = re.exec(l)) !== null) {
+ const tag = m[0].substring(1, m[0].length - 1);
+ positions.push({
+ line: i,
+ start: m.index,
+ stop: m.index + m[0].length,
+ tag,
+ });
}
- return positions
+ }
+ return positions;
}
/**
* 输入框模式
*/
export enum MODE {
- // 文本
- TEXT = 1,
- // 公式
- FORMULA,
- // 只允许选择tag
- ONLYTAG,
- // 日期
- DATE
-}
\ No newline at end of file
+ // 文本
+ TEXT = 1,
+ // 公式
+ FORMULA,
+ // 只允许选择tag
+ ONLYTAG,
+ // 日期
+ DATE,
+}
diff --git a/src/components/WangEditor/index.vue b/src/components/WangEditor/index.vue
index cdd6dec..2f4c678 100644
--- a/src/components/WangEditor/index.vue
+++ b/src/components/WangEditor/index.vue
@@ -71,4 +71,4 @@ onBeforeUnmount(() => {
});
-
\ No newline at end of file
+
diff --git a/src/directive/index.ts b/src/directive/index.ts
index 960fa44..9c22eb6 100644
--- a/src/directive/index.ts
+++ b/src/directive/index.ts
@@ -1,9 +1,9 @@
-import type { App } from 'vue';
+import type { App } from "vue";
-import { hasPerm } from './permission';
+import { hasPerm } from "./permission";
// 全局注册 directive
export function setupDirective(app: App) {
// 使 v-hasPerm 在所有组件中都可用
- app.directive('hasPerm', hasPerm);
+ app.directive("hasPerm", hasPerm);
}
diff --git a/src/directive/permission/index.ts b/src/directive/permission/index.ts
index b8d0dee..11d3206 100644
--- a/src/directive/permission/index.ts
+++ b/src/directive/permission/index.ts
@@ -1,5 +1,5 @@
-import { useUserStoreHook } from '@/store/modules/user';
-import { Directive, DirectiveBinding } from 'vue';
+import { useUserStoreHook } from "@/store/modules/user";
+import { Directive, DirectiveBinding } from "vue";
/**
* 按钮权限
@@ -8,7 +8,7 @@ export const hasPerm: Directive = {
mounted(el: HTMLElement, binding: DirectiveBinding) {
// 「超级管理员」拥有所有的按钮权限
const { roles, perms } = useUserStoreHook();
- if (roles.includes('ROOT')) {
+ if (roles.includes("ROOT")) {
return true;
}
// 「其他角色」按钮权限校验
@@ -16,7 +16,7 @@ export const hasPerm: Directive = {
if (value) {
const requiredPerms = value; // DOM绑定需要的按钮权限标识
- const hasPerm = perms?.some(perm => {
+ const hasPerm = perms?.some((perm) => {
return requiredPerms.includes(perm);
});
@@ -28,7 +28,7 @@ export const hasPerm: Directive = {
"need perms! Like v-has-perm=\"['sys:user:add','sys:user:edit']\""
);
}
- }
+ },
};
/**
@@ -41,7 +41,7 @@ export const hasRole: Directive = {
if (value) {
const requiredRoles = value; // DOM绑定需要的角色编码
const { roles } = useUserStoreHook();
- const hasRole = roles.some(perm => {
+ const hasRole = roles.some((perm) => {
return requiredRoles.includes(perm);
});
@@ -51,5 +51,5 @@ export const hasRole: Directive = {
} else {
throw new Error("need roles! Like v-has-role=\"['admin','test']\"");
}
- }
+ },
};
diff --git a/src/enums/MenuTypeEnum.ts b/src/enums/MenuTypeEnum.ts
index 96c612e..65e591d 100644
--- a/src/enums/MenuTypeEnum.ts
+++ b/src/enums/MenuTypeEnum.ts
@@ -2,18 +2,18 @@ export enum MenuTypeEnum {
/**
* 目录
*/
- CATALOG = 'CATALOG',
+ CATALOG = "CATALOG",
/**
* 菜单
*/
- MENU = 'MENU',
+ MENU = "MENU",
/**
* 按钮
*/
- BUTTON = 'BUTTON',
+ BUTTON = "BUTTON",
/**
* 外链
*/
- EXTLINK = 'EXTLINK'
+ EXTLINK = "EXTLINK",
}
diff --git a/src/lang/index.ts b/src/lang/index.ts
index 7f3ad89..18c0231 100644
--- a/src/lang/index.ts
+++ b/src/lang/index.ts
@@ -1,25 +1,25 @@
-import { createI18n } from 'vue-i18n';
-import { useAppStore } from '@/store/modules/app';
+import { createI18n } from "vue-i18n";
+import { useAppStore } from "@/store/modules/app";
+// 本地语言包
+import enLocale from "./package/en";
+import zhCnLocale from "./package/zh-cn";
const appStore = useAppStore();
-// 本地语言包
-import enLocale from './package/en';
-import zhCnLocale from './package/zh-cn';
const messages = {
- 'zh-cn': {
- ...zhCnLocale
+ "zh-cn": {
+ ...zhCnLocale,
},
en: {
- ...enLocale
- }
+ ...enLocale,
+ },
};
const i18n = createI18n({
legacy: false,
locale: appStore.language,
messages: messages,
- globalInjection: true
+ globalInjection: true,
});
export default i18n;
diff --git a/src/lang/package/en.ts b/src/lang/package/en.ts
index 6213eb2..a154742 100644
--- a/src/lang/package/en.ts
+++ b/src/lang/package/en.ts
@@ -1,22 +1,22 @@
export default {
// 路由国际化
route: {
- dashboard: 'Dashboard',
- document: 'Document'
+ dashboard: "Dashboard",
+ document: "Document",
},
// 登录页面国际化
login: {
- title: 'vue3-element-admin',
- username: 'Username',
- password: 'Password',
- login: 'Login',
- verifyCode: 'Verify Code',
+ title: "vue3-element-admin",
+ username: "Username",
+ password: "Password",
+ login: "Login",
+ verifyCode: "Verify Code",
},
// 导航栏国际化
navbar: {
- dashboard: 'Dashboard',
- logout: 'Logout',
- document: 'Document',
- gitee: 'Gitee'
- }
+ dashboard: "Dashboard",
+ logout: "Logout",
+ document: "Document",
+ gitee: "Gitee",
+ },
};
diff --git a/src/lang/package/zh-cn.ts b/src/lang/package/zh-cn.ts
index 3d235d5..e3bb63a 100644
--- a/src/lang/package/zh-cn.ts
+++ b/src/lang/package/zh-cn.ts
@@ -1,22 +1,22 @@
export default {
// 路由国际化
route: {
- dashboard: '首页',
- document: '项目文档'
+ dashboard: "首页",
+ document: "项目文档",
},
// 登录页面国际化
login: {
- title: 'vue3-element-admin',
- username: '用户名',
- password: '密码',
- login: '登 录',
- verifyCode: '验证码'
+ title: "vue3-element-admin",
+ username: "用户名",
+ password: "密码",
+ login: "登 录",
+ verifyCode: "验证码",
},
// 导航栏国际化
navbar: {
- dashboard: '首页',
- logout: '注销',
- document: '项目文档',
- gitee: '码云'
- }
+ dashboard: "首页",
+ logout: "注销",
+ document: "项目文档",
+ gitee: "码云",
+ },
};
diff --git a/src/layout/components/Settings/index.vue b/src/layout/components/Settings/index.vue
index c1a0451..26daa54 100644
--- a/src/layout/components/Settings/index.vue
+++ b/src/layout/components/Settings/index.vue
@@ -84,7 +84,7 @@ onMounted(() => {
class="inline-block w-[30px] h-[30px] cursor-pointer"
:style="{ background: color }"
@click="changeThemeColor(color)"
- />
+ >
导航设置
@@ -98,8 +98,8 @@ onMounted(() => {
"
@click="changeLayout('left')"
>
-
-
+
+
@@ -110,8 +110,8 @@ onMounted(() => {
"
@click="changeLayout('top')"
>
-
-
+
+
@@ -122,8 +122,8 @@ onMounted(() => {
"
@click="changeLayout('mix')"
>
-
-
+
+
diff --git a/src/layout/components/Sidebar/Link.vue b/src/layout/components/Sidebar/Link.vue
index 8e9337c..fb1516d 100644
--- a/src/layout/components/Sidebar/Link.vue
+++ b/src/layout/components/Sidebar/Link.vue
@@ -1,9 +1,10 @@
diff --git a/src/views/demo/websocket.vue b/src/views/demo/websocket.vue
index 72f7207..ce54afc 100644
--- a/src/views/demo/websocket.vue
+++ b/src/views/demo/websocket.vue
@@ -1,18 +1,18 @@
-
diff --git a/src/views/permission/page.vue b/src/views/permission/page.vue
new file mode 100644
index 0000000..3890129
--- /dev/null
+++ b/src/views/permission/page.vue
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
diff --git a/src/views/redirect/index.vue b/src/views/redirect/index.vue
index 47cad96..4215bf6 100644
--- a/src/views/redirect/index.vue
+++ b/src/views/redirect/index.vue
@@ -1,9 +1,9 @@
-
+
diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index 7f8f4f9..e3adfc4 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -1,9 +1,4 @@