commit
b3b427edef
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vue-element-plus-admin",
|
||||
"version": "2.5.6",
|
||||
"version": "2.7.0",
|
||||
"description": "一套基于vue3、element-plus、typesScript、vite4的后台集成方案。",
|
||||
"author": "Archer <502431556@qq.com>",
|
||||
"private": false,
|
||||
@ -24,18 +24,18 @@
|
||||
"dependencies": {
|
||||
"@iconify/iconify": "3.1.1",
|
||||
"@iconify/vue": "4.1.1",
|
||||
"@vueuse/core": "10.7.1",
|
||||
"@vueuse/core": "10.9.0",
|
||||
"@wangeditor/editor": "5.1.23",
|
||||
"@wangeditor/editor-for-vue": "5.1.10",
|
||||
"@zxcvbn-ts/core": "3.0.4",
|
||||
"animate.css": "4.1.1",
|
||||
"axios": "1.6.5",
|
||||
"axios": "1.6.7",
|
||||
"cropperjs": "1.6.1",
|
||||
"dayjs": "1.11.10",
|
||||
"driver.js": "1.3.1",
|
||||
"echarts": "5.4.3",
|
||||
"echarts": "5.5.0",
|
||||
"echarts-wordcloud": "2.1.0",
|
||||
"element-plus": "2.4.4",
|
||||
"element-plus": "2.5.6",
|
||||
"lodash-es": "4.17.21",
|
||||
"mitt": "3.0.1",
|
||||
"nprogress": "0.2.0",
|
||||
@ -44,68 +44,68 @@
|
||||
"qrcode": "1.5.3",
|
||||
"qs": "6.11.2",
|
||||
"url": "0.11.3",
|
||||
"vue": "3.4.7",
|
||||
"vue-draggable-plus": "0.3.4",
|
||||
"vue-i18n": "9.9.0",
|
||||
"vue": "3.4.20",
|
||||
"vue-draggable-plus": "0.3.5",
|
||||
"vue-i18n": "9.9.1",
|
||||
"vue-json-pretty": "2.3.0",
|
||||
"vue-router": "4.2.5",
|
||||
"vue-router": "4.3.0",
|
||||
"vue-types": "5.1.1",
|
||||
"xgplayer": "3.0.11"
|
||||
"xgplayer": "3.0.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@amap/amap-jsapi-loader": "1.0.1",
|
||||
"@commitlint/cli": "18.4.4",
|
||||
"@commitlint/config-conventional": "18.4.4",
|
||||
"@iconify/json": "2.2.166",
|
||||
"@commitlint/cli": "19.0.1",
|
||||
"@commitlint/config-conventional": "19.0.0",
|
||||
"@iconify/json": "2.2.187",
|
||||
"@intlify/unplugin-vue-i18n": "2.0.0",
|
||||
"@kjgl77/datav-vue3": "1.6.1",
|
||||
"@types/fs-extra": "11.0.4",
|
||||
"@types/inquirer": "9.0.7",
|
||||
"@types/lodash-es": "4.17.12",
|
||||
"@types/node": "20.10.8",
|
||||
"@types/node": "20.11.21",
|
||||
"@types/nprogress": "0.2.3",
|
||||
"@types/qrcode": "1.5.5",
|
||||
"@types/qs": "6.9.11",
|
||||
"@types/sortablejs": "1.15.7",
|
||||
"@typescript-eslint/eslint-plugin": "6.18.1",
|
||||
"@typescript-eslint/parser": "6.18.1",
|
||||
"@unocss/transformer-variant-group": "0.58.3",
|
||||
"@vitejs/plugin-legacy": "5.2.0",
|
||||
"@vitejs/plugin-vue": "5.0.2",
|
||||
"@types/qs": "6.9.12",
|
||||
"@types/sortablejs": "1.15.8",
|
||||
"@typescript-eslint/eslint-plugin": "7.1.0",
|
||||
"@typescript-eslint/parser": "7.1.0",
|
||||
"@unocss/transformer-variant-group": "0.58.5",
|
||||
"@vitejs/plugin-legacy": "5.3.1",
|
||||
"@vitejs/plugin-vue": "5.0.4",
|
||||
"@vitejs/plugin-vue-jsx": "3.1.0",
|
||||
"autoprefixer": "10.4.16",
|
||||
"autoprefixer": "10.4.17",
|
||||
"chalk": "5.3.0",
|
||||
"consola": "3.2.3",
|
||||
"cron-validate": "1.4.5",
|
||||
"eslint": "8.56.0",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-config-prettier": "9.1.0",
|
||||
"eslint-define-config": "2.1.0",
|
||||
"eslint-plugin-prettier": "5.1.2",
|
||||
"eslint-plugin-vue": "9.19.2",
|
||||
"eslint-plugin-prettier": "5.1.3",
|
||||
"eslint-plugin-vue": "9.22.0",
|
||||
"esno": "4.0.0",
|
||||
"fs-extra": "11.2.0",
|
||||
"inquirer": "9.2.12",
|
||||
"inquirer": "9.2.15",
|
||||
"less": "4.2.0",
|
||||
"lint-staged": "15.2.0",
|
||||
"lint-staged": "15.2.2",
|
||||
"lodash": "4.17.21",
|
||||
"moment": "2.30.1",
|
||||
"plop": "4.0.1",
|
||||
"postcss": "8.4.33",
|
||||
"postcss-html": "1.5.0",
|
||||
"postcss": "8.4.35",
|
||||
"postcss-html": "1.6.0",
|
||||
"postcss-less": "6.0.0",
|
||||
"prettier": "3.1.1",
|
||||
"prettier": "3.2.5",
|
||||
"rimraf": "5.0.5",
|
||||
"rollup": "4.9.4",
|
||||
"rollup": "4.12.0",
|
||||
"rollup-plugin-visualizer": "5.12.0",
|
||||
"stylelint": "16.1.0",
|
||||
"stylelint": "16.2.1",
|
||||
"stylelint-config-html": "1.1.0",
|
||||
"stylelint-config-recommended": "14.0.0",
|
||||
"stylelint-config-standard": "36.0.0",
|
||||
"stylelint-order": "6.0.4",
|
||||
"terser": "5.26.0",
|
||||
"terser": "5.28.1",
|
||||
"typescript": "5.3.3",
|
||||
"unocss": "0.58.3",
|
||||
"vite": "5.0.11",
|
||||
"unocss": "0.58.5",
|
||||
"vite": "5.1.4",
|
||||
"vite-plugin-ejs": "1.7.0",
|
||||
"vite-plugin-eslint": "1.8.1",
|
||||
"vite-plugin-progress": "0.0.7",
|
||||
@ -113,9 +113,10 @@
|
||||
"vite-plugin-style-import": "2.0.0",
|
||||
"vite-plugin-svg-icons": "2.0.1",
|
||||
"vue-draggable-plus": "0.2.6",
|
||||
"vite-plugin-url-copy": "1.1.3",
|
||||
"vue-tsc": "1.8.27",
|
||||
"vue3-json-viewer": "2.2.2",
|
||||
"zipson": "^0.2.12"
|
||||
"zipson": "0.2.12"
|
||||
},
|
||||
"packageManager": "pnpm@8.1.0",
|
||||
"engines": {
|
||||
|
@ -484,7 +484,15 @@ export default defineComponent({
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
.@{elNamespace}-form--inline .@{elNamespace}-input {
|
||||
width: 245px;
|
||||
.@{elNamespace}-form--inline {
|
||||
:deep(.el-form-item__content) {
|
||||
& > :first-child {
|
||||
min-width: 229.5px;
|
||||
}
|
||||
}
|
||||
.@{elNamespace}-input-number {
|
||||
// 229.5px是兼容el-input-number的最小宽度,
|
||||
min-width: 229.5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -93,7 +93,7 @@ export default defineComponent({
|
||||
>
|
||||
{{
|
||||
default: () => {
|
||||
const { renderMenuItem } = useRenderMenuItem(unref(menuMode))
|
||||
const { renderMenuItem } = useRenderMenuItem()
|
||||
return renderMenuItem(unref(routers))
|
||||
}
|
||||
}}
|
||||
|
@ -2,57 +2,49 @@ import { ElSubMenu, ElMenuItem } from 'element-plus'
|
||||
import { hasOneShowingChild } from '../helper'
|
||||
import { isUrl } from '@/utils/is'
|
||||
import { useRenderMenuTitle } from './useRenderMenuTitle'
|
||||
import { useDesign } from '@/hooks/web/useDesign'
|
||||
import { pathResolve } from '@/utils/routerHelper'
|
||||
|
||||
const { renderMenuTitle } = useRenderMenuTitle()
|
||||
|
||||
export const useRenderMenuItem = (
|
||||
export const useRenderMenuItem = () =>
|
||||
// allRouters: AppRouteRecordRaw[] = [],
|
||||
menuMode: 'vertical' | 'horizontal'
|
||||
) => {
|
||||
const renderMenuItem = (routers: AppRouteRecordRaw[], parentPath = '/') => {
|
||||
return routers
|
||||
.filter((v) => !v.meta?.hidden)
|
||||
.map((v) => {
|
||||
const meta = v.meta ?? {}
|
||||
const { oneShowingChild, onlyOneChild } = hasOneShowingChild(v.children, v)
|
||||
const fullPath = isUrl(v.path) ? v.path : pathResolve(parentPath, v.path) // getAllParentPath<AppRouteRecordRaw>(allRouters, v.path).join('/')
|
||||
{
|
||||
const renderMenuItem = (routers: AppRouteRecordRaw[], parentPath = '/') => {
|
||||
return routers
|
||||
.filter((v) => !v.meta?.hidden)
|
||||
.map((v) => {
|
||||
const meta = v.meta ?? {}
|
||||
const { oneShowingChild, onlyOneChild } = hasOneShowingChild(v.children, v)
|
||||
const fullPath = isUrl(v.path) ? v.path : pathResolve(parentPath, v.path) // getAllParentPath<AppRouteRecordRaw>(allRouters, v.path).join('/')
|
||||
|
||||
if (
|
||||
oneShowingChild &&
|
||||
(!onlyOneChild?.children || onlyOneChild?.noShowingChildren) &&
|
||||
!meta?.alwaysShow
|
||||
) {
|
||||
return (
|
||||
<ElMenuItem index={onlyOneChild ? pathResolve(fullPath, onlyOneChild.path) : fullPath}>
|
||||
{{
|
||||
default: () => renderMenuTitle(onlyOneChild ? onlyOneChild?.meta : meta)
|
||||
}}
|
||||
</ElMenuItem>
|
||||
)
|
||||
} else {
|
||||
const { getPrefixCls } = useDesign()
|
||||
if (
|
||||
oneShowingChild &&
|
||||
(!onlyOneChild?.children || onlyOneChild?.noShowingChildren) &&
|
||||
!meta?.alwaysShow
|
||||
) {
|
||||
return (
|
||||
<ElMenuItem
|
||||
index={onlyOneChild ? pathResolve(fullPath, onlyOneChild.path) : fullPath}
|
||||
>
|
||||
{{
|
||||
default: () => renderMenuTitle(onlyOneChild ? onlyOneChild?.meta : meta)
|
||||
}}
|
||||
</ElMenuItem>
|
||||
)
|
||||
} else {
|
||||
return (
|
||||
<ElSubMenu index={fullPath}>
|
||||
{{
|
||||
title: () => renderMenuTitle(meta),
|
||||
default: () => renderMenuItem(v.children!, fullPath)
|
||||
}}
|
||||
</ElSubMenu>
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const preFixCls = getPrefixCls('menu-popper')
|
||||
return (
|
||||
<ElSubMenu
|
||||
index={fullPath}
|
||||
popperClass={
|
||||
menuMode === 'vertical' ? `${preFixCls}--vertical` : `${preFixCls}--horizontal`
|
||||
}
|
||||
>
|
||||
{{
|
||||
title: () => renderMenuTitle(meta),
|
||||
default: () => renderMenuItem(v.children!, fullPath)
|
||||
}}
|
||||
</ElSubMenu>
|
||||
)
|
||||
}
|
||||
})
|
||||
return {
|
||||
renderMenuItem
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
renderMenuItem
|
||||
}
|
||||
}
|
||||
|
@ -88,6 +88,9 @@ export default defineComponent({
|
||||
} else {
|
||||
showTitle.value = !collapse
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
|
||||
@ -202,11 +205,12 @@ export default defineComponent({
|
||||
</div>
|
||||
<Menu
|
||||
class={[
|
||||
'!absolute top-0 z-1000',
|
||||
'!absolute top-0 z-3000',
|
||||
{
|
||||
'!left-[var(--tab-menu-min-width)]': unref(collapse),
|
||||
'!left-[var(--tab-menu-max-width)]': !unref(collapse),
|
||||
'!w-[var(--left-menu-max-width)]': unref(showMenu) || unref(fixedMenu),
|
||||
'!w-[var(--left-menu-max-width)] border-r-1 border-r-solid border-[var(--el-border-color)]':
|
||||
unref(showMenu) || unref(fixedMenu),
|
||||
'!w-0': !unref(showMenu) && !unref(fixedMenu)
|
||||
}
|
||||
]}
|
||||
|
@ -80,7 +80,7 @@ export default defineComponent({
|
||||
border: propTypes.bool.def(true),
|
||||
size: {
|
||||
type: String as PropType<ComponentSize>,
|
||||
validator: (v: ComponentSize) => ['medium', 'small', 'mini'].includes(v)
|
||||
validator: (v: ComponentSize) => ['default', 'small', 'large'].includes(v)
|
||||
},
|
||||
fit: propTypes.bool.def(true),
|
||||
showHeader: propTypes.bool.def(true),
|
||||
@ -349,6 +349,7 @@ export default defineComponent({
|
||||
const bindValue: Recordable = { ...attrs, ...unref(getProps) }
|
||||
delete bindValue.columns
|
||||
delete bindValue.data
|
||||
delete bindValue.align
|
||||
return bindValue
|
||||
})
|
||||
|
||||
|
@ -24,13 +24,8 @@ import { propTypes } from '@/utils/propTypes'
|
||||
import { moveElementToIndex } from '@/utils/index'
|
||||
import { BaseButton } from '@/components/Button'
|
||||
|
||||
const appStore = useAppStore()
|
||||
const sizeMap = computed(() => appStore.sizeMap)
|
||||
|
||||
const { setStorage, getStorage, removeStorage } = useStorage()
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
export default defineComponent({
|
||||
name: 'TableActions',
|
||||
props: {
|
||||
@ -47,6 +42,10 @@ export default defineComponent({
|
||||
},
|
||||
emits: ['refresh', 'changSize'],
|
||||
setup(props, { emit }) {
|
||||
const appStore = useAppStore()
|
||||
const sizeMap = computed(() => appStore.sizeMap)
|
||||
const { t } = useI18n()
|
||||
|
||||
const refresh = () => {
|
||||
emit('refresh')
|
||||
}
|
||||
|
@ -210,13 +210,14 @@ const isActive = (route: RouteLocationNormalizedLoaded): boolean => {
|
||||
// 所有右键菜单组件的元素
|
||||
const itemRefs = useTemplateRefsList<ComponentRef<typeof ContextMenu & ContextMenuExpose>>()
|
||||
|
||||
// 右键菜单装填改变的时候
|
||||
// 右键菜单状态改变的时候
|
||||
const visibleChange = (visible: boolean, tagItem: RouteLocationNormalizedLoaded) => {
|
||||
if (visible) {
|
||||
for (const v of unref(itemRefs)) {
|
||||
const elDropdownMenuRef = v.elDropdownMenuRef
|
||||
if (tagItem.fullPath !== v.tagItem.fullPath) {
|
||||
elDropdownMenuRef?.handleClose()
|
||||
setSelectTag(tagItem)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -582,4 +583,3 @@ watch(
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@/hooks/web/useTagsView
|
||||
|
@ -1,16 +1,33 @@
|
||||
import { defineConfig, toEscapedSelector as e, presetUno, presetIcons } from 'unocss'
|
||||
import transformerVariantGroup from '@unocss/transformer-variant-group'
|
||||
import { loadEnv } from 'vite'
|
||||
|
||||
const root = process.cwd()
|
||||
|
||||
const createPresetIcons = () => {
|
||||
const isBuild = !!process.argv[4]
|
||||
let env = {} as any
|
||||
if (!isBuild) {
|
||||
env = loadEnv(process.argv[3], root)
|
||||
} else {
|
||||
env = loadEnv(process.argv[4], root)
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
if (import.meta.env.VITE_USE_ONLINE_ICON === 'true') {
|
||||
if (env.VITE_USE_ONLINE_ICON === 'true') {
|
||||
return []
|
||||
} else {
|
||||
return [
|
||||
presetIcons({
|
||||
prefix: ''
|
||||
// 由于默认加载的是所有的图标,启动会非常慢,可以在这里去加载需要的图标,确保启动速度
|
||||
// collections: {
|
||||
// carbon: () => import('@iconify-json/carbon/icons.json').then(i => i.default),
|
||||
// mdi: () => import('@iconify-json/mdi/icons.json').then(i => i.default),
|
||||
// logos: () => import('@iconify-json/logos/icons.json').then(i => i.default),
|
||||
// }
|
||||
})
|
||||
]
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ import progress from 'vite-plugin-progress'
|
||||
import EslintPlugin from 'vite-plugin-eslint'
|
||||
import { ViteEjsPlugin } from 'vite-plugin-ejs'
|
||||
import PurgeIcons from 'vite-plugin-purge-icons'
|
||||
import ServerUrlCopy from 'vite-plugin-url-copy'
|
||||
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
|
||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
||||
import { createStyleImportPlugin, ElementPlusResolve } from 'vite-plugin-style-import'
|
||||
@ -38,6 +39,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
||||
}
|
||||
}),
|
||||
VueJsx(),
|
||||
ServerUrlCopy(),
|
||||
progress(),
|
||||
env.VITE_USE_ALL_ELEMENT_PLUS_STYLE === 'false'
|
||||
? createStyleImportPlugin({
|
||||
|
@ -11,7 +11,7 @@ from fastapi.security import OAuth2PasswordBearer
|
||||
"""
|
||||
系统版本
|
||||
"""
|
||||
VERSION = "3.8.2"
|
||||
VERSION = "3.9.0"
|
||||
|
||||
"""安全警告: 不要在生产中打开调试运行!"""
|
||||
DEBUG = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user