diff --git a/src/components/GiLeftRightPane/index.vue b/src/components/GiLeftRightPane/index.vue new file mode 100644 index 0000000..20ae6cd --- /dev/null +++ b/src/components/GiLeftRightPane/index.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/src/components/GiSpace/index.vue b/src/components/GiSpace/index.vue new file mode 100644 index 0000000..f51b30c --- /dev/null +++ b/src/components/GiSpace/index.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/src/components/GiSplitButton/index.vue b/src/components/GiSplitButton/index.vue new file mode 100644 index 0000000..4dcb01e --- /dev/null +++ b/src/components/GiSplitButton/index.vue @@ -0,0 +1,58 @@ + + + + + diff --git a/src/components/GiSplitPane/components/GiSplitPaneFlexibleBox.vue b/src/components/GiSplitPane/components/GiSplitPaneFlexibleBox.vue new file mode 100644 index 0000000..9d052a4 --- /dev/null +++ b/src/components/GiSplitPane/components/GiSplitPaneFlexibleBox.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/src/components/GiSplitPane/index.vue b/src/components/GiSplitPane/index.vue new file mode 100644 index 0000000..b47507f --- /dev/null +++ b/src/components/GiSplitPane/index.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/src/hooks/modules/useTable.ts b/src/hooks/modules/useTable.ts index f6e7013..3f73176 100644 --- a/src/hooks/modules/useTable.ts +++ b/src/hooks/modules/useTable.ts @@ -1,7 +1,7 @@ import type { TableData, TableInstance } from '@arco-design/web-vue' import { Message, Modal } from '@arco-design/web-vue' import type { Options as paginationOptions } from './usePagination' -import { usePagination } from '@/hooks' +import { useBreakpoint, usePagination } from '@/hooks' interface Options { formatResult?: (data: T[]) => U[] @@ -94,5 +94,32 @@ export function useTable(api: Api, options?: Options !['xs', 'sm'].includes(breakpoint.value) ? 'right' : undefined) + + return { + /** 表格加载状态 */ + loading, + /** 表格数据 */ + tableData, + /** 获取表格数据 */ + getTableData, + /** 搜索,页码会重置为1 */ + search, + /** 分页的传参 */ + pagination, + /** 选择的行keys */ + selectedKeys, + /** 选择行 */ + select, + /** 全选行 */ + selectAll, + /** 处理删除、批量删除 */ + handleDelete, + /** 刷新表格数据,页码会缓存 */ + refresh, + /** 操作列在小屏场景下不固定在右侧 */ + fixed, + } } diff --git a/src/layout/components/HeaderRightBar/index.vue b/src/layout/components/HeaderRightBar/index.vue index 4ca4b59..2b8636c 100644 --- a/src/layout/components/HeaderRightBar/index.vue +++ b/src/layout/components/HeaderRightBar/index.vue @@ -30,7 +30,7 @@ - +