@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/README.md CHANGED
@@ -49,6 +49,8 @@ function Example() {
49
49
 
50
50
  所有包装组件保留 Ant 原有 props、ref 类型与公开静态 API;包装后的静态子组件也有独立扩展点。`theme`、图标、locale 是**原样透传**,并非包装。`BusinessDrawer` 统一右侧业务抽屉及尺寸档位;原生 `Drawer` 仍允许按 Ant 属性覆盖。`SearchPanel` 使用等宽字段和最多两行的默认折叠;`DataTable` 默认将数据滚动限制在表格内部并把分页放在右下角。`SchemaForm` 根据 JSON 字段配置渲染输入、密码、文本域、数值、选择、单选、布尔值和日期控件,事件处理器通过独立 props 传入,不执行配置中的代码。输入值默认不裁剪空格,避免改变密码和精确搜索语义。
51
51
 
52
+ `Pagination`、`Table`、`DataTable` 和显式启用分页的 `List` 默认显示 `共 N 条`,数量来自 Ant 的本地数据总数或业务传入的 `total`,不会把当前页行数当作完整数量。原生 `showTotal={(total, range) => ...}` 可自定义总数文案,显式 `showTotal={undefined}` 可隐藏;表格和列表仍可通过 `pagination={false}` 关闭分页。页码、每页条数、回调、ref 和原生公开类型继续保留,列表未配置分页时不会额外开启分页。
53
+
52
54
  主应用的本地 tarball 过渡与 npm Registry 升级都必须锁定精确版本、实际包名和完整性,不能仅改依赖字符串而跳过来源校验。本库通过 `adminsmartUiSource: { sha256, gitCommit }` 提供构建源码标记,消费者使用 Registry 的 `dist.integrity` 与 `dist.tarball` 核对字节。该标记是项目来源契约,不是官方 provenance。
53
55
 
54
56
  `SessionReplay` 接收已授权、已解压的只读对象事件,默认暂停在可见窗口起点。它按需装载 `@rrweb/replay@2.0.1` 的官方 JS/CSS,相关 rrweb、types、utils、rrdom 和 snapshot 协议包也精确锁定为 `2.0.1`;发布验证会检查全新宿主的实际安装树,防止上游范围依赖漂移。组件等待真实容器尺寸和官方快照重建,负责有界跳转、结束重播、倍率、时间标记与全屏;隐藏或切换事件时销毁实例和监听。样式随既有 `@adminsmart/ui/styles/composites.css` 交付。业务宿主仍负责数据请求、权限、解压和录制脱敏;组件不会读取 API、凭据、会话或录制原页面。可操作的 5 秒合成录像见文档站 `SessionReplay 操作回放`,公开输入与引用类型由包类型声明提供。
package/dist/index.cjs CHANGED
@@ -241,6 +241,11 @@ var Select = Object.assign(wrapAntComponent(import_antd8.Select, "Select"), {
241
241
  var import_antd10 = require("antd");
242
242
  var import_react3 = require("react");
243
243
 
244
+ // src/internal/paginationTotal.ts
245
+ function paginationTotal(total) {
246
+ return `\u5171 ${total} \u6761`;
247
+ }
248
+
244
249
  // src/components/feedback.ts
245
250
  var import_antd9 = require("antd");
246
251
  var Alert = Object.assign(wrapAntComponent(import_antd9.Alert, "Alert"), {
@@ -275,7 +280,9 @@ function normalizeTableProps(props) {
275
280
  const locale = props.locale ?? {};
276
281
  const content = locale.emptyText;
277
282
  const emptyText = content === void 0 ? (0, import_react3.createElement)(TableEmpty) : typeof content === "string" || typeof content === "number" ? (0, import_react3.createElement)(TableEmpty, { description: content }) : content;
278
- return { ...props, locale: { ...locale, emptyText } };
283
+ const pagination = props.pagination;
284
+ const tablePagination = pagination === false ? false : { showTotal: paginationTotal, ...pagination };
285
+ return { ...props, locale: { ...locale, emptyText }, pagination: tablePagination };
279
286
  }
280
287
  var Summary = Object.assign(wrapAntComponent(import_antd10.Table.Summary, "Table.Summary"), {
281
288
  Row: wrapAntComponent(import_antd10.Table.Summary.Row, "Table.Summary.Row"),
@@ -338,10 +345,14 @@ var Descriptions = Object.assign(wrapAntComponent(import_antd13.Descriptions, "D
338
345
  var ListItem = Object.assign(wrapAntComponent(import_antd13.List.Item, "List.Item"), {
339
346
  Meta: wrapAntComponent(import_antd13.List.Item.Meta, "List.Item.Meta")
340
347
  });
341
- var List = Object.assign(wrapAntComponent(import_antd13.List, "List"), {
348
+ function normalizeListProps(props) {
349
+ const pagination = props.pagination;
350
+ return pagination && typeof pagination === "object" ? { ...props, pagination: { showTotal: paginationTotal, ...pagination } } : props;
351
+ }
352
+ var List = Object.assign(wrapAntComponent(import_antd13.List, "List", {}, normalizeListProps), {
342
353
  Item: ListItem
343
354
  });
344
- var Pagination = wrapAntComponent(import_antd13.Pagination, "Pagination");
355
+ var Pagination = wrapAntComponent(import_antd13.Pagination, "Pagination", { showTotal: paginationTotal });
345
356
  var Tree = Object.assign(wrapAntComponent(import_antd13.Tree, "Tree"), {
346
357
  DirectoryTree: wrapAntComponent(import_antd13.Tree.DirectoryTree, "Tree.DirectoryTree"),
347
358
  TreeNode: wrapAntComponent(import_antd13.Tree.TreeNode, "Tree.TreeNode")