Merge branch 'master' of https://github.com/xingyu4j/vue-element-plus-admin
This commit is contained in:
commit
662e5b2489
|
@ -1,11 +1,11 @@
|
|||
# 环境
|
||||
NODE_ENV = development
|
||||
NODE_ENV=development
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH = base
|
||||
VITE_API_BASEPATH=base
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH = /
|
||||
VITE_BASE_PATH=/
|
||||
|
||||
# 标题
|
||||
VITE_APP_TITLE = ElementAdmin
|
||||
VITE_APP_TITLE=ElementAdmin
|
||||
|
|
16
.env.dev
16
.env.dev
|
@ -1,23 +1,23 @@
|
|||
# 环境
|
||||
NODE_ENV = production
|
||||
NODE_ENV=production
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH = dev
|
||||
VITE_API_BASEPATH=dev
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH = /dist-dev/
|
||||
VITE_BASE_PATH=/dist-dev/
|
||||
|
||||
# 是否删除debugger
|
||||
VITE_DROP_DEBUGGER = false
|
||||
VITE_DROP_DEBUGGER=false
|
||||
|
||||
# 是否删除console.log
|
||||
VITE_DROP_CONSOLE = false
|
||||
VITE_DROP_CONSOLE=false
|
||||
|
||||
# 是否sourcemap
|
||||
VITE_SOURCEMAP = true
|
||||
VITE_SOURCEMAP=true
|
||||
|
||||
# 输出路径
|
||||
VITE_OUT_DIR = dist-dev
|
||||
VITE_OUT_DIR=dist-dev
|
||||
|
||||
# 标题
|
||||
VITE_APP_TITLE = ElementAdmin
|
||||
VITE_APP_TITLE=ElementAdmin
|
||||
|
|
16
.env.gitee
16
.env.gitee
|
@ -1,23 +1,23 @@
|
|||
# 环境
|
||||
NODE_ENV = production
|
||||
NODE_ENV=production
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH = pro
|
||||
VITE_API_BASEPATH=pro
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH = /vue-element-plus-admin/
|
||||
VITE_BASE_PATH=/vue-element-plus-admin/
|
||||
|
||||
# 是否删除debugger
|
||||
VITE_DROP_DEBUGGER = true
|
||||
VITE_DROP_DEBUGGER=true
|
||||
|
||||
# 是否删除console.log
|
||||
VITE_DROP_CONSOLE = true
|
||||
VITE_DROP_CONSOLE=true
|
||||
|
||||
# 是否sourcemap
|
||||
VITE_SOURCEMAP = false
|
||||
VITE_SOURCEMAP=false
|
||||
|
||||
# 输出路径
|
||||
VITE_OUT_DIR = dist-pro
|
||||
VITE_OUT_DIR=dist-pro
|
||||
|
||||
# 标题
|
||||
VITE_APP_TITLE = ElementAdmin
|
||||
VITE_APP_TITLE=ElementAdmin
|
||||
|
|
16
.env.pro
16
.env.pro
|
@ -1,23 +1,23 @@
|
|||
# 环境
|
||||
NODE_ENV = production
|
||||
NODE_ENV=production
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH = pro
|
||||
VITE_API_BASEPATH=pro
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH = /
|
||||
VITE_BASE_PATH=/
|
||||
|
||||
# 是否删除debugger
|
||||
VITE_DROP_DEBUGGER = true
|
||||
VITE_DROP_DEBUGGER=true
|
||||
|
||||
# 是否删除console.log
|
||||
VITE_DROP_CONSOLE = true
|
||||
VITE_DROP_CONSOLE=true
|
||||
|
||||
# 是否sourcemap
|
||||
VITE_SOURCEMAP = false
|
||||
VITE_SOURCEMAP=false
|
||||
|
||||
# 输出路径
|
||||
VITE_OUT_DIR = dist-pro
|
||||
VITE_OUT_DIR=dist-pro
|
||||
|
||||
# 标题
|
||||
VITE_APP_TITLE = ElementAdmin
|
||||
VITE_APP_TITLE=ElementAdmin
|
||||
|
|
17
.env.test
17
.env.test
|
@ -1,20 +1,23 @@
|
|||
# 环境
|
||||
NODE_ENV = production
|
||||
NODE_ENV=production
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH = test
|
||||
VITE_API_BASEPATH=test
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH = /dist-test/
|
||||
VITE_BASE_PATH=/dist-test/
|
||||
|
||||
# 是否删除debugger
|
||||
VITE_DROP_DEBUGGER = false
|
||||
VITE_DROP_DEBUGGER=false
|
||||
|
||||
# 是否删除console.log
|
||||
VITE_DROP_CONSOLE = false
|
||||
VITE_DROP_CONSOLE=false
|
||||
|
||||
# 是否sourcemap
|
||||
VITE_SOURCEMAP = true
|
||||
VITE_SOURCEMAP=true
|
||||
|
||||
# 输出路径
|
||||
VITE_OUT_DIR = dist-test
|
||||
VITE_OUT_DIR=dist-test
|
||||
|
||||
# 标题
|
||||
VITE_APP_TITLE=ElementAdmin
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
## [1.5.4](https://github.com/kailong321200875/vue-element-plus-admin/compare/v1.5.3...v1.5.4) (2022-07-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* fix build:test error ([14530cf](https://github.com/kailong321200875/vue-element-plus-admin/commit/14530cf790bfbbe37c72fa831f0376bbb4209e9d))
|
||||
|
||||
## [1.5.3](https://github.com/kailong321200875/vue-element-plus-admin/compare/v1.5.2...v1.5.3) (2022-07-01)
|
||||
|
||||
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'
|
||||
|
||||
const modules = import.meta.globEager('./**/*.ts')
|
||||
const modules = import.meta.glob('./**/*.ts', {
|
||||
import: 'default',
|
||||
eager: true
|
||||
})
|
||||
|
||||
const mockModules: any[] = []
|
||||
Object.keys(modules).forEach((key) => {
|
||||
Object.keys(modules).forEach(async (key) => {
|
||||
if (key.includes('_')) {
|
||||
return
|
||||
}
|
||||
mockModules.push(...modules[key].default)
|
||||
mockModules.push(...(modules[key] as any))
|
||||
})
|
||||
|
||||
export function setupProdMockServer() {
|
||||
|
|
50
package.json
50
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "vue-element-plus-admin",
|
||||
"version": "1.5.3",
|
||||
"version": "1.5.4",
|
||||
"description": "一套基于vue3、element-plus、typesScript、vite2的后台集成方案。",
|
||||
"author": "Archer <502431556@qq.com>",
|
||||
"private": false,
|
||||
|
@ -27,82 +27,82 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@iconify/iconify": "^2.2.1",
|
||||
"@vueuse/core": "^8.7.5",
|
||||
"@wangeditor/editor": "^5.1.1",
|
||||
"@vueuse/core": "^8.9.3",
|
||||
"@wangeditor/editor": "^5.1.9",
|
||||
"@wangeditor/editor-for-vue": "^5.1.10",
|
||||
"@zxcvbn-ts/core": "^2.0.1",
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "^0.27.2",
|
||||
"echarts": "^5.3.3",
|
||||
"echarts-wordcloud": "^2.0.0",
|
||||
"element-plus": "2.2.7",
|
||||
"intro.js": "^5.1.0",
|
||||
"element-plus": "2.2.9",
|
||||
"intro.js": "^6.0.0",
|
||||
"js-md5": "^0.7.3",
|
||||
"lodash-es": "^4.17.21",
|
||||
"mitt": "^3.0.0",
|
||||
"mockjs": "^1.1.0",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinia": "^2.0.14",
|
||||
"pinia": "^2.0.16",
|
||||
"pinia-plugin-persist": "^1.0.0",
|
||||
"qrcode": "^1.5.0",
|
||||
"qrcode": "^1.5.1",
|
||||
"qs": "^6.11.0",
|
||||
"url": "^0.11.0",
|
||||
"vue": "3.2.37",
|
||||
"vue-i18n": "9.1.10",
|
||||
"vue-router": "^4.0.16",
|
||||
"vue-router": "^4.1.2",
|
||||
"vue-types": "^4.1.1",
|
||||
"web-storage-cache": "^1.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^17.0.3",
|
||||
"@commitlint/config-conventional": "^17.0.3",
|
||||
"@iconify/json": "^2.1.70",
|
||||
"@intlify/vite-plugin-vue-i18n": "^3.4.0",
|
||||
"@iconify/json": "^2.1.78",
|
||||
"@intlify/vite-plugin-vue-i18n": "^5.0.0",
|
||||
"@purge-icons/generated": "^0.8.1",
|
||||
"@types/intro.js": "^3.0.2",
|
||||
"@types/intro.js": "^5.1.0",
|
||||
"@types/js-md5": "^0.4.3",
|
||||
"@types/lodash-es": "^4.17.6",
|
||||
"@types/node": "^18.0.0",
|
||||
"@types/node": "^18.0.5",
|
||||
"@types/nprogress": "^0.2.0",
|
||||
"@types/qrcode": "^1.4.2",
|
||||
"@types/qs": "^6.9.7",
|
||||
"@typescript-eslint/eslint-plugin": "^5.30.0",
|
||||
"@typescript-eslint/parser": "^5.30.0",
|
||||
"@vitejs/plugin-vue": "^2.3.3",
|
||||
"@vitejs/plugin-vue-jsx": "^1.3.10",
|
||||
"@typescript-eslint/eslint-plugin": "^5.30.6",
|
||||
"@typescript-eslint/parser": "^5.30.6",
|
||||
"@vitejs/plugin-vue": "^3.0.0",
|
||||
"@vitejs/plugin-vue-jsx": "^2.0.0",
|
||||
"autoprefixer": "^10.4.7",
|
||||
"eslint": "^8.18.0",
|
||||
"eslint": "^8.19.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-define-config": "^1.5.1",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-vue": "^9.1.1",
|
||||
"eslint-plugin-vue": "^9.2.0",
|
||||
"husky": "^8.0.1",
|
||||
"less": "^4.1.3",
|
||||
"lint-staged": "^13.0.3",
|
||||
"plop": "^3.1.1",
|
||||
"postcss": "^8.4.14",
|
||||
"postcss-html": "^1.4.1",
|
||||
"postcss-html": "^1.5.0",
|
||||
"postcss-less": "^6.0.0",
|
||||
"prettier": "^2.7.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "^2.75.7",
|
||||
"rollup": "^2.77.0",
|
||||
"stylelint": "^14.9.1",
|
||||
"stylelint-config-html": "^1.0.0",
|
||||
"stylelint-config-html": "^1.1.0",
|
||||
"stylelint-config-prettier": "^9.0.3",
|
||||
"stylelint-config-recommended": "^8.0.0",
|
||||
"stylelint-config-standard": "^26.0.0",
|
||||
"stylelint-order": "^5.0.0",
|
||||
"typescript": "4.7.4",
|
||||
"unplugin-vue-define-options": "^0.6.1",
|
||||
"vite": "2.9.13",
|
||||
"unplugin-vue-define-options": "^0.6.2",
|
||||
"vite": "3.0.0",
|
||||
"vite-plugin-eslint": "^1.6.1",
|
||||
"vite-plugin-html": "^3.2.0",
|
||||
"vite-plugin-mock": "^2.9.6",
|
||||
"vite-plugin-purge-icons": "^0.8.1",
|
||||
"vite-plugin-style-import": "^1.4.1",
|
||||
"vite-plugin-svg-icons": "^2.0.1",
|
||||
"vite-plugin-windicss": "^1.8.6",
|
||||
"vue-tsc": "^0.38.2",
|
||||
"vite-plugin-windicss": "^1.8.7",
|
||||
"vue-tsc": "^0.38.5",
|
||||
"windicss": "^3.5.6",
|
||||
"windicss-analysis": "^0.3.5"
|
||||
},
|
||||
|
|
|
@ -30,6 +30,7 @@ export const humpToUnderline = (str: string): string => {
|
|||
* @returns 字符串驼峰
|
||||
*/
|
||||
export const underlineToHump = (str: string): string => {
|
||||
if (!str) return ''
|
||||
return str.replace(/\-(\w)/g, (_, letter: string) => {
|
||||
return letter.toUpperCase()
|
||||
})
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import type { Router, RouteLocationNormalized, RouteRecordNormalized, RouteMeta } from 'vue-router'
|
||||
import type {
|
||||
Router,
|
||||
RouteLocationNormalized,
|
||||
RouteRecordNormalized,
|
||||
RouteMeta,
|
||||
RouteRecordRaw
|
||||
} from 'vue-router'
|
||||
import { isUrl } from '@/utils/is'
|
||||
import { omit, cloneDeep } from 'lodash-es'
|
||||
|
||||
|
@ -154,7 +160,7 @@ const isMultipleRoute = (route: AppRouteRecordRaw) => {
|
|||
// 生成二级路由
|
||||
const promoteRouteLevel = (route: AppRouteRecordRaw) => {
|
||||
let router: Router | null = createRouter({
|
||||
routes: [route as unknown as RouteRecordNormalized],
|
||||
routes: [route as RouteRecordRaw],
|
||||
history: createWebHashHistory()
|
||||
})
|
||||
|
||||
|
|
|
@ -34,7 +34,10 @@ const schema = reactive<FormSchema[]>([
|
|||
label: 'option2',
|
||||
value: '2'
|
||||
}
|
||||
]
|
||||
],
|
||||
onChange: (value: string) => {
|
||||
console.log(value)
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -13,6 +13,7 @@ const { getPrefixCls } = useDesign()
|
|||
const prefixCls = getPrefixCls('login')
|
||||
|
||||
const appStore = useAppStore()
|
||||
console.log(appStore)
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
|||
minify: 'terser',
|
||||
outDir: env.VITE_OUT_DIR || 'dist',
|
||||
sourcemap: env.VITE_SOURCEMAP === 'true' ? 'inline' : false,
|
||||
brotliSize: false,
|
||||
// brotliSize: false,
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_debugger: env.VITE_DROP_DEBUGGER === 'true',
|
||||
|
|
Loading…
Reference in New Issue