@qq1948037137/adminsmart-ui 0.1.25 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -80,6 +80,7 @@ declare const Timeline: typeof Timeline$1;
80
80
  declare const Card: typeof Card$1;
81
81
  declare const Descriptions: typeof Descriptions$1;
82
82
  declare const List: typeof List$1;
83
+ /** 默认显示完整记录总数,原生 showTotal 回调或显式 undefined 可以覆盖;所有页码与事件仍由 Ant 处理。 */
83
84
  declare const Pagination: typeof Pagination$1;
84
85
  declare const Tree: typeof Tree$1;
85
86
 
package/dist/index.d.ts CHANGED
@@ -80,6 +80,7 @@ declare const Timeline: typeof Timeline$1;
80
80
  declare const Card: typeof Card$1;
81
81
  declare const Descriptions: typeof Descriptions$1;
82
82
  declare const List: typeof List$1;
83
+ /** 默认显示完整记录总数,原生 showTotal 回调或显式 undefined 可以覆盖;所有页码与事件仍由 Ant 处理。 */
83
84
  declare const Pagination: typeof Pagination$1;
84
85
  declare const Tree: typeof Tree$1;
85
86
 
package/dist/index.js CHANGED
@@ -117,6 +117,11 @@ var Select = Object.assign(wrapAntComponent(AntSelect, "Select"), {
117
117
  import { Table as AntTable } from "antd";
118
118
  import { createElement as createElement2 } from "react";
119
119
 
120
+ // src/internal/paginationTotal.ts
121
+ function paginationTotal(total) {
122
+ return `\u5171 ${total} \u6761`;
123
+ }
124
+
120
125
  // src/components/feedback.ts
121
126
  import {
122
127
  Alert as AntAlert,
@@ -161,7 +166,9 @@ function normalizeTableProps(props) {
161
166
  const locale = props.locale ?? {};
162
167
  const content = locale.emptyText;
163
168
  const emptyText = content === void 0 ? createElement2(TableEmpty) : typeof content === "string" || typeof content === "number" ? createElement2(TableEmpty, { description: content }) : content;
164
- return { ...props, locale: { ...locale, emptyText } };
169
+ const pagination = props.pagination;
170
+ const tablePagination = pagination === false ? false : { showTotal: paginationTotal, ...pagination };
171
+ return { ...props, locale: { ...locale, emptyText }, pagination: tablePagination };
165
172
  }
166
173
  var Summary = Object.assign(wrapAntComponent(AntTable.Summary, "Table.Summary"), {
167
174
  Row: wrapAntComponent(AntTable.Summary.Row, "Table.Summary.Row"),
@@ -240,10 +247,14 @@ var Descriptions = Object.assign(wrapAntComponent(AntDescriptions, "Descriptions
240
247
  var ListItem = Object.assign(wrapAntComponent(AntList.Item, "List.Item"), {
241
248
  Meta: wrapAntComponent(AntList.Item.Meta, "List.Item.Meta")
242
249
  });
243
- var List = Object.assign(wrapAntComponent(AntList, "List"), {
250
+ function normalizeListProps(props) {
251
+ const pagination = props.pagination;
252
+ return pagination && typeof pagination === "object" ? { ...props, pagination: { showTotal: paginationTotal, ...pagination } } : props;
253
+ }
254
+ var List = Object.assign(wrapAntComponent(AntList, "List", {}, normalizeListProps), {
244
255
  Item: ListItem
245
256
  });
246
- var Pagination = wrapAntComponent(AntPagination, "Pagination");
257
+ var Pagination = wrapAntComponent(AntPagination, "Pagination", { showTotal: paginationTotal });
247
258
  var Tree = Object.assign(wrapAntComponent(AntTree, "Tree"), {
248
259
  DirectoryTree: wrapAntComponent(AntTree.DirectoryTree, "Tree.DirectoryTree"),
249
260
  TreeNode: wrapAntComponent(AntTree.TreeNode, "Tree.TreeNode")