Commit 36642020 by zhaochengxiang

总数取错

parent 24c5c030
...@@ -105,7 +105,7 @@ const DefineTable = (props) => { ...@@ -105,7 +105,7 @@ const DefineTable = (props) => {
callback: (data) => { callback: (data) => {
setLoading(false); setLoading(false);
setTableData(data?.content||[]); setTableData(data?.content||[]);
setTotal(data?.numberOfElements||0); setTotal(data?.totalElements||0);
}, },
error: () => { error: () => {
setLoading(false); setLoading(false);
......
...@@ -61,6 +61,12 @@ export const UpdateTemplateModal = (props) => { ...@@ -61,6 +61,12 @@ export const UpdateTemplateModal = (props) => {
const saveLogic = async () => { const saveLogic = async () => {
try { try {
const row = await form.validateFields(); const row = await form.validateFields();
if ((fields||[]).length === 0) {
showMessage('warn', '请新增字段');
return;
}
setConfirmLoading(true); setConfirmLoading(true);
let url = '', newTemplate = {}; let url = '', newTemplate = {};
......
...@@ -106,7 +106,7 @@ const ManageTable = (props) => { ...@@ -106,7 +106,7 @@ const ManageTable = (props) => {
callback: (data) => { callback: (data) => {
setLoading(false); setLoading(false);
setTableData(data?.content||[]); setTableData(data?.content||[]);
setTotal(data?.numberOfElements||0); setTotal(data?.totalElements||0);
}, },
error: () => { error: () => {
setLoading(false); setLoading(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment