diff --git a/README.zh-CN.md b/README.zh-CN.md index 30ab63246..3123f046c 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -9,11 +9,11 @@ ## 简介 -Vue Vben Admin 是一个免费开源的中后台模版。使用了最新的`vue3`,`vite4`,`TypeScript`等主流技术开发,开箱即用的中后台前端解决方案,也可用于学习参考。 +Vue Vben Admin 是一个免费开源的中后台模版。使用了最新的`vue3`,`vite5`,`TypeScript`等主流技术开发,开箱即用的中后台前端解决方案,也可用于学习参考。 ## 特性 -- **最新技术栈**:使用 Vue3/vite2 等前端前沿技术开发 +- **最新技术栈**:使用 Vue3/vite5 等前端前沿技术开发 - **TypeScript**: 应用程序级 JavaScript 的语言 - **主题**:可配置的主题 - **国际化**:内置完善的国际化方案 diff --git a/src/components/EllipsisText/src/Tooltip.vue b/src/components/EllipsisText/src/Tooltip.vue index 01d8ad586..02add8783 100644 --- a/src/components/EllipsisText/src/Tooltip.vue +++ b/src/components/EllipsisText/src/Tooltip.vue @@ -121,6 +121,7 @@ pointer-events: none; &::before { + content: ''; // 解决提示框箭头颜色未生效问题 position: absolute; bottom: 0; inset-inline-start: 0; diff --git a/src/components/Form/src/BasicForm.vue b/src/components/Form/src/BasicForm.vue index e509b6b2f..62c321b1b 100644 --- a/src/components/Form/src/BasicForm.vue +++ b/src/components/Form/src/BasicForm.vue @@ -123,7 +123,7 @@ const getBindValue = computed(() => ({ ...attrs, ...props, ...unref(getProps) }) as AntFormProps); const getSchema = computed((): FormSchema[] => { - const schemas: FormSchema[] = unref(schemaRef) || (unref(getProps).schemas as any); + const schemas: FormSchema[] = cloneDeep(unref(schemaRef) || (unref(getProps).schemas as any)); for (const schema of schemas) { const { defaultValue, @@ -163,11 +163,11 @@ } } if (unref(getProps).showAdvancedButton) { - return cloneDeep( - schemas.filter((schema) => !isIncludeSimpleComponents(schema.component)) as FormSchema[], - ); + return schemas.filter( + (schema) => !isIncludeSimpleComponents(schema.component), + ) as FormSchema[]; } else { - return cloneDeep(schemas as FormSchema[]); + return schemas as FormSchema[]; } }); diff --git a/src/components/Modal/src/components/Modal.tsx b/src/components/Modal/src/components/Modal.tsx index c68e10728..cdbcd6714 100644 --- a/src/components/Modal/src/components/Modal.tsx +++ b/src/components/Modal/src/components/Modal.tsx @@ -2,7 +2,6 @@ import { Modal } from 'ant-design-vue'; import { defineComponent, toRefs, unref } from 'vue'; import { basicProps } from '../props'; import { useModalDragMove } from '../hooks/useModalDrag'; -import { useAttrs } from '@vben/hooks'; import { extendSlots } from '@/utils/helper/tsxHelper'; export default defineComponent({ @@ -10,9 +9,8 @@ export default defineComponent({ inheritAttrs: false, props: basicProps as any, emits: ['cancel'], - setup(props, { slots, emit }) { + setup(props, { slots, emit, attrs }) { const { open, draggable, destroyOnClose } = toRefs(props); - const attrs = useAttrs(); useModalDragMove({ open, destroyOnClose, diff --git a/src/components/VxeTable/index.ts b/src/components/VxeTable/index.ts index be1212960..d64701ba8 100644 --- a/src/components/VxeTable/index.ts +++ b/src/components/VxeTable/index.ts @@ -3,10 +3,11 @@ import vxeBasicTable from './src/VxeBasicTable'; import { VXETable } from 'vxe-table'; import VXETablePluginAntd from './src/components'; import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx'; +import ExcelJS from 'exceljs'; import './src/setting'; export const VxeBasicTable = withInstall(vxeBasicTable); export * from 'vxe-table'; export * from './src/types'; -VXETable.use(VXETablePluginAntd).use(VXETablePluginExportXLSX); +VXETable.use(VXETablePluginAntd).use(VXETablePluginExportXLSX, { ExcelJS }); diff --git a/src/components/VxeTable/src/methods.ts b/src/components/VxeTable/src/methods.ts index 491ba9fb4..4cf2cc460 100644 --- a/src/components/VxeTable/src/methods.ts +++ b/src/components/VxeTable/src/methods.ts @@ -143,6 +143,7 @@ export const gridComponentMethodKeys: ( // vxe-table-edit部分 'insert', 'insertAt', + 'insertNextAt', 'remove', 'removeCheckboxRow', 'removeRadioRow', diff --git a/src/locales/lang/en/component.json b/src/locales/lang/en/component.json index 11741189c..f8cf4f600 100644 --- a/src/locales/lang/en/component.json +++ b/src/locales/lang/en/component.json @@ -21,7 +21,7 @@ "btn_scale_y": "Flip vertical", "btn_zoom_in": "Zoom in", "btn_zoom_out": "Zoom out", - "preview": "Preivew" + "preview": "Preview" }, "drawer": { "loadingText": "Loading...", @@ -110,7 +110,7 @@ "fileName": "File name", "fileSize": "File size", "fileStatue": "File status", - "pending": "Pendig", + "pending": "Pending", "startUpload": "Start upload", "uploadSuccess": "Upload successfully", "uploadError": "Upload failed", diff --git a/src/locales/lang/en/layout.json b/src/locales/lang/en/layout.json index f9e44b0f0..98f4777a3 100644 --- a/src/locales/lang/en/layout.json +++ b/src/locales/lang/en/layout.json @@ -73,7 +73,7 @@ "tabDetail": "Tab Detail", "tabsQuickBtn": "Tabs quick button", "tabsRedoBtn": "Tabs redo button", - "tabsFoldBtn": "Tabs flod button", + "tabsFoldBtn": "Tabs fold button", "sidebar": "Sidebar", "header": "Header", "footer": "Footer", diff --git a/src/router/guard/permissionGuard.ts b/src/router/guard/permissionGuard.ts index 8f862e2bf..ac735ce3f 100644 --- a/src/router/guard/permissionGuard.ts +++ b/src/router/guard/permissionGuard.ts @@ -125,7 +125,6 @@ export function createPermissionGuard(router: Router) { // 指向redirect next({ path: redirect, replace: true }); } - next(); } else { // 正常访问 next(); diff --git a/src/router/helper/menuHelper.ts b/src/router/helper/menuHelper.ts index 6ecbccb80..4af1bad4b 100644 --- a/src/router/helper/menuHelper.ts +++ b/src/router/helper/menuHelper.ts @@ -33,9 +33,7 @@ function joinParentPath(menus: Menu[], parentPath = '') { // Parsing the menu module export function transformMenuModule(menuModule: MenuModule): Menu { - const { menu } = menuModule; - - const menuList = [menu]; + const menuList = [menuModule]; joinParentPath(menuList); return menuList[0]; diff --git a/src/router/menus/index.ts b/src/router/menus/index.ts index 58c537434..f9e6b4f0a 100644 --- a/src/router/menus/index.ts +++ b/src/router/menus/index.ts @@ -10,7 +10,7 @@ import { router } from '@/router'; import { PermissionModeEnum } from '@/enums/appEnum'; import { pathToRegexp } from 'path-to-regexp'; -const modules = import.meta.glob('./modules/**/*.ts', { eager: true }); +const modules = import.meta.glob('../routes/modules/**/*.ts', { eager: true }); const menuModules: MenuModule[] = []; diff --git a/src/router/types.ts b/src/router/types.ts index 85a2d36f7..0302212b8 100644 --- a/src/router/types.ts +++ b/src/router/types.ts @@ -51,10 +51,7 @@ export interface Menu { hideMenu?: boolean; } -export interface MenuModule { - orderNo?: number; - menu: Menu; -} +export type MenuModule = Menu; // export type AppRouteModule = RouteModule | AppRouteRecordRaw; export type AppRouteModule = AppRouteRecordRaw; diff --git a/vite.config.ts b/vite.config.ts index f25e3f42f..2c2dfa2f4 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -33,6 +33,7 @@ export default defineApplicationConfig({ rewrite: (path) => path.replace(new RegExp(`^/upload`), ''), }, }, + open: true, // 项目启动后,自动打开 warmup: { clientFiles: ['./index.html', './src/{views,components}/*'], },