yxk-20260612-默认分页显示数据为12条

This commit is contained in:
ye1023
2026-06-12 15:51:23 +08:00
parent 99be0fcff5
commit 4e5a6102f2
5 changed files with 17 additions and 10 deletions
@@ -34,6 +34,7 @@
tableProps: {
api: list,
columns: columns,
pagination: { pageSize: 12, defaultPageSize: 12 },
showIndexColumn: true,
showTableSetting: true,
canResize: false,
@@ -23,7 +23,7 @@
TaskHandleModal,
},
setup() {
const { registerTable, getHistoryTaskInfo } = useTaskList('history');
const { registerTable, getHistoryTaskInfo } = useTaskList('history', { pageSize: 12 });
const [registerModal, { openModal }] = useModal();
@@ -50,7 +50,7 @@
},
setup() {
const { registerTable, reload, getTaskNodeInfo } = useTaskList('run');
const { registerTable, reload, getTaskNodeInfo } = useTaskList('run', { pageSize: 12 });
const userStore = useUserStore();
const { createMessage } = useMessage();
//催办
@@ -2,11 +2,16 @@ import { useListPage } from '/@/hooks/system/useListPage';
import { columns, columns_group, columns_history, TaskType, searchFormSchema } from './task.handle.data';
import { list, taskNodeInfo } from './task.handle.api';
interface TaskListOptions {
pageSize?: number;
}
/**
* 用于列表渲染
* @param urlObject
*/
export function useTaskList(type) {
export function useTaskList(type: string, options: TaskListOptions = {}) {
const pagination = options.pageSize ? { pageSize: options.pageSize, defaultPageSize: options.pageSize } : undefined;
const { tableContext } = useListPage({
designScope: 'process-design',
pagination: true,
@@ -14,6 +19,7 @@ export function useTaskList(type) {
title: '',
api: getDataList,
columns: getColumns(),
pagination,
showIndexColumn: true,
showTableSetting: false,
canResize: false,