优化展示逻辑

This commit is contained in:
李瑞
2025-10-13 00:07:31 +08:00
parent 12600ebdfb
commit 99671667f3
5 changed files with 10 additions and 31 deletions

View File

@@ -13,6 +13,7 @@ import { useRef, useEffect } from "react";
const ListContainer = (props) => {
const {
loading,
isShowNoData,
data = [],
error,
reload,
@@ -84,7 +85,7 @@ const ListContainer = (props) => {
// 渲染列表
const renderList = (list) => {
// 请求数据为空
if (!loading && (!list || list?.length === 0)) {
if (isShowNoData) {
return <ListLoadError reload={reload} errorImg={errorImg} btnText={btnText} btnImg={btnImg} text={emptyText || "暂无数据"} />;
}