zy-react-library 1.0.87 → 1.0.89

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.
@@ -1,11 +1,11 @@
1
1
  import type { ProTableProps } from "@ant-design/pro-table";
2
- import type { TableProps } from "antd";
2
+ import type { TableProps as AntdTableProps } from "antd";
3
3
  import type { FC } from "react";
4
4
 
5
5
  /**
6
6
  * TablePro 组件属性
7
7
  */
8
- export type TableProProps<DataSource, U, ValueType> = Omit<TableProps, 'columns'> & ProTableProps<DataSource, U, ValueType> & {
8
+ export type TableProps<DataSource, U, ValueType> = Omit<AntdTableProps, 'columns'> & ProTableProps<DataSource, U, ValueType> & {
9
9
  /** 当一个路由下存在多个表格的情况下 需要给每一个表格设置一个唯一存储索引 若没有设置则使用默认索引,请注意缓存数据会被覆盖 */
10
10
  storeIndex?: string;
11
11
  /** 是否禁用内容区滚动,默认 false */
@@ -21,5 +21,5 @@ export type TableProProps<DataSource, U, ValueType> = Omit<TableProps, 'columns'
21
21
  /**
22
22
  * 表格组件
23
23
  */
24
- declare const TablePro: <DataSource, U, ValueType = "text">(props: TableProProps<DataSource, U, ValueType>) => ReturnType<FC>;
25
- export default TablePro;
24
+ declare const Table: <DataSource, U, ValueType = "text">(props: TableProps<DataSource, U, ValueType>) => ReturnType<FC>;
25
+ export default Table;
@@ -1,8 +1,8 @@
1
- import Table from "@cqsjjb/jjb-react-admin-component/Table";
1
+ import TablePro from "@cqsjjb/jjb-react-admin-component/Table";
2
2
  import { getIndexColumn } from "../../utils/index";
3
3
  import "./index.less";
4
4
 
5
- function TablePro(props) {
5
+ function Table(props) {
6
6
  const {
7
7
  columns = [],
8
8
  showIndexColumn = true,
@@ -11,13 +11,11 @@ function TablePro(props) {
11
11
  rowKey = "id",
12
12
  ...restProps
13
13
  } = props;
14
-
15
- const storeIndex = props.storeIndex || `${window.process.env.app.antd["ant-prefix"]}_${Math.random().toString(36).substring(2)}`;
16
14
  function calcColumns() {
17
15
  showIndexColumn && columns.unshift({...getIndexColumn(props.pagination), fixed: indexColumnFixed});
18
16
  return columns.map(item => ({ align: useAlignCenter ? "center" : "left", ...item }));
19
17
  }
20
- return <Table rowKey={rowKey} storeIndex={storeIndex} columns={calcColumns()} {...restProps} />;
18
+ return <TablePro rowKey={rowKey} columns={calcColumns()} {...restProps} />;
21
19
  }
22
20
 
23
- export default TablePro;
21
+ export default Table;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zy-react-library",
3
3
  "private": false,
4
- "version": "1.0.87",
4
+ "version": "1.0.89",
5
5
  "type": "module",
6
6
  "description": "",
7
7
  "author": "LiuJiaNan",