@cniot/mdd-render-pc-ftp
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "@cniot/mdd-render-pc-ftp", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "模型驱动FTP渲染组件", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -68,3 +68,7 @@ import React, { useEffect, useState, useRef, useMemo } from 'react'; | ||
if (type !== 'custom') { | ||
onSearch(engine.getModule(FILTER_MODULE_NAME).getValues(), 1, pageSize); | ||
onSearch( | ||
engine.getModule(FILTER_MODULE_NAME).getValues(), | ||
engine.getModule(TABLE_MODULE_NAME).getCurrentPage() || 1, | ||
pageSize, | ||
); | ||
Message.success(`${label}${i18n.tr('成功')}`); | ||
@@ -128,3 +132,7 @@ } | ||
// 请求成功刷新页面 | ||
onSearch(engine.getModule(FILTER_MODULE_NAME).getValues(), 1, pageSize); | ||
onSearch( | ||
engine.getModule(FILTER_MODULE_NAME).getValues(), | ||
engine.getModule(TABLE_MODULE_NAME).getCurrentPage() || 1, | ||
pageSize, | ||
); | ||
// 清空多选项 | ||
@@ -252,3 +260,3 @@ setRowSelectionList([]); | ||
const result = { total: 0, dataSource: [] }; | ||
const result = { total: null, dataSource: [] }; | ||
try { | ||
@@ -265,3 +273,3 @@ const ajax = engine.getModule(MODULE_AJAX); | ||
}); | ||
result.total = res?.paging?.totalCount || res?.totalCount || 0; | ||
result.total = res?.paging?.totalCount || res?.totalCount || null; | ||
result.dataSource = res?.tableData || []; | ||
@@ -358,2 +366,11 @@ } catch (e) { | ||
const realPageProps = { | ||
...tableProps.pageProps, | ||
// fix 分页组件fix底部后,内容过长(比如100条),分页切换popup会向下弹出,遮挡选择 | ||
popupProps: { | ||
v2: true, | ||
placement: 't', | ||
}, | ||
}; | ||
return ( | ||
@@ -364,2 +381,3 @@ <div className="mdd-build-table"> | ||
{...tableProps} | ||
pageProps={realPageProps} | ||
dataSource={realDataSource} | ||
@@ -366,0 +384,0 @@ pageSizeList={[10, 20, 50, 100]} |
@@ -19,2 +19,6 @@ import { JSONWatch } from '@cniot/mdd-render-engine'; | ||
getCurrentPage() { | ||
return this.get('CURRENT_PAGE'); | ||
} | ||
setCurrentPage(value) { | ||
@@ -58,4 +62,4 @@ this.set('CURRENT_PAGE', value); | ||
getValues() { | ||
return this.get('$ALL') | ||
return this.get('$ALL'); | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
731507
11679