提交 c59c4e01 作者: 方治民

Merge branch '3.x' of https://gitlab.yiring.com/basic/basic-vue-admin into electron

import path from 'node:path' import path from 'node:path'
import process from 'node:process'
import fs from 'fs-extra' import fs from 'fs-extra'
import inquirer from 'inquirer' import inquirer from 'inquirer'
import colors from 'picocolors' import colors from 'picocolors'
......
// #!/usr/bin/env node // #!/usr/bin/env node
import process from 'node:process'
import colors from 'picocolors' import colors from 'picocolors'
import pkg from '../../package.json' import pkg from '../../package.json'
......
import fs from 'node:fs' import fs from 'node:fs'
import path from 'node:path' import path from 'node:path'
import process from 'node:process'
import dotenv from 'dotenv' import dotenv from 'dotenv'
export function isDevFn(mode: string): boolean { export function isDevFn(mode: string): boolean {
......
import process from 'node:process'
import type { PluginOption } from 'vite' import type { PluginOption } from 'vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx' import vueJsx from '@vitejs/plugin-vue-jsx'
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
*/ */
import path from 'node:path' import path from 'node:path'
import process from 'node:process'
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons' import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
export function configSvgIconsPlugin(isBuild: boolean) { export function configSvgIconsPlugin(isBuild: boolean) {
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
* https://github.com/anncwb/vite-plugin-theme * https://github.com/anncwb/vite-plugin-theme
*/ */
import path from 'node:path' import path from 'node:path'
import process from 'node:process'
import type { PluginOption } from 'vite' import type { PluginOption } from 'vite'
import { antdDarkThemePlugin, mixDarken, mixLighten, tinycolor, viteThemePlugin } from 'vite-plugin-theme' import { antdDarkThemePlugin, mixDarken, mixLighten, tinycolor, viteThemePlugin } from 'vite-plugin-theme'
import { generateColors, getThemeColors } from '../../config/themeConfig' import { generateColors, getThemeColors } from '../../config/themeConfig'
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -68,22 +68,21 @@ ...@@ -68,22 +68,21 @@
"@electron-toolkit/preload": "^1.0.3", "@electron-toolkit/preload": "^1.0.3",
"@electron-toolkit/utils": "^1.0.2", "@electron-toolkit/utils": "^1.0.2",
"@iconify/iconify": "^3.1.1", "@iconify/iconify": "^3.1.1",
"@logicflow/core": "^1.2.10", "@logicflow/core": "^1.2.15",
"@logicflow/extension": "^1.2.10", "@logicflow/extension": "^1.2.16",
"@purge-icons/generated": "^0.9.0",
"@stomp/stompjs": "^7.0.0", "@stomp/stompjs": "^7.0.0",
"@vue/runtime-core": "^3.3.4", "@vue/runtime-core": "^3.3.4",
"@vue/shared": "^3.3.4", "@vue/shared": "^3.3.4",
"@vueuse/core": "^10.3.0", "@vueuse/core": "^10.5.0",
"@vueuse/electron": "^10.3.0", "@vueuse/electron": "^10.5.0",
"@vueuse/shared": "^10.3.0", "@vueuse/shared": "^10.5.0",
"@zxcvbn-ts/core": "^2.2.1", "@zxcvbn-ts/core": "^2.2.1",
"ant-design-vue": "^3.2.20", "ant-design-vue": "^3.2.20",
"axios": "^0.26.1", "axios": "^0.26.1",
"codemirror": "^5.65.14", "codemirror": "^5.65.15",
"cropperjs": "^1.5.13", "cropperjs": "^1.6.1",
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
"dayjs": "^1.11.9", "dayjs": "^1.11.10",
"default-passive-events": "^2.0.0", "default-passive-events": "^2.0.0",
"echarts": "^5.4.3", "echarts": "^5.4.3",
"electron-log": "^4.4.8", "electron-log": "^4.4.8",
...@@ -107,11 +106,11 @@ ...@@ -107,11 +106,11 @@
"sortablejs": "^1.15.0", "sortablejs": "^1.15.0",
"stompjs": "^2.3.3", "stompjs": "^2.3.3",
"tinymce": "^5.10.7", "tinymce": "^5.10.7",
"vditor": "^3.9.4", "vditor": "^3.9.6",
"vue": "^3.3.4", "vue": "^3.3.4",
"vue-i18n": "^9.2.2", "vue-i18n": "^9.5.0",
"vue-json-pretty": "^2.2.4", "vue-json-pretty": "^2.2.4",
"vue-router": "^4.2.4", "vue-router": "^4.2.5",
"vue-types": "^5.1.1", "vue-types": "^5.1.1",
"xlsx": "^0.18.5" "xlsx": "^0.18.5"
}, },
...@@ -141,12 +140,12 @@ ...@@ -141,12 +140,12 @@
"@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0", "@typescript-eslint/parser": "^5.62.0",
"@vitejs/plugin-legacy": "^4.1.1", "@vitejs/plugin-legacy": "^4.1.1",
"@vitejs/plugin-vue": "^4.2.3", "@vitejs/plugin-vue": "^4.4.0",
"@vitejs/plugin-vue-jsx": "^3.0.1", "@vitejs/plugin-vue-jsx": "^3.0.2",
"@vue/compiler-dom": "^3.3.4", "@vue/compiler-dom": "^3.3.4",
"@vue/compiler-sfc": "^3.3.4", "@vue/compiler-sfc": "^3.3.4",
"@vue/test-utils": "^2.4.1", "@vue/test-utils": "^2.4.1",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.16",
"commitizen": "^4.3.0", "commitizen": "^4.3.0",
"conventional-changelog-cli": "^2.2.2", "conventional-changelog-cli": "^2.2.2",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
...@@ -164,44 +163,44 @@ ...@@ -164,44 +163,44 @@
"esno": "^0.16.3", "esno": "^0.16.3",
"fs-extra": "^11.1.1", "fs-extra": "^11.1.1",
"husky": "^8.0.3", "husky": "^8.0.3",
"inquirer": "^9.2.10", "inquirer": "^9.2.11",
"less": "^4.2.0", "less": "^4.2.0",
"lint-staged": "^13.2.3", "lint-staged": "^13.3.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"pont-engine": "^1.5.12", "pont-engine": "^1.5.12",
"postcss": "^8.4.27", "postcss": "^8.4.31",
"postcss-html": "^1.5.0", "postcss-html": "^1.5.0",
"postcss-less": "^6.0.0", "postcss-less": "^6.0.0",
"prettier": "^2.8.8", "prettier": "^2.8.8",
"rimraf": "^5.0.1", "rimraf": "^5.0.5",
"rollup": "^3.28.0", "rollup": "^3.29.4",
"rollup-plugin-visualizer": "^5.9.2", "rollup-plugin-visualizer": "^5.9.2",
"sort-package-json": "^2.5.1", "sort-package-json": "^2.6.0",
"stylelint": "^15.10.2", "stylelint": "^15.10.3",
"stylelint-config-recommended": "^12.0.0", "stylelint-config-recommended": "^12.0.0",
"stylelint-config-recommended-vue": "^1.5.0", "stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard": "^33.0.0", "stylelint-config-standard": "^33.0.0",
"stylelint-order": "^6.0.3", "stylelint-order": "^6.0.3",
"terser": "^5.19.2", "terser": "^5.21.0",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^4.9.5", "typescript": "^4.9.5",
"unplugin-auto-import": "^0.16.6", "unplugin-auto-import": "^0.16.6",
"vite": "^4.4.9", "vite": "^4.4.11",
"vite-plugin-compression": "^0.5.1", "vite-plugin-compression": "^0.5.1",
"vite-plugin-html": "^3.2.0", "vite-plugin-html": "^3.2.0",
"vite-plugin-mkcert": "^1.16.0", "vite-plugin-mkcert": "^1.16.0",
"vite-plugin-mock": "^2.9.8", "vite-plugin-mock": "^2.9.8",
"vite-plugin-purge-icons": "^0.9.2", "vite-plugin-purge-icons": "^0.9.2",
"vite-plugin-pwa": "^0.16.4", "vite-plugin-pwa": "^0.16.5",
"vite-plugin-style-import": "^2.0.0", "vite-plugin-style-import": "^2.0.0",
"vite-plugin-svg-icons": "^2.0.1", "vite-plugin-svg-icons": "^2.0.1",
"vite-plugin-theme": "^0.8.6", "vite-plugin-theme": "^0.8.6",
"vite-plugin-vue-setup-extend": "^0.4.0", "vite-plugin-vue-setup-extend": "^0.4.0",
"vite-plugin-windicss": "^1.9.0", "vite-plugin-windicss": "^1.9.1",
"vue-eslint-parser": "^9.3.1", "vue-eslint-parser": "^9.3.2",
"vue-tsc": "^1.8.8" "vue-tsc": "^1.8.18"
}, },
"engines": { "engines": {
"node": ">=14" "node": ">=14"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -41,7 +41,7 @@ export const useUserStore = defineStore({ ...@@ -41,7 +41,7 @@ export const useUserStore = defineStore({
}), }),
getters: { getters: {
getUserInfo(): UserInfo { getUserInfo(): UserInfo {
return this.userInfo || getAuthCache<UserInfo>(USER_INFO_KEY) || {} return this.userInfo || getAuthCache<UserInfo>(USER_INFO_KEY) || ({} as UserInfo)
}, },
getToken(): string { getToken(): string {
return this.token || getAuthCache<string>(TOKEN_KEY) return this.token || getAuthCache<string>(TOKEN_KEY)
...@@ -127,7 +127,7 @@ export const useUserStore = defineStore({ ...@@ -127,7 +127,7 @@ export const useUserStore = defineStore({
const userInfo = await getUserInfo() const userInfo = await getUserInfo()
const { roles = [] } = userInfo const { roles = [] } = userInfo
if (isArray(roles)) { if (isArray(roles)) {
const roleList = roles.map((item) => item.value) as RoleEnum[] const roleList = roles.map((item) => item.uid) as RoleEnum[]
this.setRoleList(roleList) this.setRoleList(roleList)
} else { } else {
userInfo.roles = [] userInfo.roles = []
......
...@@ -70,5 +70,5 @@ declare global { ...@@ -70,5 +70,5 @@ declare global {
// for type re-export // for type re-export
declare global { declare global {
// @ts-ignore // @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue' export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
} }
import process from 'node:process'
import { resolve } from 'node:path' import { resolve } from 'node:path'
import type { ConfigEnv, UserConfig } from 'vite' import type { ConfigEnv, UserConfig } from 'vite'
import dayjs from 'dayjs' import dayjs from 'dayjs'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论