diff --git a/src/components/Form/src/hooks/useFormEvents.ts b/src/components/Form/src/hooks/useFormEvents.ts index dad92b5..992a393 100644 --- a/src/components/Form/src/hooks/useFormEvents.ts +++ b/src/components/Form/src/hooks/useFormEvents.ts @@ -46,10 +46,10 @@ export function useFormEvents({ await validate(); loadingSub.value = false; emit('submit', formModel); - return true; + return; } catch (error) { loadingSub.value = false; - return false; + return; } } diff --git a/src/components/Form/src/types/form.ts b/src/components/Form/src/types/form.ts index 5d55111..e5c12fd 100644 --- a/src/components/Form/src/types/form.ts +++ b/src/components/Form/src/types/form.ts @@ -41,6 +41,7 @@ export interface FormProps { submitFunc?: () => Promise; submitOnReset?: boolean; baseGridStyle?: CSSProperties; + collapsedRows?: number; } export interface FormActionType { diff --git a/src/components/Table/src/components/TableAction.vue b/src/components/Table/src/components/TableAction.vue index 7f6871a..6147b5b 100644 --- a/src/components/Table/src/components/TableAction.vue +++ b/src/components/Table/src/components/TableAction.vue @@ -75,7 +75,7 @@ const getDropdownList = computed(() => { return (toRaw(props.dropDownActions) || []) .filter((action) => { - return hasPermission(action.auth) && isIfShow(action); + return hasPermission(action.auth as string[]) && isIfShow(action); }) .map((action) => { const { popConfirm } = action; @@ -108,7 +108,7 @@ const getActions = computed(() => { return (toRaw(props.actions) || []) .filter((action) => { - return hasPermission(action.auth) && isIfShow(action); + return hasPermission(action.auth as string[]) && isIfShow(action); }) .map((action) => { const { popConfirm } = action; diff --git a/src/components/Table/src/types/table.ts b/src/components/Table/src/types/table.ts index 96e4d68..edbb48f 100644 --- a/src/components/Table/src/types/table.ts +++ b/src/components/Table/src/types/table.ts @@ -34,4 +34,5 @@ export interface BasicTableProps { actionColumn: any[]; canResize: boolean; resizeHeightOffset: number; + loading: boolean; } diff --git a/src/components/Table/src/types/tableAction.ts b/src/components/Table/src/types/tableAction.ts index bc43ee5..6452e02 100644 --- a/src/components/Table/src/types/tableAction.ts +++ b/src/components/Table/src/types/tableAction.ts @@ -1,6 +1,6 @@ import { NButton } from 'naive-ui'; import { PermissionsEnum } from '@/enums/permissionsEnum'; -export interface ActionItem extends NButton.props { +export interface ActionItem extends Partial> { onClick?: Fn; label?: string; color?: 'success' | 'error' | 'warning'; diff --git a/src/settings/projectSetting.ts b/src/settings/projectSetting.ts index d8209de..1adf736 100644 --- a/src/settings/projectSetting.ts +++ b/src/settings/projectSetting.ts @@ -37,6 +37,8 @@ const setting = { mixMenu: false, //触发移动端侧边栏的宽度 mobileWidth: 800, + // 折叠菜单 + collapsed: false, }, //面包屑 crumbsSetting: { diff --git a/src/views/comp/form/useForm.vue b/src/views/comp/form/useForm.vue index 4614741..183dd77 100644 --- a/src/views/comp/form/useForm.vue +++ b/src/views/comp/form/useForm.vue @@ -16,10 +16,10 @@