新增一套主题geeker;优化路径别名引用,增加preload预加载内容
This commit is contained in:
parent
82f452193f
commit
cceffc112c
@ -68,5 +68,68 @@ export const preloads = {
|
|||||||
"element-plus/es/components/color-picker/style/css",
|
"element-plus/es/components/color-picker/style/css",
|
||||||
"element-plus/es/components/backtop/style/css",
|
"element-plus/es/components/backtop/style/css",
|
||||||
"element-plus/es/components/message-box/style/css",
|
"element-plus/es/components/message-box/style/css",
|
||||||
|
"element-plus/es/components/container/style/css",
|
||||||
|
"element-plus/es/components/header/style/css",
|
||||||
|
"element-plus/es/components/aside/style/css",
|
||||||
|
"element-plus/es/components/main/style/css",
|
||||||
|
"element-plus/es/components/empty/style/css",
|
||||||
|
"element-plus/es/components/empty/style/css",
|
||||||
|
"element-plus/es",
|
||||||
|
"element-plus/es/components/base/style/css",
|
||||||
|
"element-plus/es/components/footer/style/css",
|
||||||
|
"element-plus/es/components/badge/style/css",
|
||||||
|
"element-plus/es/components/image-viewer/style/css",
|
||||||
|
"element-plus/es/components/space/style/css",
|
||||||
|
"element-plus/es/components/descriptions/style/css",
|
||||||
|
"element-plus/es/components/descriptions-item/style/css",
|
||||||
|
"element-plus/es/components/time-picker/style/css",
|
||||||
|
"element-plus/dist/locale/en.min",
|
||||||
|
"element-plus/dist/locale/zh-cn.min",
|
||||||
|
"mitt",
|
||||||
|
"screenfull",
|
||||||
|
"dayjs",
|
||||||
|
"driver.js",
|
||||||
|
"echarts/core",
|
||||||
|
"echarts/charts",
|
||||||
|
"echarts/components",
|
||||||
|
"echarts/features",
|
||||||
|
"echarts/renderers",
|
||||||
|
"echarts-liquidfill",
|
||||||
|
"pinia-plugin-persistedstate",
|
||||||
|
"qs",
|
||||||
|
"vuedraggable",
|
||||||
|
"@univerjs/core",
|
||||||
|
"@univerjs/design",
|
||||||
|
"@univerjs/docs",
|
||||||
|
"@univerjs/docs-ui",
|
||||||
|
"@univerjs/engine-formula",
|
||||||
|
"@univerjs/engine-render",
|
||||||
|
"@univerjs/sheets",
|
||||||
|
"@univerjs/sheets-formula",
|
||||||
|
"@univerjs/sheets-ui",
|
||||||
|
"@univerjs/ui",
|
||||||
|
"@univerjs/facade",
|
||||||
|
"@univerjs/sheets-zen-editor",
|
||||||
|
"@univerjs/sheets-hyper-link",
|
||||||
|
"@univerjs/sheets-hyper-link-ui",
|
||||||
|
"@univerjs/drawing",
|
||||||
|
"@univerjs/drawing-ui",
|
||||||
|
"@univerjs/sheets-drawing",
|
||||||
|
"@univerjs/sheets-drawing-ui",
|
||||||
|
"@univerjs/find-replace",
|
||||||
|
"@univerjs/sheets-find-replace",
|
||||||
|
"@univerjs/sheets-filter",
|
||||||
|
"@univerjs/sheets-filter-ui",
|
||||||
|
"@univerjs/sheets-sort",
|
||||||
|
"@univerjs/sheets-sort-ui",
|
||||||
|
"@univerjs/data-validation",
|
||||||
|
"@univerjs/sheets-data-validation",
|
||||||
|
"@univerjs/sheets-conditional-formatting",
|
||||||
|
"@univerjs/sheets-conditional-formatting-ui",
|
||||||
|
"@univerjs/sheets-numfmt",
|
||||||
|
"@univerjs/thread-comment-ui",
|
||||||
|
"@univerjs/thread-comment",
|
||||||
|
"@univerjs/sheets-thread-comment-base",
|
||||||
|
"@univerjs/sheets-thread-comment"
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import vuePlugin from "@vitejs/plugin-vue";
|
|||||||
import vueJsx from "@vitejs/plugin-vue-jsx";
|
import vueJsx from "@vitejs/plugin-vue-jsx";
|
||||||
import viteIkarosTools from "./plugin/vite-ikaros-tools";
|
import viteIkarosTools from "./plugin/vite-ikaros-tools";
|
||||||
import {getConfig} from "./utils";
|
import {getConfig} from "./utils";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自动引用功能
|
* 自动引用功能
|
||||||
@ -41,11 +42,15 @@ import pkg from "../package.json";
|
|||||||
const __APP_INFO__ = {
|
const __APP_INFO__ = {
|
||||||
pkg: pkg,
|
pkg: pkg,
|
||||||
buildTimestamp: Date.now(),
|
buildTimestamp: Date.now(),
|
||||||
|
lastBuildTime: dayjs().format("YYYY-MM-DD HH:mm:ss")
|
||||||
};
|
};
|
||||||
|
|
||||||
const root = resolve("src/renderer");
|
const root = resolve("src/renderer");
|
||||||
const src = resolve("src");
|
const src = resolve("src");
|
||||||
const theme: string = resolve("src/renderer/themes/default");
|
// const theme: string = resolve("src/renderer/themes/default");
|
||||||
|
const theme: string = resolve("src/renderer/themes/geeker");
|
||||||
|
const themeGeeker: string = resolve("src/renderer/themes/geeker");
|
||||||
|
const themeDefault: string = resolve("src/renderer/themes/default");
|
||||||
const mode = config && config.NODE_ENV;
|
const mode = config && config.NODE_ENV;
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@ -67,7 +72,9 @@ export default defineConfig({
|
|||||||
"@renderer": root,
|
"@renderer": root,
|
||||||
"@src": src,
|
"@src": src,
|
||||||
"@store": join(root, "/store/modules"),
|
"@store": join(root, "/store/modules"),
|
||||||
"@theme": theme
|
"@theme": theme,
|
||||||
|
"@themeDefault": themeDefault,
|
||||||
|
"@themeGeeker": themeGeeker,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
base: "./",
|
base: "./",
|
||||||
@ -87,7 +94,8 @@ export default defineConfig({
|
|||||||
scss: {
|
scss: {
|
||||||
javascriptEnabled: true,
|
javascriptEnabled: true,
|
||||||
additionalData: `
|
additionalData: `
|
||||||
@use "@theme/styles/variables.scss" as *;
|
@use "@themeDefault/styles/variables.scss" as *;
|
||||||
|
// @use "@themeGeeker/styles/var.scss" as *;
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -117,13 +125,6 @@ export default defineConfig({
|
|||||||
// 自动导入图标组件
|
// 自动导入图标组件
|
||||||
IconsResolver({}),
|
IconsResolver({}),
|
||||||
],
|
],
|
||||||
eslintrc: {
|
|
||||||
// 是否自动生成 eslint 规则,建议生成之后设置 false
|
|
||||||
enabled: true,
|
|
||||||
// 指定自动导入函数 eslint 规则的文件
|
|
||||||
filepath: "../.eslintrc-auto-import.json",
|
|
||||||
globalsPropValue: true,
|
|
||||||
},
|
|
||||||
// 是否在 vue 模板中自动导入
|
// 是否在 vue 模板中自动导入
|
||||||
vueTemplate: true,
|
vueTemplate: true,
|
||||||
// 指定自动导入函数TS类型声明文件路径 (false:关闭自动生成)
|
// 指定自动导入函数TS类型声明文件路径 (false:关闭自动生成)
|
||||||
@ -146,7 +147,8 @@ export default defineConfig({
|
|||||||
* 指定自定义组件位置(默认:src/components)
|
* 指定自定义组件位置(默认:src/components)
|
||||||
* TBD: resolve("@theme/components"),测试用法,效果未知
|
* TBD: resolve("@theme/components"),测试用法,效果未知
|
||||||
*/
|
*/
|
||||||
dirs: ["src/components", join(theme, "/components"), join(theme, "/**/components")],
|
// dirs: ["src/components", join(theme, "/components"), join(theme, "/**/components")],
|
||||||
|
dirs: ["src/components", join(themeDefault, "/components"), join(themeDefault, "/**/components"),"src/**/components"],
|
||||||
// 指定自动导入组件TS类型声明文件路径 (false:关闭自动生成)
|
// 指定自动导入组件TS类型声明文件路径 (false:关闭自动生成)
|
||||||
// dts: false,
|
// dts: false,
|
||||||
dts: "fixTypes/components.d.ts",
|
dts: "fixTypes/components.d.ts",
|
||||||
@ -157,7 +159,7 @@ export default defineConfig({
|
|||||||
}),
|
}),
|
||||||
createSvgIconsPlugin({
|
createSvgIconsPlugin({
|
||||||
// 指定需要缓存的图标文件夹
|
// 指定需要缓存的图标文件夹
|
||||||
iconDirs: [join(theme, "assets/icons")],
|
iconDirs: [join(themeDefault, "assets/icons"),join(themeGeeker, "assets/icons"),"@renderer/assets/icons"],
|
||||||
// 指定symbolId格式
|
// 指定symbolId格式
|
||||||
symbolId: "icon-[dir]-[name]",
|
symbolId: "icon-[dir]-[name]",
|
||||||
}),
|
}),
|
||||||
|
21
.vscode/settings.json
vendored
21
.vscode/settings.json
vendored
@ -9,5 +9,22 @@
|
|||||||
"**/node_modules": true
|
"**/node_modules": true
|
||||||
},
|
},
|
||||||
"npm.packageManager": "yarn",
|
"npm.packageManager": "yarn",
|
||||||
"workbench.editor.highlightModifiedTabs": true
|
"workbench.editor.highlightModifiedTabs": true,
|
||||||
}
|
"cSpell.words": [
|
||||||
|
"clsx",
|
||||||
|
"geeker",
|
||||||
|
"iconfont",
|
||||||
|
"Ikaros",
|
||||||
|
"ISWEB",
|
||||||
|
"notheme",
|
||||||
|
"nprogress",
|
||||||
|
"numfmt",
|
||||||
|
"pinia",
|
||||||
|
"univer",
|
||||||
|
"univerjs",
|
||||||
|
"unocss",
|
||||||
|
"unplugin",
|
||||||
|
"vueuse",
|
||||||
|
"wangeditor"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
# 2024.09.14
|
||||||
|
- 新增一套主题geeker,
|
||||||
|
- 优化了主题目录别名写法,减少让切换主题时需要修改的东西,现在只需要在index.html页面里修改主题名称指向即可。(修改缓存值)
|
||||||
|
- 增加需要preload加载的具体内容,减少页面闪屏。
|
||||||
|
|
||||||
# 2024.09.07
|
# 2024.09.07
|
||||||
|
|
||||||
- 新增已知问题:
|
- 新增已知问题:
|
||||||
|
@ -39,6 +39,12 @@ npm run build
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# 关于开发修改的一些前置说明
|
||||||
|
- 本框架示范了集成多个自定义主题(themes/目录),但实际应只需要一个就可以的。因此,根据自己的项目调整,保留一个合适,再在其基础上优化,就可以了。
|
||||||
|
- 调整自定义主题涉及到多处配置文件的修改,主要是tsconfig.json中的路径别名与vite.config.mts中的路径别名。
|
||||||
|
- 另外,如果需要兼顾web端的话,建议在web端也对路径及别名,做相应的调整,实现一处开发、两处可用。(主旨就是 web端的开发,让项目文件夹目录级别,保持与本electron框架的目录级别一致,然后调整相应的路径别名引用)
|
||||||
---
|
---
|
||||||
# [文件目录说明](DIR.md)
|
# [文件目录说明](DIR.md)
|
||||||
# [更新日志](./CHANGELOG.md)
|
# [更新日志](./CHANGELOG.md)
|
||||||
|
27
env/dev.env
vendored
27
env/dev.env
vendored
@ -9,3 +9,30 @@ REMOTE_API_URL='http://api.frame.sass.hiluker.cn'
|
|||||||
# 开发接口地址
|
# 开发接口地址
|
||||||
# REMOTE_API_URL='http://127.0.0.1:8989'
|
# REMOTE_API_URL='http://127.0.0.1:8989'
|
||||||
REMOTE_SERVER=false
|
REMOTE_SERVER=false
|
||||||
|
|
||||||
|
# 以下是配合geeker主题做的配置
|
||||||
|
# title
|
||||||
|
VITE_GLOB_APP_TITLE=Geeker Admin
|
||||||
|
|
||||||
|
# 本地环境
|
||||||
|
VITE_USER_NODE_ENV=development
|
||||||
|
|
||||||
|
# 公共基础路径
|
||||||
|
VITE_PUBLIC_PATH=/
|
||||||
|
|
||||||
|
# 路由模式
|
||||||
|
# Optional: hash | history
|
||||||
|
VITE_ROUTER_MODE=hash
|
||||||
|
|
||||||
|
# 打包时是否删除 console
|
||||||
|
VITE_DROP_CONSOLE=true
|
||||||
|
|
||||||
|
# 是否开启 VitePWA
|
||||||
|
VITE_PWA=false
|
||||||
|
|
||||||
|
# 开发环境接口地址
|
||||||
|
#VITE_API_URL=/api
|
||||||
|
VITE_API_URL=https://mock.mengxuegu.com/mock/629d727e6163854a32e8307e
|
||||||
|
|
||||||
|
# 开发环境跨域代理,支持配置多个
|
||||||
|
VITE_PROXY=[["/api","https://mock.mengxuegu.com/mock/629d727e6163854a32e8307e"]]
|
||||||
|
36
env/prod.env
vendored
36
env/prod.env
vendored
@ -1,2 +1,38 @@
|
|||||||
BASE_API='http://127.0.0.1:25565'
|
BASE_API='http://127.0.0.1:25565'
|
||||||
NODE_ENV='production'
|
NODE_ENV='production'
|
||||||
|
|
||||||
|
# 远程服务
|
||||||
|
REMOTE_PORT=3000
|
||||||
|
REMOTE_API='/api/v1/'
|
||||||
|
# 线上接口地址
|
||||||
|
REMOTE_API_URL='http://api.frame.sass.hiluker.cn'
|
||||||
|
# 开发接口地址
|
||||||
|
# REMOTE_API_URL='http://127.0.0.1:8989'
|
||||||
|
REMOTE_SERVER=false
|
||||||
|
|
||||||
|
# 以下是配合geeker主题做的配置
|
||||||
|
# 线上环境
|
||||||
|
VITE_USER_NODE_ENV=production
|
||||||
|
|
||||||
|
# 公共基础路径
|
||||||
|
VITE_PUBLIC_PATH=/
|
||||||
|
|
||||||
|
# 路由模式
|
||||||
|
# Optional: hash | history
|
||||||
|
VITE_ROUTER_MODE=hash
|
||||||
|
|
||||||
|
# 是否启用 gzip 或 brotli 压缩打包,如果需要多个压缩规则,可以使用 “,” 分隔
|
||||||
|
# Optional: gzip | brotli | none
|
||||||
|
VITE_BUILD_COMPRESS = none
|
||||||
|
|
||||||
|
# 打包压缩后是否删除源文件
|
||||||
|
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
|
||||||
|
|
||||||
|
# 打包时是否删除 console
|
||||||
|
VITE_DROP_CONSOLE = true
|
||||||
|
|
||||||
|
# 是否开启 VitePWA
|
||||||
|
VITE_PWA = true
|
||||||
|
|
||||||
|
# 线上环境接口地址
|
||||||
|
VITE_API_URL="https://mock.mengxuegu.com/mock/629d727e6163854a32e8307e"
|
||||||
|
@ -72,7 +72,9 @@
|
|||||||
"csstype": "^3.1.3",
|
"csstype": "^3.1.3",
|
||||||
"date-fns": "^3.6.0",
|
"date-fns": "^3.6.0",
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
|
"driver.js": "^1.3.1",
|
||||||
"echarts": "^5.5.1",
|
"echarts": "^5.5.1",
|
||||||
|
"echarts-liquidfill": "^3.1.0",
|
||||||
"electron-log": "^5.1.7",
|
"electron-log": "^5.1.7",
|
||||||
"electron-updater": "^6.2.1",
|
"electron-updater": "^6.2.1",
|
||||||
"electron_updater_node_cli": "^0.3.3",
|
"electron_updater_node_cli": "^0.3.3",
|
||||||
@ -85,8 +87,10 @@
|
|||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"path-browserify": "^1.0.1",
|
"path-browserify": "^1.0.1",
|
||||||
"pinia": "^2.2.2",
|
"pinia": "^2.2.2",
|
||||||
|
"pinia-plugin-persistedstate": "^3.2.3",
|
||||||
"regedit": "^5.1.3",
|
"regedit": "^5.1.3",
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
|
"screenfull": "^6.0.2",
|
||||||
"semver": "^7.6.3",
|
"semver": "^7.6.3",
|
||||||
"sockjs-client": "^1.6.1",
|
"sockjs-client": "^1.6.1",
|
||||||
"sortablejs": "^1.15.3",
|
"sortablejs": "^1.15.3",
|
||||||
@ -96,6 +100,7 @@
|
|||||||
"vue": "^3.4.21",
|
"vue": "^3.4.21",
|
||||||
"vue-i18n": "9.14.0",
|
"vue-i18n": "9.14.0",
|
||||||
"vue-router": "^4.4.3",
|
"vue-router": "^4.4.3",
|
||||||
|
"vuedraggable": "^2.24.3",
|
||||||
"webstomp-client": "^1.2.6",
|
"webstomp-client": "^1.2.6",
|
||||||
"ws": "^8.18.0"
|
"ws": "^8.18.0"
|
||||||
},
|
},
|
||||||
@ -160,6 +165,7 @@
|
|||||||
"unplugin-icons": "^0.18.5",
|
"unplugin-icons": "^0.18.5",
|
||||||
"unplugin-vue-components": "^0.26.0",
|
"unplugin-vue-components": "^0.26.0",
|
||||||
"vite": "^5.4.1",
|
"vite": "^5.4.1",
|
||||||
|
"vite-plugin-pwa": "^0.20.5",
|
||||||
"vite-plugin-svg-icons": "^2.0.1",
|
"vite-plugin-svg-icons": "^2.0.1",
|
||||||
"vite-plugin-vue-devtools": "^7.3.0"
|
"vite-plugin-vue-devtools": "^7.3.0"
|
||||||
},
|
},
|
||||||
|
@ -29,11 +29,11 @@ function onAppReady() {
|
|||||||
app.whenReady().then(onAppReady)
|
app.whenReady().then(onAppReady)
|
||||||
|
|
||||||
//禁止程序多开;需要单例锁的时候用
|
//禁止程序多开;需要单例锁的时候用
|
||||||
const gotTheLock = app.requestSingleInstanceLock()
|
// const gotTheLock = app.requestSingleInstanceLock()
|
||||||
if (!gotTheLock) {
|
// if (!gotTheLock) {
|
||||||
console.log("检测到应用单例锁")
|
// console.log("检测到应用单例锁")
|
||||||
app.quit()
|
// app.quit()
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 由于9.x版本问题,需要加入该配置关闭跨域问题
|
// 由于9.x版本问题,需要加入该配置关闭跨域问题
|
||||||
app.commandLine.appendSwitch('disable-features', 'OutOfBlinkCors')
|
app.commandLine.appendSwitch('disable-features', 'OutOfBlinkCors')
|
||||||
|
2
src/renderer/fixTypes/auto-imports.d.ts
vendored
2
src/renderer/fixTypes/auto-imports.d.ts
vendored
@ -302,8 +302,6 @@ declare module 'vue' {
|
|||||||
interface GlobalComponents {}
|
interface GlobalComponents {}
|
||||||
interface ComponentCustomProperties {
|
interface ComponentCustomProperties {
|
||||||
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
||||||
readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']>
|
|
||||||
readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']>
|
|
||||||
readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
|
readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
|
||||||
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
|
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
|
||||||
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
|
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
|
||||||
|
62
src/renderer/fixTypes/components.d.ts
vendored
62
src/renderer/fixTypes/components.d.ts
vendored
@ -7,14 +7,28 @@ export {}
|
|||||||
|
|
||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
|
403: typeof import('./../themes/geeker/components/ErrorMessage/403.vue')['default']
|
||||||
|
404: typeof import('./../themes/geeker/components/ErrorMessage/404.vue')['default']
|
||||||
|
500: typeof import('./../themes/geeker/components/ErrorMessage/500.vue')['default']
|
||||||
|
AgeRatioChart: typeof import('./../themes/geeker/views/dataScreen/components/AgeRatioChart.vue')['default']
|
||||||
|
AnnualUseChart: typeof import('./../themes/geeker/views/dataScreen/components/AnnualUseChart.vue')['default']
|
||||||
AppLink: typeof import('./../themes/default/components/AppLink/index.vue')['default']
|
AppLink: typeof import('./../themes/default/components/AppLink/index.vue')['default']
|
||||||
AppMain: typeof import('./../themes/default/layout/components/AppMain/index.vue')['default']
|
AppMain: typeof import('./../themes/default/layout/components/AppMain/index.vue')['default']
|
||||||
|
AssemblySize: typeof import('./../themes/geeker/layouts/components/Header/components/AssemblySize.vue')['default']
|
||||||
|
Avatar: typeof import('./../themes/geeker/layouts/components/Header/components/Avatar.vue')['default']
|
||||||
Breadcrumb: typeof import('./../themes/default/components/Breadcrumb/index.vue')['default']
|
Breadcrumb: typeof import('./../themes/default/components/Breadcrumb/index.vue')['default']
|
||||||
|
ChinaMapChart: typeof import('./../themes/geeker/views/dataScreen/components/ChinaMapChart.vue')['default']
|
||||||
|
CollapseIcon: typeof import('./../themes/geeker/layouts/components/Header/components/CollapseIcon.vue')['default']
|
||||||
|
ColSetting: typeof import('./../themes/geeker/components/ProTable/components/ColSetting.vue')['default']
|
||||||
CopyButton: typeof import('./../themes/default/components/CopyButton/index.vue')['default']
|
CopyButton: typeof import('./../themes/default/components/CopyButton/index.vue')['default']
|
||||||
|
Curve: typeof import('./../themes/geeker/views/dashboard/dataVisualize/components/curve.vue')['default']
|
||||||
DeptTree: typeof import('./../themes/default/views/system/user/components/dept-tree.vue')['default']
|
DeptTree: typeof import('./../themes/default/views/system/user/components/dept-tree.vue')['default']
|
||||||
Dictionary: typeof import('./../themes/default/components/Dictionary/index.vue')['default']
|
Dictionary: typeof import('./../themes/default/components/Dictionary/index.vue')['default']
|
||||||
|
ECharts: typeof import('./../themes/geeker/components/ECharts/index.vue')['default']
|
||||||
ElAlert: typeof import('element-plus/es')['ElAlert']
|
ElAlert: typeof import('element-plus/es')['ElAlert']
|
||||||
|
ElAside: typeof import('element-plus/es')['ElAside']
|
||||||
ElBacktop: typeof import('element-plus/es')['ElBacktop']
|
ElBacktop: typeof import('element-plus/es')['ElBacktop']
|
||||||
|
ElBadge: typeof import('element-plus/es')['ElBadge']
|
||||||
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||||
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||||
ElButton: typeof import('element-plus/es')['ElButton']
|
ElButton: typeof import('element-plus/es')['ElButton']
|
||||||
@ -24,20 +38,28 @@ declare module 'vue' {
|
|||||||
ElCol: typeof import('element-plus/es')['ElCol']
|
ElCol: typeof import('element-plus/es')['ElCol']
|
||||||
ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
|
ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
|
||||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||||
|
ElContainer: typeof import('element-plus/es')['ElContainer']
|
||||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||||
|
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
|
||||||
|
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
|
||||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||||
ElDivider: typeof import('element-plus/es')['ElDivider']
|
ElDivider: typeof import('element-plus/es')['ElDivider']
|
||||||
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
||||||
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
||||||
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
||||||
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
||||||
|
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
||||||
|
ElFooter: typeof import('element-plus/es')['ElFooter']
|
||||||
ElForm: typeof import('element-plus/es')['ElForm']
|
ElForm: typeof import('element-plus/es')['ElForm']
|
||||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||||
|
ElHeader: typeof import('element-plus/es')['ElHeader']
|
||||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||||
ElImage: typeof import('element-plus/es')['ElImage']
|
ElImage: typeof import('element-plus/es')['ElImage']
|
||||||
|
ElImageViewer: typeof import('element-plus/es')['ElImageViewer']
|
||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
ElInput: typeof import('element-plus/es')['ElInput']
|
||||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||||
ElLink: typeof import('element-plus/es')['ElLink']
|
ElLink: typeof import('element-plus/es')['ElLink']
|
||||||
|
ElMain: typeof import('element-plus/es')['ElMain']
|
||||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||||
ElOption: typeof import('element-plus/es')['ElOption']
|
ElOption: typeof import('element-plus/es')['ElOption']
|
||||||
@ -50,6 +72,7 @@ declare module 'vue' {
|
|||||||
ElRow: typeof import('element-plus/es')['ElRow']
|
ElRow: typeof import('element-plus/es')['ElRow']
|
||||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||||
|
ElSpace: typeof import('element-plus/es')['ElSpace']
|
||||||
ElStatistic: typeof import('element-plus/es')['ElStatistic']
|
ElStatistic: typeof import('element-plus/es')['ElStatistic']
|
||||||
ElSubmenu: typeof import('element-plus/es')['ElSubmenu']
|
ElSubmenu: typeof import('element-plus/es')['ElSubmenu']
|
||||||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||||
@ -60,13 +83,19 @@ declare module 'vue' {
|
|||||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||||
ElTag: typeof import('element-plus/es')['ElTag']
|
ElTag: typeof import('element-plus/es')['ElTag']
|
||||||
ElText: typeof import('element-plus/es')['ElText']
|
ElText: typeof import('element-plus/es')['ElText']
|
||||||
|
ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
|
||||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
ElTree: typeof import('element-plus/es')['ElTree']
|
ElTree: typeof import('element-plus/es')['ElTree']
|
||||||
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||||
ElWatermark: typeof import('element-plus/es')['ElWatermark']
|
ElWatermark: typeof import('element-plus/es')['ElWatermark']
|
||||||
|
Footer: typeof import('./../themes/geeker/layouts/components/Footer/index.vue')['default']
|
||||||
|
Fullscreen: typeof import('./../themes/geeker/layouts/components/Header/components/Fullscreen.vue')['default']
|
||||||
GithubCorner: typeof import('./../themes/default/components/GithubCorner/index.vue')['default']
|
GithubCorner: typeof import('./../themes/default/components/GithubCorner/index.vue')['default']
|
||||||
|
Grid: typeof import('./../themes/geeker/components/Grid/index.vue')['default']
|
||||||
|
GridItem: typeof import('./../themes/geeker/components/Grid/components/GridItem.vue')['default']
|
||||||
Hamburger: typeof import('./../themes/default/components/Hamburger/index.vue')['default']
|
Hamburger: typeof import('./../themes/default/components/Hamburger/index.vue')['default']
|
||||||
|
HotPlateChart: typeof import('./../themes/geeker/views/dataScreen/components/HotPlateChart.vue')['default']
|
||||||
IconSelect: typeof import('./../themes/default/components/IconSelect/index.vue')['default']
|
IconSelect: typeof import('./../themes/default/components/IconSelect/index.vue')['default']
|
||||||
IEpArrowDown: typeof import('~icons/ep/arrow-down')['default']
|
IEpArrowDown: typeof import('~icons/ep/arrow-down')['default']
|
||||||
IEpArrowUp: typeof import('~icons/ep/arrow-up')['default']
|
IEpArrowUp: typeof import('~icons/ep/arrow-up')['default']
|
||||||
@ -84,19 +113,42 @@ declare module 'vue' {
|
|||||||
IEpSwitch: typeof import('~icons/ep/switch')['default']
|
IEpSwitch: typeof import('~icons/ep/switch')['default']
|
||||||
IEpTop: typeof import('~icons/ep/top')['default']
|
IEpTop: typeof import('~icons/ep/top')['default']
|
||||||
IEpUpload: typeof import('~icons/ep/upload')['default']
|
IEpUpload: typeof import('~icons/ep/upload')['default']
|
||||||
|
Img: typeof import('./../themes/geeker/components/Upload/Img.vue')['default']
|
||||||
|
Imgs: typeof import('./../themes/geeker/components/Upload/Imgs.vue')['default']
|
||||||
|
ImportExcel: typeof import('./../themes/geeker/components/ImportExcel/index.vue')['default']
|
||||||
|
InfoDialog: typeof import('./../themes/geeker/layouts/components/Header/components/InfoDialog.vue')['default']
|
||||||
LangSelect: typeof import('./../themes/default/components/LangSelect/index.vue')['default']
|
LangSelect: typeof import('./../themes/default/components/LangSelect/index.vue')['default']
|
||||||
|
Language: typeof import('./../themes/geeker/layouts/components/Header/components/Language.vue')['default']
|
||||||
LayoutSelect: typeof import('./../themes/default/layout/components/Settings/components/LayoutSelect.vue')['default']
|
LayoutSelect: typeof import('./../themes/default/layout/components/Settings/components/LayoutSelect.vue')['default']
|
||||||
|
Loading: typeof import('./../themes/geeker/components/Loading/index.vue')['default']
|
||||||
|
LoginForm: typeof import('./../themes/geeker/views/login/components/LoginForm.vue')['default']
|
||||||
|
Main: typeof import('./../themes/geeker/layouts/components/Main/index.vue')['default']
|
||||||
|
MaleFemaleRatioChart: typeof import('./../themes/geeker/views/dataScreen/components/MaleFemaleRatioChart.vue')['default']
|
||||||
|
Maximize: typeof import('./../themes/geeker/layouts/components/Main/components/Maximize.vue')['default']
|
||||||
|
Message: typeof import('./../themes/geeker/layouts/components/Header/components/Message.vue')['default']
|
||||||
|
MoreButton: typeof import('./../themes/geeker/layouts/components/Tabs/components/MoreButton.vue')['default']
|
||||||
MultiUpload: typeof import('./../themes/default/components/Upload/MultiUpload.vue')['default']
|
MultiUpload: typeof import('./../themes/default/components/Upload/MultiUpload.vue')['default']
|
||||||
NavBar: typeof import('./../themes/default/layout/components/NavBar/index.vue')['default']
|
NavBar: typeof import('./../themes/default/layout/components/NavBar/index.vue')['default']
|
||||||
NavbarLeft: typeof import('./../themes/default/layout/components/NavBar/components/NavbarLeft.vue')['default']
|
NavbarLeft: typeof import('./../themes/default/layout/components/NavBar/components/NavbarLeft.vue')['default']
|
||||||
NavbarRight: typeof import('./../themes/default/layout/components/NavBar/components/NavbarRight.vue')['default']
|
NavbarRight: typeof import('./../themes/default/layout/components/NavBar/components/NavbarRight.vue')['default']
|
||||||
|
OverNext30Chart: typeof import('./../themes/geeker/views/dataScreen/components/OverNext30Chart.vue')['default']
|
||||||
PageContent: typeof import('./../themes/default/components/CURD/PageContent.vue')['default']
|
PageContent: typeof import('./../themes/default/components/CURD/PageContent.vue')['default']
|
||||||
PageForm: typeof import('./../themes/default/components/CURD/PageForm.vue')['default']
|
PageForm: typeof import('./../themes/default/components/CURD/PageForm.vue')['default']
|
||||||
PageModal: typeof import('./../themes/default/components/CURD/PageModal.vue')['default']
|
PageModal: typeof import('./../themes/default/components/CURD/PageModal.vue')['default']
|
||||||
PageSearch: typeof import('./../themes/default/components/CURD/PageSearch.vue')['default']
|
PageSearch: typeof import('./../themes/default/components/CURD/PageSearch.vue')['default']
|
||||||
Pagination: typeof import('./../themes/default/components/Pagination/index.vue')['default']
|
Pagination: typeof import('./../themes/default/components/Pagination/index.vue')['default']
|
||||||
|
PasswordDialog: typeof import('./../themes/geeker/layouts/components/Header/components/PasswordDialog.vue')['default']
|
||||||
|
Pie: typeof import('./../themes/geeker/views/dashboard/dataVisualize/components/pie.vue')['default']
|
||||||
|
PlatformSourceChart: typeof import('./../themes/geeker/views/dataScreen/components/PlatformSourceChart.vue')['default']
|
||||||
|
ProTable: typeof import('./../themes/geeker/components/ProTable/index.vue')['default']
|
||||||
|
RealTimeAccessChart: typeof import('./../themes/geeker/views/dataScreen/components/RealTimeAccessChart.vue')['default']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
|
SearchForm: typeof import('./../themes/geeker/components/SearchForm/index.vue')['default']
|
||||||
|
SearchFormItem: typeof import('./../themes/geeker/components/SearchForm/components/SearchFormItem.vue')['default']
|
||||||
|
SearchMenu: typeof import('./../themes/geeker/layouts/components/Header/components/SearchMenu.vue')['default']
|
||||||
|
SelectFilter: typeof import('./../themes/geeker/components/SelectFilter/index.vue')['default']
|
||||||
|
SelectIcon: typeof import('./../themes/geeker/components/SelectIcon/index.vue')['default']
|
||||||
Settings: typeof import('./../themes/default/layout/components/Settings/index.vue')['default']
|
Settings: typeof import('./../themes/default/layout/components/Settings/index.vue')['default']
|
||||||
Sidebar: typeof import('./../themes/default/layout/components/Sidebar/index.vue')['default']
|
Sidebar: typeof import('./../themes/default/layout/components/Sidebar/index.vue')['default']
|
||||||
SidebarLogo: typeof import('./../themes/default/layout/components/Sidebar/components/SidebarLogo.vue')['default']
|
SidebarLogo: typeof import('./../themes/default/layout/components/Sidebar/components/SidebarLogo.vue')['default']
|
||||||
@ -106,10 +158,20 @@ declare module 'vue' {
|
|||||||
SidebarMixTopMenu: typeof import('./../themes/default/layout/components/Sidebar/components/SidebarMixTopMenu.vue')['default']
|
SidebarMixTopMenu: typeof import('./../themes/default/layout/components/Sidebar/components/SidebarMixTopMenu.vue')['default']
|
||||||
SingleUpload: typeof import('./../themes/default/components/Upload/SingleUpload.vue')['default']
|
SingleUpload: typeof import('./../themes/default/components/Upload/SingleUpload.vue')['default']
|
||||||
SizeSelect: typeof import('./../themes/default/components/SizeSelect/index.vue')['default']
|
SizeSelect: typeof import('./../themes/default/components/SizeSelect/index.vue')['default']
|
||||||
|
SubMenu: typeof import('./../themes/geeker/layouts/components/Menu/SubMenu.vue')['default']
|
||||||
SvgIcon: typeof import('./../themes/default/components/SvgIcon/index.vue')['default']
|
SvgIcon: typeof import('./../themes/default/components/SvgIcon/index.vue')['default']
|
||||||
|
SwitchDark: typeof import('./../themes/geeker/components/SwitchDark/index.vue')['default']
|
||||||
|
TableColumn: typeof import('./../themes/geeker/components/ProTable/components/TableColumn.vue')['default']
|
||||||
TableSelect: typeof import('./../themes/default/components/TableSelect/index.vue')['default']
|
TableSelect: typeof import('./../themes/default/components/TableSelect/index.vue')['default']
|
||||||
|
Tabs: typeof import('./../themes/geeker/layouts/components/Tabs/index.vue')['default']
|
||||||
TagsView: typeof import('./../themes/default/layout/components/TagsView/index.vue')['default']
|
TagsView: typeof import('./../themes/default/layout/components/TagsView/index.vue')['default']
|
||||||
ThemeColorPicker: typeof import('./../themes/default/layout/components/Settings/components/ThemeColorPicker.vue')['default']
|
ThemeColorPicker: typeof import('./../themes/default/layout/components/Settings/components/ThemeColorPicker.vue')['default']
|
||||||
|
ThemeDrawer: typeof import('./../themes/geeker/layouts/components/ThemeDrawer/index.vue')['default']
|
||||||
|
ThemeSetting: typeof import('./../themes/geeker/layouts/components/Header/components/ThemeSetting.vue')['default']
|
||||||
|
ToolBarLeft: typeof import('./../themes/geeker/layouts/components/Header/ToolBarLeft.vue')['default']
|
||||||
|
ToolBarRight: typeof import('./../themes/geeker/layouts/components/Header/ToolBarRight.vue')['default']
|
||||||
|
TreeFilter: typeof import('./../themes/geeker/components/TreeFilter/index.vue')['default']
|
||||||
|
UserDrawer: typeof import('./../themes/geeker/views/proTable/components/UserDrawer.vue')['default']
|
||||||
UserImport: typeof import('./../themes/default/views/system/user/components/user-import.vue')['default']
|
UserImport: typeof import('./../themes/default/views/system/user/components/user-import.vue')['default']
|
||||||
VisitTrend: typeof import('./../themes/default/views/dashboard/components/VisitTrend.vue')['default']
|
VisitTrend: typeof import('./../themes/default/views/dashboard/components/VisitTrend.vue')['default']
|
||||||
WangEditor: typeof import('./../themes/default/components/WangEditor/index.vue')['default']
|
WangEditor: typeof import('./../themes/default/components/WangEditor/index.vue')['default']
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="myApp"></div>
|
<div id="myApp"></div>
|
||||||
<script>
|
<script>
|
||||||
localStorage.setItem("_LOCAL_THEME_", 'default')
|
localStorage.setItem("_LOCAL_THEME_", 'geeker')
|
||||||
const _LOCAL_THEME_ = localStorage.getItem("_LOCAL_THEME_"); //notheme,default,……
|
const _LOCAL_THEME_ = localStorage.getItem("_LOCAL_THEME_"); //notheme,default,……
|
||||||
let jsFile;
|
let jsFile;
|
||||||
switch (_LOCAL_THEME_) {
|
switch (_LOCAL_THEME_) {
|
||||||
@ -21,6 +21,9 @@
|
|||||||
case "_single":
|
case "_single":
|
||||||
jsFile = "./main-single-theme.ts";
|
jsFile = "./main-single-theme.ts";
|
||||||
break;
|
break;
|
||||||
|
case "geeker":
|
||||||
|
jsFile = "./main-geeker.ts";
|
||||||
|
break;
|
||||||
case "element":
|
case "element":
|
||||||
default:
|
default:
|
||||||
jsFile = "./main-multi-themes.ts";
|
jsFile = "./main-multi-themes.ts";
|
||||||
|
24
src/renderer/main-multi-themes-bak.ts
Normal file
24
src/renderer/main-multi-themes-bak.ts
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import {createApp} from 'vue'
|
||||||
|
import App from '@theme/App-theme.vue';
|
||||||
|
import setupPlugins from "@theme/plugins";
|
||||||
|
|
||||||
|
// 本地SVG图标
|
||||||
|
import "virtual:svg-icons-register";
|
||||||
|
|
||||||
|
// 样式
|
||||||
|
import "element-plus/theme-chalk/dark/css-vars.css";
|
||||||
|
import "@theme/styles/index.scss";
|
||||||
|
import "uno.css";
|
||||||
|
import "animate.css";
|
||||||
|
|
||||||
|
import {errorHandler} from './error'
|
||||||
|
|
||||||
|
const app = createApp(App)
|
||||||
|
app.use(setupPlugins);
|
||||||
|
errorHandler(app)
|
||||||
|
// 执行路由拦截,放在挂载之前的方式(按路由权限标识)
|
||||||
|
import useInterceptor from './interceptor';
|
||||||
|
|
||||||
|
useInterceptor();
|
||||||
|
|
||||||
|
app.mount("#myApp")
|
@ -1,13 +1,13 @@
|
|||||||
import {createApp} from 'vue'
|
import {createApp} from 'vue'
|
||||||
import App from '@theme/App-theme.vue';
|
import App from '@themeDefault/App-theme.vue';
|
||||||
import setupPlugins from "@theme/plugins";
|
import setupPlugins from "@themeDefault/plugins";
|
||||||
|
|
||||||
// 本地SVG图标
|
// 本地SVG图标
|
||||||
import "virtual:svg-icons-register";
|
import "virtual:svg-icons-register";
|
||||||
|
|
||||||
// 样式
|
// 样式
|
||||||
import "element-plus/theme-chalk/dark/css-vars.css";
|
import "element-plus/theme-chalk/dark/css-vars.css";
|
||||||
import "@theme/styles/index.scss";
|
import "@themeDefault/styles/index.scss";
|
||||||
import "uno.css";
|
import "uno.css";
|
||||||
import "animate.css";
|
import "animate.css";
|
||||||
|
|
||||||
|
10
src/renderer/mock/geeker/index.ts
Normal file
10
src/renderer/mock/geeker/index.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* 引入 这些文件时,app还没有构建完毕,处于运行时状态;不可使用构建类方法
|
||||||
|
* 如 import.meta.glob
|
||||||
|
*/
|
||||||
|
|
||||||
|
import login from "./login";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
login
|
||||||
|
}
|
50
src/renderer/mock/geeker/login.ts
Normal file
50
src/renderer/mock/geeker/login.ts
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
export default ([
|
||||||
|
{
|
||||||
|
url: "login/code",
|
||||||
|
method: ["GET"],
|
||||||
|
body: ({ params }) => {
|
||||||
|
const username = params.username;
|
||||||
|
const password = params.password;
|
||||||
|
|
||||||
|
let res = null;
|
||||||
|
|
||||||
|
if ((username === "admin" && password === "e10adc3949ba59abbe56e057f20f883e") || (username === "user" && password === "e10adc3949ba59abbe56e057f20f883e")) {
|
||||||
|
res = 200
|
||||||
|
}else{
|
||||||
|
res = 500
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
code: "00000",
|
||||||
|
data: res,
|
||||||
|
msg: "一切ok",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
url: "auth/login",
|
||||||
|
method: ["POST"],
|
||||||
|
body: {
|
||||||
|
code: "00000",
|
||||||
|
data: {
|
||||||
|
accessToken:
|
||||||
|
"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImp0aSI6IjE2YWJkNTlkOTAxNzQwZDliYmI3ZjczODBhZDkyNzNhIiwidXNlcklkIjoyLCJ1c2VybmFtZSI6ImFkbWluIiwiZGVwdElkIjoxLCJkYXRhU2NvcGUiOjEsImF1dGhvcml0aWVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNjkxMTAzMzgyfQ.P4cuIfmPepl3HuguhMS7NXn5a7IUPpsLbmtA_rHOhHk",
|
||||||
|
tokenType: "Bearer",
|
||||||
|
refreshToken: null,
|
||||||
|
expires: null,
|
||||||
|
},
|
||||||
|
msg: "一切ok",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
url: "auth/logout",
|
||||||
|
method: ["DELETE"],
|
||||||
|
body: {
|
||||||
|
code: "00000",
|
||||||
|
data: {},
|
||||||
|
msg: "string",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]);
|
@ -11,14 +11,18 @@ import menu from "./v1/menu";
|
|||||||
import role from "./v1/role";
|
import role from "./v1/role";
|
||||||
import stats from "./v1/stats";
|
import stats from "./v1/stats";
|
||||||
import user from "./v1/user";
|
import user from "./v1/user";
|
||||||
|
import geeker from "./geeker";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
auth,
|
...{
|
||||||
dept,
|
auth,
|
||||||
dict,
|
dept,
|
||||||
files,
|
dict,
|
||||||
menu,
|
files,
|
||||||
role,
|
menu,
|
||||||
stats,
|
role,
|
||||||
user
|
stats,
|
||||||
|
user
|
||||||
|
},
|
||||||
|
...geeker
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
// 根据主题设定,加载对应主题的路径表(注意,本处主题指的是引用的UI组件库形成的一套主题)
|
// 根据主题设定,加载对应主题的路径表(注意,本处主题指的是引用的UI组件库形成的一套主题)
|
||||||
import Paths from "@theme/router/index-theme";
|
import theme from "../theme";
|
||||||
|
import PathsDefault from "@themeDefault/router/index-theme";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* meta : {
|
* meta : {
|
||||||
@ -8,5 +9,5 @@ import Paths from "@theme/router/index-theme";
|
|||||||
roles: '所需权限角色;根据自己的角色权限系统来配置角色名数组;为安全起见,留空则全部不可访问,设置了guest的才是允许游客访问的,设置了admin的是只允许admin访问的(优先级最高)'
|
roles: '所需权限角色;根据自己的角色权限系统来配置角色名数组;为安全起见,留空则全部不可访问,设置了guest的才是允许游客访问的,设置了admin的是只允许admin访问的(优先级最高)'
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
const Paths = PathsDefault;
|
||||||
export default Paths;
|
export default Paths;
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
import theme from "echarts/types/src/theme/dark";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义加载store模块
|
* 自定义加载store模块
|
||||||
*/
|
*/
|
||||||
// 本方法不建议使用,因为会加载modules下所有文件,要求所有文件无错,否则不能继续
|
// 本方法不建议使用,因为会加载modules下所有文件,要求所有文件无错,否则不能继续
|
||||||
function loadModules() {
|
function loadModules() {
|
||||||
const context: any = import.meta.glob("./modules/*.ts", {eager: true});
|
const context: any = import.meta.glob("./modules/*.ts", {eager: false});
|
||||||
const modules: any = {};
|
const modules: any = {};
|
||||||
let keys = Object.keys(context);
|
let keys = Object.keys(context);
|
||||||
for (let key of keys) {
|
for (let key of keys) {
|
||||||
|
@ -16,10 +16,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAppStore, useSettingsStore } from "@theme/store";
|
import { useAppStore, useSettingsStore } from "@themeDefault/store";
|
||||||
import defaultSettings from "@theme/settings";
|
import defaultSettings from "@themeDefault/settings";
|
||||||
import { ThemeEnum } from "@theme/enums/ThemeEnum";
|
import { ThemeEnum } from "@themeDefault/enums/ThemeEnum";
|
||||||
import { SizeEnum } from "@theme/enums/SizeEnum";
|
import { SizeEnum } from "@themeDefault/enums/SizeEnum";
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const settingsStore = useSettingsStore();
|
const settingsStore = useSettingsStore();
|
||||||
|
@ -16,10 +16,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {useAppStore, useSettingsStore} from "@theme/store";
|
import {useAppStore, useSettingsStore} from "./store";
|
||||||
import defaultSettings from "@theme/settings";
|
import defaultSettings from "./settings";
|
||||||
import {ThemeEnum} from "@theme/enums/ThemeEnum";
|
import {ThemeEnum} from "./enums/ThemeEnum";
|
||||||
import {SizeEnum} from "@theme/enums/SizeEnum";
|
import {SizeEnum} from "./enums/SizeEnum";
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const settingsStore = useSettingsStore();
|
const settingsStore = useSettingsStore();
|
||||||
|
@ -10,7 +10,7 @@ defineOptions({
|
|||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
import { isExternal } from "@theme/utils";
|
import { isExternal } from "@themeDefault/utils";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
to: {
|
to: {
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
import { RouteLocationMatched } from "vue-router";
|
import { RouteLocationMatched } from "vue-router";
|
||||||
import { compile } from "path-to-regexp";
|
import { compile } from "path-to-regexp";
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
import { translateRouteTitle } from "@theme/utils/i18n";
|
import { translateRouteTitle } from "@themeDefault/utils/i18n";
|
||||||
|
|
||||||
const currentRoute = useRoute();
|
const currentRoute = useRoute();
|
||||||
const pathCompile = (path: string) => {
|
const pathCompile = (path: string) => {
|
||||||
|
@ -486,8 +486,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import SvgIcon from "@theme/components/SvgIcon/index.vue";
|
import SvgIcon from "@themeDefault/components/SvgIcon/index.vue";
|
||||||
import { hasAuth } from "@theme/plugins/permission";
|
import { hasAuth } from "@themeDefault/plugins/permission";
|
||||||
import { useDateFormat, useThrottleFn } from "@vueuse/core";
|
import { useDateFormat, useThrottleFn } from "@vueuse/core";
|
||||||
import {
|
import {
|
||||||
genFileId,
|
genFileId,
|
||||||
|
@ -19,7 +19,7 @@ defineProps({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
import SvgIcon from "@theme/components/SvgIcon/index.vue";
|
import SvgIcon from "@themeDefault/components/SvgIcon/index.vue";
|
||||||
|
|
||||||
const emit = defineEmits(["toggleClick"]);
|
const emit = defineEmits(["toggleClick"]);
|
||||||
|
|
||||||
|
@ -20,10 +20,10 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { useAppStore } from "@theme/store/modules/app";
|
import { useAppStore } from "@themeDefault/store/modules/app";
|
||||||
import { LanguageEnum } from "@theme/enums/LanguageEnum";
|
import { LanguageEnum } from "@themeDefault/enums/LanguageEnum";
|
||||||
|
|
||||||
import SvgIcon from "@theme/components/SvgIcon/index.vue";
|
import SvgIcon from "@themeDefault/components/SvgIcon/index.vue";
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
size: {
|
size: {
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { SizeEnum } from "@theme/enums/SizeEnum";
|
import { SizeEnum } from "@themeDefault/enums/SizeEnum";
|
||||||
import { useAppStore } from "@theme/store/modules/app";
|
import { useAppStore } from "@themeDefault/store/modules/app";
|
||||||
|
|
||||||
import SvgIcon from "@theme/components/SvgIcon/index.vue";
|
import SvgIcon from "@themeDefault/components/SvgIcon/index.vue";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const sizeOptions = computed(() => {
|
const sizeOptions = computed(() => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { hasAuth } from "@theme/plugins/permission";
|
import { hasAuth } from "@themeDefault/plugins/permission";
|
||||||
import { Directive, DirectiveBinding } from "vue";
|
import { Directive, DirectiveBinding } from "vue";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import type { App } from "vue";
|
import type { App } from "vue";
|
||||||
import { createI18n } from "vue-i18n";
|
import { createI18n } from "vue-i18n";
|
||||||
import { useAppStoreHook } from "@theme/store/modules/app";
|
import { useAppStoreHook } from "@themeDefault/store/modules/app";
|
||||||
// 本地语言包
|
// 本地语言包
|
||||||
import enLocale from "./package/en";
|
import enLocale from "./package/en";
|
||||||
import zhCnLocale from "./package/zh-cn";
|
import zhCnLocale from "./package/zh-cn";
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSettingsStore, useTagsViewStore } from "@theme/store";
|
import { useSettingsStore, useTagsViewStore } from "@themeDefault/store";
|
||||||
import variables from "@theme/styles/variables.module.scss";
|
import variables from "@themeDefault/styles/variables.module.scss";
|
||||||
|
|
||||||
const cachedViews = computed(() => useTagsViewStore().cachedViews); // 缓存页面集合
|
const cachedViews = computed(() => useTagsViewStore().cachedViews); // 缓存页面集合
|
||||||
const minHeight = computed(() => {
|
const minHeight = computed(() => {
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAppStore } from "@theme/store";
|
import { useAppStore } from "@themeDefault/store";
|
||||||
import Hamburger from "@theme/components/Hamburger/index.vue";
|
import Hamburger from "@themeDefault/components/Hamburger/index.vue";
|
||||||
import Breadcrumb from "@theme/components/Breadcrumb/index.vue";
|
import Breadcrumb from "@themeDefault/components/Breadcrumb/index.vue";
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
|
|
||||||
function toggleSideBar() {
|
function toggleSideBar() {
|
||||||
|
@ -62,13 +62,13 @@ import {
|
|||||||
useTagsViewStore,
|
useTagsViewStore,
|
||||||
useUserStore,
|
useUserStore,
|
||||||
useSettingsStore,
|
useSettingsStore,
|
||||||
} from "@theme/store";
|
} from "@themeDefault/store";
|
||||||
import defaultSettings from "@theme/settings";
|
import defaultSettings from "@themeDefault/settings";
|
||||||
import { DeviceEnum } from "@theme/enums/DeviceEnum";
|
import { DeviceEnum } from "@themeDefault/enums/DeviceEnum";
|
||||||
|
|
||||||
import SvgIcon from "@theme/components/SvgIcon/index.vue";
|
import SvgIcon from "@themeDefault/components/SvgIcon/index.vue";
|
||||||
import LangSelect from "@theme/components/LangSelect/index.vue";
|
import LangSelect from "@themeDefault/components/LangSelect/index.vue";
|
||||||
import SizeSelect from "@theme/components/SizeSelect/index.vue";
|
import SizeSelect from "@themeDefault/components/SizeSelect/index.vue";
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const tagsViewStore = useTagsViewStore();
|
const tagsViewStore = useTagsViewStore();
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import NavbarLeft from "@theme/layout/components/NavBar/components/NavbarLeft.vue";
|
import NavbarLeft from "@themeDefault/layout/components/NavBar/components/NavbarLeft.vue";
|
||||||
import NavbarRight from "@theme/layout/components/NavBar/components/NavbarRight.vue";
|
import NavbarRight from "@themeDefault/layout/components/NavBar/components/NavbarRight.vue";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { LayoutEnum } from "@theme/enums/LayoutEnum";
|
import { LayoutEnum } from "@themeDefault/enums/LayoutEnum";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: String,
|
modelValue: String,
|
||||||
|
@ -55,9 +55,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSettingsStore, usePermissionStore, useAppStore } from "@theme/store";
|
import { useSettingsStore, usePermissionStore, useAppStore } from "@themeDefault/store";
|
||||||
import { LayoutEnum } from "@theme/enums/LayoutEnum";
|
import { LayoutEnum } from "@themeDefault/enums/LayoutEnum";
|
||||||
import { ThemeEnum } from "@theme/enums/ThemeEnum";
|
import { ThemeEnum } from "@themeDefault/enums/ThemeEnum";
|
||||||
|
|
||||||
import LayoutSelect from "./components/LayoutSelect.vue";
|
import LayoutSelect from "./components/LayoutSelect.vue";
|
||||||
import ThemeColorPicker from "./components/ThemeColorPicker.vue";
|
import ThemeColorPicker from "./components/ThemeColorPicker.vue";
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import defaultSettings from "@theme/settings";
|
import defaultSettings from "@themeDefault/settings";
|
||||||
import { useSettingsStore } from "@theme/store";
|
import { useSettingsStore } from "@themeDefault/store";
|
||||||
|
|
||||||
const settingsStore = useSettingsStore();
|
const settingsStore = useSettingsStore();
|
||||||
|
|
||||||
|
@ -21,13 +21,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSettingsStore, useAppStore } from "@theme/store";
|
import { useSettingsStore, useAppStore } from "@themeDefault/store";
|
||||||
import { isExternal } from "@theme/utils";
|
import { isExternal } from "@themeDefault/utils";
|
||||||
import path from "path-browserify";
|
import path from "path-browserify";
|
||||||
|
|
||||||
import SidebarMenuItem from "./SidebarMenuItem.vue";
|
import SidebarMenuItem from "./SidebarMenuItem.vue";
|
||||||
|
|
||||||
import variables from "@theme/styles/variables.module.scss";
|
import variables from "@themeDefault/styles/variables.module.scss";
|
||||||
|
|
||||||
const settingsStore = useSettingsStore();
|
const settingsStore = useSettingsStore();
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
|
@ -55,7 +55,7 @@ defineOptions({
|
|||||||
});
|
});
|
||||||
|
|
||||||
import path from "path-browserify";
|
import path from "path-browserify";
|
||||||
import { isExternal } from "@theme/utils";
|
import { isExternal } from "@themeDefault/utils";
|
||||||
import { RouteRecordRaw } from "vue-router";
|
import { RouteRecordRaw } from "vue-router";
|
||||||
|
|
||||||
import SidebarMenuItemTitle from "./SidebarMenuItemTitle.vue";
|
import SidebarMenuItemTitle from "./SidebarMenuItemTitle.vue";
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { translateRouteTitle } from "@theme/utils/i18n";
|
import { translateRouteTitle } from "@themeDefault/utils/i18n";
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
icon: {
|
icon: {
|
||||||
|
@ -32,9 +32,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { usePermissionStore, useAppStore } from "@theme/store";
|
import { usePermissionStore, useAppStore } from "@themeDefault/store";
|
||||||
import { translateRouteTitle } from "@theme/utils/i18n";
|
import { translateRouteTitle } from "@themeDefault/utils/i18n";
|
||||||
import variables from "@theme/styles/variables.module.scss";
|
import variables from "@themeDefault/styles/variables.module.scss";
|
||||||
import { RouteRecordRaw } from "vue-router";
|
import { RouteRecordRaw } from "vue-router";
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
|
@ -18,13 +18,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSettingsStore, usePermissionStore, useAppStore } from "@theme/store";
|
import { useSettingsStore, usePermissionStore, useAppStore } from "@themeDefault/store";
|
||||||
import { LayoutEnum } from "@theme/enums/LayoutEnum";
|
import { LayoutEnum } from "@themeDefault/enums/LayoutEnum";
|
||||||
|
|
||||||
import SidebarLogo from "./components/SidebarLogo.vue";
|
import SidebarLogo from "./components/SidebarLogo.vue";
|
||||||
import SidebarMenu from "./components/SidebarMenu.vue";
|
import SidebarMenu from "./components/SidebarMenu.vue";
|
||||||
import SidebarMixTopMenu from "./components/SidebarMixTopMenu.vue";
|
import SidebarMixTopMenu from "./components/SidebarMixTopMenu.vue";
|
||||||
import NavbarRight from "@theme/layout/components/NavBar/components/NavbarRight.vue";
|
import NavbarRight from "@themeDefault/layout/components/NavBar/components/NavbarRight.vue";
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const settingsStore = useSettingsStore();
|
const settingsStore = useSettingsStore();
|
||||||
|
@ -61,16 +61,16 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useRoute, useRouter, RouteRecordRaw } from "vue-router";
|
import { useRoute, useRouter, RouteRecordRaw } from "vue-router";
|
||||||
import { resolve } from "path-browserify";
|
import { resolve } from "path-browserify";
|
||||||
import { translateRouteTitle } from "@theme/utils/i18n";
|
import { translateRouteTitle } from "@themeDefault/utils/i18n";
|
||||||
|
|
||||||
import SvgIcon from "@theme/components/SvgIcon/index.vue";
|
import SvgIcon from "@themeDefault/components/SvgIcon/index.vue";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
usePermissionStore,
|
usePermissionStore,
|
||||||
useTagsViewStore,
|
useTagsViewStore,
|
||||||
useSettingsStore,
|
useSettingsStore,
|
||||||
useAppStore,
|
useAppStore,
|
||||||
} from "@theme/store";
|
} from "@themeDefault/store";
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()!;
|
const { proxy } = getCurrentInstance()!;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -52,10 +52,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAppStore, useSettingsStore, usePermissionStore } from "@theme/store";
|
import { useAppStore, useSettingsStore, usePermissionStore } from "@themeDefault/store";
|
||||||
import defaultSettings from "@theme/settings";
|
import defaultSettings from "@themeDefault/settings";
|
||||||
import { DeviceEnum } from "@theme/enums/DeviceEnum";
|
import { DeviceEnum } from "@themeDefault/enums/DeviceEnum";
|
||||||
import { LayoutEnum } from "@theme/enums/LayoutEnum";
|
import { LayoutEnum } from "@themeDefault/enums/LayoutEnum";
|
||||||
|
|
||||||
import AppMain from "./components/AppMain/index.vue";
|
import AppMain from "./components/AppMain/index.vue";
|
||||||
import NavBar from "./components/NavBar/index.vue";
|
import NavBar from "./components/NavBar/index.vue";
|
||||||
@ -63,13 +63,13 @@ import Settings from "./components/Settings/index.vue";
|
|||||||
import Sidebar from "./components/Sidebar/index.vue";
|
import Sidebar from "./components/Sidebar/index.vue";
|
||||||
import TagsView from "./components/TagsView/index.vue";
|
import TagsView from "./components/TagsView/index.vue";
|
||||||
|
|
||||||
import SvgIcon from "@theme/components/SvgIcon/index.vue";
|
import SvgIcon from "@themeDefault/components/SvgIcon/index.vue";
|
||||||
import Hamburger from "@theme/components/Hamburger/index.vue";
|
import Hamburger from "@themeDefault/components/Hamburger/index.vue";
|
||||||
import SidebarMenu from "@theme/layout/components/Sidebar/components/SidebarMenu.vue";
|
import SidebarMenu from "@themeDefault/layout/components/Sidebar/components/SidebarMenu.vue";
|
||||||
import NavbarLeft from "@theme/layout/components/NavBar/components/NavbarLeft.vue";
|
import NavbarLeft from "@themeDefault/layout/components/NavBar/components/NavbarLeft.vue";
|
||||||
import NavbarRight from "@theme/layout/components/NavBar/components/NavbarRight.vue";
|
import NavbarRight from "@themeDefault/layout/components/NavBar/components/NavbarRight.vue";
|
||||||
import ThemeColorPicker from "@theme/layout/components/Settings/components/ThemeColorPicker.vue";
|
import ThemeColorPicker from "@themeDefault/layout/components/Settings/components/ThemeColorPicker.vue";
|
||||||
import LayoutSelect from "@theme/layout/components/Settings/components/LayoutSelect.vue";
|
import LayoutSelect from "@themeDefault/layout/components/Settings/components/LayoutSelect.vue";
|
||||||
|
|
||||||
//开启内置服务器
|
//开启内置服务器
|
||||||
// import {invoke} from "@/utils/ipcRenderer";
|
// import {invoke} from "@/utils/ipcRenderer";
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import { createApp } from "vue";
|
import { createApp } from "vue";
|
||||||
import App from "./App.vue";
|
import App from "./App.vue";
|
||||||
import setupPlugins from "@theme/plugins";
|
import setupPlugins from "./plugins";
|
||||||
|
|
||||||
// 本地SVG图标
|
// 本地SVG图标
|
||||||
import "virtual:svg-icons-register";
|
import "virtual:svg-icons-register";
|
||||||
|
|
||||||
// 样式
|
// 样式
|
||||||
import "element-plus/theme-chalk/dark/css-vars.css";
|
import "element-plus/theme-chalk/dark/css-vars.css";
|
||||||
import "@theme/styles/index.scss";
|
import "./styles/index.scss";
|
||||||
import "uno.css";
|
import "uno.css";
|
||||||
import "animate.css";
|
import "animate.css";
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { setupDirective } from "@theme/directive";
|
import { setupDirective } from "@themeDefault/directive";
|
||||||
import { setupI18n } from "@theme/lang";
|
import { setupI18n } from "@themeDefault/lang";
|
||||||
import { setupRouter } from "@theme/router";
|
import { setupRouter } from "@themeDefault/router";
|
||||||
import { setupStore } from "@theme/store";
|
import { setupStore } from "@themeDefault/store";
|
||||||
import type { App } from "vue";
|
import type { App } from "vue";
|
||||||
import { setupElIcons } from "./icons";
|
import { setupElIcons } from "./icons";
|
||||||
import { setupPermission } from "./permission";
|
import { setupPermission } from "./permission";
|
||||||
|
@ -4,10 +4,10 @@ import {
|
|||||||
RouteRecordRaw,
|
RouteRecordRaw,
|
||||||
} from "vue-router";
|
} from "vue-router";
|
||||||
|
|
||||||
import NProgress from "@theme/utils/nprogress";
|
import NProgress from "@themeDefault/utils/nprogress";
|
||||||
import { TOKEN_KEY } from "@theme/enums/CacheEnum";
|
import { TOKEN_KEY } from "@themeDefault/enums/CacheEnum";
|
||||||
import router from "@theme/router";
|
import router from "@themeDefault/router";
|
||||||
import { usePermissionStore, useUserStore } from "@theme/store";
|
import { usePermissionStore, useUserStore } from "@themeDefault/store";
|
||||||
|
|
||||||
export function setupPermission() {
|
export function setupPermission() {
|
||||||
// 白名单路由
|
// 白名单路由
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const Layout = () => import("@theme/layout/index.vue");
|
const Layout = () => import("@themeDefault/layout/index.vue");
|
||||||
/**
|
/**
|
||||||
* 全路由表(主题目录内的路由,仅需要返回数组即可,交给主框架进行路由重组)
|
* 全路由表(主题目录内的路由,仅需要返回数组即可,交给主框架进行路由重组)
|
||||||
* 必须依照以下格式配置
|
* 必须依照以下格式配置
|
||||||
@ -29,7 +29,7 @@ const paths = {
|
|||||||
children:{
|
children:{
|
||||||
"/redirect/:path(.*)":{
|
"/redirect/:path(.*)":{
|
||||||
path: "/redirect",
|
path: "/redirect",
|
||||||
component: () => import("@theme/views/redirect/index.vue"),
|
component: () => import("@themeDefault/views/redirect/index.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
hidden: true,
|
hidden: true,
|
||||||
title: "",
|
title: "",
|
||||||
@ -42,7 +42,7 @@ const paths = {
|
|||||||
|
|
||||||
"/login":{
|
"/login":{
|
||||||
path: "/login",
|
path: "/login",
|
||||||
component: () => import("@theme/views/login/index.vue"),
|
component: () => import("@themeDefault/views/login/index.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
hidden: true,
|
hidden: true,
|
||||||
title: "登陆",
|
title: "登陆",
|
||||||
@ -64,7 +64,7 @@ const paths = {
|
|||||||
children:{
|
children:{
|
||||||
"dashboard":{
|
"dashboard":{
|
||||||
path: "/redirect",
|
path: "/redirect",
|
||||||
component: () => import("@theme/views/dashboard/index.vue"),
|
component: () => import("@themeDefault/views/dashboard/index.vue"),
|
||||||
// 用于 keep-alive 功能,需要与 SFC 中自动推导或显式声明的组件名称一致
|
// 用于 keep-alive 功能,需要与 SFC 中自动推导或显式声明的组件名称一致
|
||||||
// 参考文档: https://cn.vuejs.org/guide/built-ins/keep-alive.html#include-exclude
|
// 参考文档: https://cn.vuejs.org/guide/built-ins/keep-alive.html#include-exclude
|
||||||
meta: {
|
meta: {
|
||||||
@ -79,7 +79,7 @@ const paths = {
|
|||||||
|
|
||||||
"401":{
|
"401":{
|
||||||
path: "401",
|
path: "401",
|
||||||
component: () => import("@theme/views/error-page/401.vue"),
|
component: () => import("@themeDefault/views/error-page/401.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
hidden: true,
|
hidden: true,
|
||||||
title: "",
|
title: "",
|
||||||
@ -90,7 +90,7 @@ const paths = {
|
|||||||
|
|
||||||
"404":{
|
"404":{
|
||||||
path: "404",
|
path: "404",
|
||||||
component: () => import("@theme/views/error-page/404.vue"),
|
component: () => import("@themeDefault/views/error-page/404.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
hidden: true,
|
hidden: true,
|
||||||
title: "",
|
title: "",
|
||||||
@ -112,7 +112,7 @@ const paths = {
|
|||||||
//
|
//
|
||||||
// "/redirect/:path(.*)":{
|
// "/redirect/:path(.*)":{
|
||||||
// path: "/redirect",
|
// path: "/redirect",
|
||||||
// component: () => import("@theme/views/redirect/index.vue"),
|
// component: () => import("@themeDefault/views/redirect/index.vue"),
|
||||||
// meta: {
|
// meta: {
|
||||||
// hidden: true,
|
// hidden: true,
|
||||||
// title: "",
|
// title: "",
|
||||||
@ -123,7 +123,7 @@ const paths = {
|
|||||||
//
|
//
|
||||||
// "/login":{
|
// "/login":{
|
||||||
// path: "/login",
|
// path: "/login",
|
||||||
// component: () => import("@theme/views/login/index.vue"),
|
// component: () => import("@themeDefault/views/login/index.vue"),
|
||||||
// meta: {
|
// meta: {
|
||||||
// hidden: true,
|
// hidden: true,
|
||||||
// title: "登陆",
|
// title: "登陆",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import type { App } from "vue";
|
import type { App } from "vue";
|
||||||
import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
|
import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
|
||||||
|
|
||||||
export const Layout = () => import("@theme/layout/index.vue");
|
export const Layout = () => import("@themeDefault/layout/index.vue");
|
||||||
|
|
||||||
// 静态路由
|
// 静态路由
|
||||||
export const constantRoutes: RouteRecordRaw[] = [
|
export const constantRoutes: RouteRecordRaw[] = [
|
||||||
@ -13,14 +13,14 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/redirect/:path(.*)",
|
path: "/redirect/:path(.*)",
|
||||||
component: () => import("@theme/views/redirect/index.vue"),
|
component: () => import("@themeDefault/views/redirect/index.vue"),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: "/login",
|
path: "/login",
|
||||||
component: () => import("@theme/views/login/index.vue"),
|
component: () => import("@themeDefault/views/login/index.vue"),
|
||||||
meta: { hidden: true },
|
meta: { hidden: true },
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "dashboard",
|
path: "dashboard",
|
||||||
component: () => import("@theme/views/dashboard/index.vue"),
|
component: () => import("@themeDefault/views/dashboard/index.vue"),
|
||||||
// 用于 keep-alive 功能,需要与 SFC 中自动推导或显式声明的组件名称一致
|
// 用于 keep-alive 功能,需要与 SFC 中自动推导或显式声明的组件名称一致
|
||||||
// 参考文档: https://cn.vuejs.org/guide/built-ins/keep-alive.html#include-exclude
|
// 参考文档: https://cn.vuejs.org/guide/built-ins/keep-alive.html#include-exclude
|
||||||
name: "Dashboard",
|
name: "Dashboard",
|
||||||
@ -45,12 +45,12 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "401",
|
path: "401",
|
||||||
component: () => import("@theme/views/error-page/401.vue"),
|
component: () => import("@themeDefault/views/error-page/401.vue"),
|
||||||
meta: { hidden: true },
|
meta: { hidden: true },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "404",
|
path: "404",
|
||||||
component: () => import("@theme/views/error-page/404.vue"),
|
component: () => import("@themeDefault/views/error-page/404.vue"),
|
||||||
meta: { hidden: true },
|
meta: { hidden: true },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -2,7 +2,6 @@ import {SizeEnum} from "./enums/SizeEnum";
|
|||||||
import {LayoutEnum} from "./enums/LayoutEnum";
|
import {LayoutEnum} from "./enums/LayoutEnum";
|
||||||
import {ThemeEnum} from "./enums/ThemeEnum";
|
import {ThemeEnum} from "./enums/ThemeEnum";
|
||||||
import {LanguageEnum} from "./enums/LanguageEnum";
|
import {LanguageEnum} from "./enums/LanguageEnum";
|
||||||
import * as process from "node:process";
|
|
||||||
|
|
||||||
const {pkg} = __APP_INFO__;
|
const {pkg} = __APP_INFO__;
|
||||||
|
|
||||||
@ -21,7 +20,7 @@ const defaultSettings: AppSettings = {
|
|||||||
language: LanguageEnum.ZH_CN,
|
language: LanguageEnum.ZH_CN,
|
||||||
themeColor: "#409EFF",
|
themeColor: "#409EFF",
|
||||||
watermarkEnabled: true,
|
watermarkEnabled: true,
|
||||||
watermarkContent: "我是水印,在子主题的根目录里配置; @theme/settings.ts",
|
watermarkContent: "我是水印,在子主题的根目录里配置; @theme*/settings.ts",
|
||||||
};
|
};
|
||||||
|
|
||||||
export default defaultSettings;
|
export default defaultSettings;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import defaultSettings from "@theme/settings";
|
import defaultSettings from "@themeDefault/settings";
|
||||||
|
|
||||||
// 导入 Element Plus 中英文语言包
|
// 导入 Element Plus 中英文语言包
|
||||||
import zhCn from "element-plus/es/locale/lang/zh-cn";
|
import zhCn from "element-plus/es/locale/lang/zh-cn";
|
||||||
import en from "element-plus/es/locale/lang/en";
|
import en from "element-plus/es/locale/lang/en";
|
||||||
import { store } from "@theme/store";
|
import { store } from "@themeDefault/store";
|
||||||
import { DeviceEnum } from "@theme/enums/DeviceEnum";
|
import { DeviceEnum } from "@themeDefault/enums/DeviceEnum";
|
||||||
import { SidebarStatusEnum } from "@theme/enums/SidebarStatusEnum";
|
import { SidebarStatusEnum } from "@themeDefault/enums/SidebarStatusEnum";
|
||||||
|
|
||||||
export const useAppStore = defineStore("app", () => {
|
export const useAppStore = defineStore("app", () => {
|
||||||
// 设备类型
|
// 设备类型
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import {RouteRecordRaw} from "vue-router";
|
import {RouteRecordRaw} from "vue-router";
|
||||||
import {constantRoutes} from "@theme/router";
|
import {constantRoutes} from "@themeDefault/router";
|
||||||
import {store} from "@theme/store";
|
import {store} from "@themeDefault/store";
|
||||||
import MenuAPI, {RouteVO} from "@api/menu";
|
import MenuAPI, {RouteVO} from "@api/menu";
|
||||||
|
|
||||||
const modules = import.meta.glob("../../views/**/**.vue");
|
const modules = import.meta.glob("../../views/**/**.vue");
|
||||||
const Layout = () => import("@theme/layout/index.vue");
|
const Layout = () => import("@themeDefault/layout/index.vue");
|
||||||
|
|
||||||
export const usePermissionStore = defineStore("permission", () => {
|
export const usePermissionStore = defineStore("permission", () => {
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import defaultSettings from "@theme/settings";
|
import defaultSettings from "@themeDefault/settings";
|
||||||
import { ThemeEnum } from "@theme/enums/ThemeEnum";
|
import { ThemeEnum } from "@themeDefault/enums/ThemeEnum";
|
||||||
import Color from "color";
|
import Color from "color";
|
||||||
|
|
||||||
type SettingsValue = boolean | string;
|
type SettingsValue = boolean | string;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import AuthAPI from "@api/auth";
|
import AuthAPI from "@api/auth";
|
||||||
import UserAPI from "@api/user";
|
import UserAPI from "@api/user";
|
||||||
import {resetRouter} from "@theme/router";
|
import {resetRouter} from "@themeDefault/router";
|
||||||
import {store} from "@theme/store";
|
import {store} from "@themeDefault/store";
|
||||||
|
|
||||||
import {LoginData} from "@api/auth";
|
import {LoginData} from "@api/auth";
|
||||||
import {UserInfo} from "@api/user";
|
import {UserInfo} from "@api/user";
|
||||||
import {TOKEN_KEY} from "@theme/enums/CacheEnum";
|
import {TOKEN_KEY} from "@themeDefault/enums/CacheEnum";
|
||||||
|
|
||||||
export const useUserStore = defineStore("user", () => {
|
export const useUserStore = defineStore("user", () => {
|
||||||
const user = ref<UserInfo>({
|
const user = ref<UserInfo>({
|
||||||
|
2
src/renderer/themes/default/types/env.d.ts
vendored
2
src/renderer/themes/default/types/env.d.ts
vendored
@ -26,7 +26,7 @@ interface ImportMeta {
|
|||||||
/**
|
/**
|
||||||
* 平台的名称、版本、运行所需的`node`版本、依赖、构建时间的类型提示
|
* 平台的名称、版本、运行所需的`node`版本、依赖、构建时间的类型提示
|
||||||
*/
|
*/
|
||||||
declare const __APP_INFO__: {
|
declare const __APP_INFO_ALL__: {
|
||||||
pkg: {
|
pkg: {
|
||||||
name: string;
|
name: string;
|
||||||
version: string;
|
version: string;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// translate router.meta.title, be used in breadcrumb sidebar tagsview
|
// translate router.meta.title, be used in breadcrumb sidebar tagsview
|
||||||
import i18n from "@theme/lang/index";
|
import i18n from "@themeDefault/lang/index";
|
||||||
|
|
||||||
export function translateRouteTitle(title: any) {
|
export function translateRouteTitle(title: any) {
|
||||||
// 判断是否存在国际化配置,如果没有原生返回
|
// 判断是否存在国际化配置,如果没有原生返回
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import axios, { InternalAxiosRequestConfig, AxiosResponse } from "axios";
|
import axios, { InternalAxiosRequestConfig, AxiosResponse } from "axios";
|
||||||
import { useUserStoreHook } from "@theme/store/modules/user";
|
import { useUserStoreHook } from "@themeDefault/store/modules/user";
|
||||||
import { ResultEnum } from "@theme/enums/ResultEnum";
|
import { ResultEnum } from "@themeDefault/enums/ResultEnum";
|
||||||
import { TOKEN_KEY } from "@theme/enums/CacheEnum";
|
import { TOKEN_KEY } from "@themeDefault/enums/CacheEnum";
|
||||||
|
|
||||||
// 创建 axios 实例
|
// 创建 axios 实例
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
|
@ -121,12 +121,12 @@ defineOptions({
|
|||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
import { useUserStore } from "@theme/store/modules/user";
|
import { useUserStore } from "@themeDefault/store/modules/user";
|
||||||
import { useTransition, TransitionPresets } from "@vueuse/core";
|
import { useTransition, TransitionPresets } from "@vueuse/core";
|
||||||
|
|
||||||
import GithubCorner from "@theme/components/GithubCorner/index.vue";
|
import GithubCorner from "@themeDefault/components/GithubCorner/index.vue";
|
||||||
import VisitTrend from "@theme/views/dashboard/components/VisitTrend.vue";
|
import VisitTrend from "@themeDefault/views/dashboard/components/VisitTrend.vue";
|
||||||
import svgIcon from "@theme/components/SvgIcon/index.vue";
|
import svgIcon from "@themeDefault/components/SvgIcon/index.vue";
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const date: Date = new Date();
|
const date: Date = new Date();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import DeptAPI from "@api/dept";
|
import DeptAPI from "@api/dept";
|
||||||
import RoleAPI from "@api/role";
|
import RoleAPI from "@api/role";
|
||||||
import UserAPI, {UserForm} from "@api/user";
|
import UserAPI, {UserForm} from "@api/user";
|
||||||
import type {IModalConfig} from "@theme/components/CURD/types";
|
import type {IModalConfig} from "@themeDefault/components/CURD/types";
|
||||||
|
|
||||||
const modalConfig: IModalConfig<UserForm> = {
|
const modalConfig: IModalConfig<UserForm> = {
|
||||||
pageName: "sys:user",
|
pageName: "sys:user",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import UserAPI from "@api/user";
|
import UserAPI from "@api/user";
|
||||||
import RoleAPI from "@api/role";
|
import RoleAPI from "@api/role";
|
||||||
import type {UserPageQuery} from "@api/user";
|
import type {UserPageQuery} from "@api/user";
|
||||||
import type {IContentConfig} from "@theme/components/CURD/types";
|
import type {IContentConfig} from "@themeDefault/components/CURD/types";
|
||||||
|
|
||||||
const contentConfig: IContentConfig<UserPageQuery> = {
|
const contentConfig: IContentConfig<UserPageQuery> = {
|
||||||
pageName: "sys:user",
|
pageName: "sys:user",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { IContentConfig } from "@theme/components/CURD/types";
|
import type { IContentConfig } from "@themeDefault/components/CURD/types";
|
||||||
|
|
||||||
const contentConfig: IContentConfig = {
|
const contentConfig: IContentConfig = {
|
||||||
pageName: "sys:user",
|
pageName: "sys:user",
|
||||||
|
@ -2,9 +2,9 @@ import DeptAPI from "@api/dept";
|
|||||||
import RoleAPI from "@api/role";
|
import RoleAPI from "@api/role";
|
||||||
import UserAPI from "@api/user";
|
import UserAPI from "@api/user";
|
||||||
import type {UserForm} from "@api/user";
|
import type {UserForm} from "@api/user";
|
||||||
import type {IModalConfig} from "@theme/components/CURD/types";
|
import type {IModalConfig} from "@themeDefault/components/CURD/types";
|
||||||
import {DeviceEnum} from "@theme/enums/DeviceEnum";
|
import {DeviceEnum} from "@themeDefault/enums/DeviceEnum";
|
||||||
import {useAppStore} from "@theme/store";
|
import {useAppStore} from "@themeDefault/store";
|
||||||
|
|
||||||
const modalConfig: IModalConfig<UserForm> = {
|
const modalConfig: IModalConfig<UserForm> = {
|
||||||
pageName: "sys:user",
|
pageName: "sys:user",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import DeptAPI from "@api/dept";
|
import DeptAPI from "@api/dept";
|
||||||
import type {ISearchConfig} from "@theme/components/CURD/types";
|
import type {ISearchConfig} from "@themeDefault/components/CURD/types";
|
||||||
|
|
||||||
const searchConfig: ISearchConfig = {
|
const searchConfig: ISearchConfig = {
|
||||||
pageName: "sys:user",
|
pageName: "sys:user",
|
||||||
|
@ -90,8 +90,8 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import UserAPI from "@api/user";
|
import UserAPI from "@api/user";
|
||||||
import type {IObject, IOperatData} from "@theme/components/CURD/types";
|
import type {IObject, IOperatData} from "@themeDefault/components/CURD/types";
|
||||||
import usePage from "@theme/components/CURD/usePage";
|
import usePage from "@themeDefault/components/CURD/usePage";
|
||||||
import addModalConfig from "./config/add";
|
import addModalConfig from "./config/add";
|
||||||
import contentConfig from "./config/content";
|
import contentConfig from "./config/content";
|
||||||
import contentConfig2 from "./config/content2";
|
import contentConfig2 from "./config/content2";
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import SvgIcon from "@theme/components/SvgIcon/index.vue";
|
import SvgIcon from "@themeDefault/components/SvgIcon/index.vue";
|
||||||
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
|
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import UserAPI from "@api/user";
|
import UserAPI from "@api/user";
|
||||||
import type {ISelectConfig} from "@theme/components/TableSelect/index.vue";
|
import type {ISelectConfig} from "@themeDefault/components/TableSelect/index.vue";
|
||||||
|
|
||||||
const selectConfig: ISelectConfig = {
|
const selectConfig: ISelectConfig = {
|
||||||
pk: "id",
|
pk: "id",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!-- 文件上传组件(单图+多图)示例 -->
|
<!-- 文件上传组件(单图+多图)示例 -->
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import SingleUpload from "@theme/components/Upload/SingleUpload.vue";
|
import SingleUpload from "@themeDefault/components/Upload/SingleUpload.vue";
|
||||||
import MultiUpload from "@theme/components/Upload/MultiUpload.vue";
|
import MultiUpload from "@themeDefault/components/Upload/MultiUpload.vue";
|
||||||
|
|
||||||
const singlePicUrl = ref(
|
const singlePicUrl = ref(
|
||||||
"https://oss.youlai.tech/youlai-boot/2023/05/20/2b6d8b49fa1047348a0a41cef5aaf69e.gif"
|
"https://oss.youlai.tech/youlai-boot/2023/05/20/2b6d8b49fa1047348a0a41cef5aaf69e.gif"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<!-- wangEditor富文本编辑器示例 -->
|
<!-- wangEditor富文本编辑器示例 -->
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Editor from "@theme/components/WangEditor/index.vue";
|
import Editor from "@themeDefault/components/WangEditor/index.vue";
|
||||||
|
|
||||||
const value = ref("初始内容");
|
const value = ref("初始内容");
|
||||||
</script>
|
</script>
|
||||||
|
@ -111,8 +111,8 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
//与主进程通信
|
//与主进程通信
|
||||||
import {invoke, vueListen, IpcChannel} from "@/utils/ipcRenderer";
|
import {invoke, vueListen, IpcChannel} from "@/utils/ipcRenderer";
|
||||||
import {useUserStoreHook} from "@theme/store/modules/user";
|
import {useUserStoreHook} from "@themeDefault/store/modules/user";
|
||||||
import {TOKEN_KEY} from "@theme/enums/CacheEnum";
|
import {TOKEN_KEY} from "@themeDefault/enums/CacheEnum";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -118,21 +118,21 @@
|
|||||||
import {LocationQuery, useRoute} from "vue-router";
|
import {LocationQuery, useRoute} from "vue-router";
|
||||||
|
|
||||||
// 内部依赖
|
// 内部依赖
|
||||||
import {useSettingsStore, useUserStore} from "@theme/store";
|
import {useSettingsStore, useUserStore} from "@themeDefault/store";
|
||||||
import AuthAPI, {LoginData} from "@api/auth";
|
import AuthAPI, {LoginData} from "@api/auth";
|
||||||
import router from "@theme/router";
|
import router from "@themeDefault/router";
|
||||||
import defaultSettings from "@theme/settings";
|
import defaultSettings from "@themeDefault/settings";
|
||||||
import {ThemeEnum} from "@theme/enums/ThemeEnum";
|
import {ThemeEnum} from "@themeDefault/enums/ThemeEnum";
|
||||||
|
|
||||||
// 类型定义
|
// 类型定义
|
||||||
import type {FormInstance} from "element-plus";
|
import type {FormInstance} from "element-plus";
|
||||||
|
|
||||||
import "element-plus/theme-chalk/dark/css-vars.css";
|
import "element-plus/theme-chalk/dark/css-vars.css";
|
||||||
import "@theme/styles/index.scss";
|
import "@themeDefault/styles/index.scss";
|
||||||
import "uno.css";
|
import "uno.css";
|
||||||
import "animate.css";
|
import "animate.css";
|
||||||
// 导入 login.scss 文件
|
// 导入 login.scss 文件
|
||||||
import "@theme/styles/login.scss";
|
import "@themeDefault/styles/login.scss";
|
||||||
|
|
||||||
//
|
//
|
||||||
// import { IpcChannel } from "@src/ipc";
|
// import { IpcChannel } from "@src/ipc";
|
||||||
|
@ -466,7 +466,7 @@ defineOptions({
|
|||||||
});
|
});
|
||||||
|
|
||||||
import MenuAPI, {MenuQuery, MenuForm, MenuVO} from "@api/menu";
|
import MenuAPI, {MenuQuery, MenuForm, MenuVO} from "@api/menu";
|
||||||
import {MenuTypeEnum} from "@theme/enums/MenuTypeEnum";
|
import {MenuTypeEnum} from "@themeDefault/enums/MenuTypeEnum";
|
||||||
|
|
||||||
const queryFormRef = ref(ElForm);
|
const queryFormRef = ref(ElForm);
|
||||||
const menuFormRef = ref(ElForm);
|
const menuFormRef = ref(ElForm);
|
||||||
|
170
src/renderer/themes/geeker/views/dataScreen/index-bak.vue
Normal file
170
src/renderer/themes/geeker/views/dataScreen/index-bak.vue
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
<template>
|
||||||
|
<div class="dataScreen-container">
|
||||||
|
<div class="dataScreen-content" ref="dataScreenRef">
|
||||||
|
<div class="dataScreen-header">
|
||||||
|
<div class="header-lf">
|
||||||
|
<span class="header-screening" @click="router.push(HOME_URL)">首页</span>
|
||||||
|
</div>
|
||||||
|
<div class="header-ct">
|
||||||
|
<div class="header-ct-title">
|
||||||
|
<span>智慧旅游可视化大数据展示平台</span>
|
||||||
|
<div class="header-ct-warning">平台高峰预警信息(2条)</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="header-ri">
|
||||||
|
<span class="header-download">统计报告</span>
|
||||||
|
<span class="header-time">当前时间:{{ time }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dataScreen-main">
|
||||||
|
<div class="dataScreen-lf">
|
||||||
|
<div class="dataScreen-top">
|
||||||
|
<div class="dataScreen-main-title">
|
||||||
|
<span>实时游客统计</span>
|
||||||
|
<img src="./images/dataScreen-title.png" alt="" />
|
||||||
|
</div>
|
||||||
|
<div class="dataScreen-main-chart">
|
||||||
|
<RealTimeAccessChart />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dataScreen-center">
|
||||||
|
<div class="dataScreen-main-title">
|
||||||
|
<span>男女比例</span>
|
||||||
|
<img src="./images/dataScreen-title.png" alt="" />
|
||||||
|
</div>
|
||||||
|
<div class="dataScreen-main-chart">
|
||||||
|
<MaleFemaleRatioChart />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dataScreen-bottom">
|
||||||
|
<div class="dataScreen-main-title">
|
||||||
|
<span>年龄比例</span>
|
||||||
|
<img src="./images/dataScreen-title.png" alt="" />
|
||||||
|
</div>
|
||||||
|
<div class="dataScreen-main-chart">
|
||||||
|
<AgeRatioChart />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dataScreen-ct">
|
||||||
|
<div class="dataScreen-map">
|
||||||
|
<div class="dataScreen-map-title">景区实时客流量</div>
|
||||||
|
<!-- <vue3-seamless-scroll
|
||||||
|
:list="alarmData"
|
||||||
|
class="dataScreen-alarm"
|
||||||
|
:step="0.5"
|
||||||
|
:hover="true"
|
||||||
|
:limitScrollNum="3"
|
||||||
|
>
|
||||||
|
<div class="dataScreen-alarm">
|
||||||
|
<div class="map-item" v-for="item in alarmData" :key="item.id">
|
||||||
|
<img src="./images/dataScreen-alarm.png" alt="" />
|
||||||
|
<span class="map-alarm sle">{{ item.label }} 预警:{{ item.warnMsg }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</vue3-seamless-scroll> -->
|
||||||
|
<ChinaMapChart />
|
||||||
|
</div>
|
||||||
|
<div class="dataScreen-cb">
|
||||||
|
<div class="dataScreen-main-title">
|
||||||
|
<span>未来30天游客量趋势图</span>
|
||||||
|
<img src="./images/dataScreen-title.png" alt="" />
|
||||||
|
</div>
|
||||||
|
<div class="dataScreen-main-chart">
|
||||||
|
<OverNext30Chart />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dataScreen-rg">
|
||||||
|
<div class="dataScreen-top">
|
||||||
|
<div class="dataScreen-main-title">
|
||||||
|
<span>热门景区排行</span>
|
||||||
|
<img src="./images/dataScreen-title.png" alt="" />
|
||||||
|
</div>
|
||||||
|
<div class="dataScreen-main-chart">
|
||||||
|
<HotPlateChart />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dataScreen-center">
|
||||||
|
<div class="dataScreen-main-title">
|
||||||
|
<span>年度游客量对比</span>
|
||||||
|
<img src="./images/dataScreen-title.png" alt="" />
|
||||||
|
</div>
|
||||||
|
<div class="dataScreen-main-chart">
|
||||||
|
<AnnualUseChart />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dataScreen-bottom">
|
||||||
|
<div class="dataScreen-main-title">
|
||||||
|
<span>预约渠道数据统计</span>
|
||||||
|
<img src="./images/dataScreen-title.png" alt="" />
|
||||||
|
</div>
|
||||||
|
<div class="dataScreen-main-chart">
|
||||||
|
<PlatformSourceChart />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
defineOptions({
|
||||||
|
name: "DataScreen",
|
||||||
|
inheritAttrs: false
|
||||||
|
});
|
||||||
|
import { ref, onMounted, onBeforeUnmount } from "vue";
|
||||||
|
import { HOME_URL } from "@themeGeeker/config";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import AgeRatioChart from "./components/AgeRatioChart.vue";
|
||||||
|
import AnnualUseChart from "./components/AnnualUseChart.vue";
|
||||||
|
import ChinaMapChart from "./components/ChinaMapChart.vue";
|
||||||
|
import HotPlateChart from "./components/HotPlateChart.vue";
|
||||||
|
import MaleFemaleRatioChart from "./components/MaleFemaleRatioChart.vue";
|
||||||
|
import OverNext30Chart from "./components/OverNext30Chart.vue";
|
||||||
|
import PlatformSourceChart from "./components/PlatformSourceChart.vue";
|
||||||
|
import RealTimeAccessChart from "./components/RealTimeAccessChart.vue";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const dataScreenRef = ref<HTMLElement | null>(null);
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
if (dataScreenRef.value) {
|
||||||
|
dataScreenRef.value.style.transform = `scale(${getScale()}) translate(-50%, -50%)`;
|
||||||
|
dataScreenRef.value.style.width = `1920px`;
|
||||||
|
dataScreenRef.value.style.height = `1080px`;
|
||||||
|
}
|
||||||
|
window.addEventListener("resize", resize);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 设置响应式
|
||||||
|
const resize = () => {
|
||||||
|
if (dataScreenRef.value) {
|
||||||
|
dataScreenRef.value.style.transform = `scale(${getScale()}) translate(-50%, -50%)`;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 根据浏览器大小推断缩放比例
|
||||||
|
const getScale = (width = 1920, height = 1080) => {
|
||||||
|
let ww = window.innerWidth / width;
|
||||||
|
let wh = window.innerHeight / height;
|
||||||
|
return ww < wh ? ww : wh;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取当前时间
|
||||||
|
let timer: NodeJS.Timer | null = null;
|
||||||
|
let time = ref<string>(dayjs().format("YYYY年MM月DD HH:mm:ss"));
|
||||||
|
timer = setInterval(() => {
|
||||||
|
time.value = dayjs().format("YYYY年MM月DD HH:mm:ss");
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
window.removeEventListener("resize", resize);
|
||||||
|
clearInterval(timer as unknown as number);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import "./index.scss";
|
||||||
|
</style>
|
@ -49,7 +49,13 @@
|
|||||||
"src/renderer/store/modules/*"
|
"src/renderer/store/modules/*"
|
||||||
],
|
],
|
||||||
"@theme/*": [
|
"@theme/*": [
|
||||||
|
"src/renderer/themes/geeker/*"
|
||||||
|
],
|
||||||
|
"@themeDefault/*": [
|
||||||
"src/renderer/themes/default/*"
|
"src/renderer/themes/default/*"
|
||||||
|
],
|
||||||
|
"@themeGeeker/*": [
|
||||||
|
"src/renderer/themes/geeker/*"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"typeRoots": [
|
"typeRoots": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user