zy-react-library 1.0.45 → 1.0.46

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.
@@ -0,0 +1,6 @@
1
+ import type { AntdIconProps } from "@ant-design/icons/lib/components/AntdIcon";
2
+ import type { FC } from "react";
3
+
4
+ declare const PrintIcon: FC<AntdIconProps>;
5
+
6
+ export default PrintIcon;
@@ -0,0 +1,9 @@
1
+ import { PrinterOutlined } from "@ant-design/icons";
2
+
3
+ const PrintIcon = props => (
4
+ <PrinterOutlined {...props} />
5
+ );
6
+
7
+ PrintIcon.displayName = "PrintIcon";
8
+
9
+ export default PrintIcon;
@@ -1,58 +1,32 @@
1
- import { request } from "@cqsjjb/jjb-common-lib/http";
2
- import { useEffect, useState } from "react";
3
- import BasicLeftTree from "../../Basic";
4
-
5
- /**
6
- * 部门左侧树组件(港务局版本)
7
- */
8
- function DepartmentSelectTree(props) {
9
- const {
10
- params = {},
11
- ...restProps
12
- } = props;
13
-
14
- const [treeData, setTreeData] = useState([
15
- {
16
- name: "parent 1",
17
- id: "0-0",
18
- childrenList: [
19
- {
20
- name: "parent 1-0",
21
- id: "0-0-0",
22
- childrenList: [
23
- {
24
- name: "leaf",
25
- id: "0-0-0-0",
26
- },
27
- {
28
- name: "leaf",
29
- id: "0-0-0-1",
30
- },
31
- ],
32
- },
33
- {
34
- name: "parent 1-1",
35
- id: "0-0-1",
36
- childrenList: [{ name: <span style={{ color: "#1677ff" }}>sss</span>, id: "0-0-1-0" }],
37
- },
38
- ],
39
- },
40
- ]);
41
-
42
- const getData = async () => {
43
- const { data } = await request("/basic-info/department/listTree", "post", params);
44
- setTreeData(data);
45
- };
46
-
47
- useEffect(() => {
48
- getData();
49
- }, []);
50
-
51
- return (
52
- <BasicLeftTree treeData={treeData} placeholder="部门" {...restProps} />
53
- );
54
- }
55
-
56
- DepartmentSelectTree.displayName = "DepartmentSelectTree";
57
-
58
- export default DepartmentSelectTree;
1
+ import { request } from "@cqsjjb/jjb-common-lib/http";
2
+ import { useEffect, useState } from "react";
3
+ import BasicLeftTree from "../../Basic";
4
+
5
+ /**
6
+ * 部门左侧树组件(港务局版本)
7
+ */
8
+ function DepartmentSelectTree(props) {
9
+ const {
10
+ params = {},
11
+ ...restProps
12
+ } = props;
13
+
14
+ const [treeData, setTreeData] = useState([]);
15
+
16
+ const getData = async () => {
17
+ const { data } = await request("/basic-info/department/listTree", "post", params);
18
+ setTreeData(data);
19
+ };
20
+
21
+ useEffect(() => {
22
+ getData();
23
+ }, []);
24
+
25
+ return (
26
+ <BasicLeftTree treeData={treeData} placeholder="部门" {...restProps} />
27
+ );
28
+ }
29
+
30
+ DepartmentSelectTree.displayName = "DepartmentSelectTree";
31
+
32
+ export default DepartmentSelectTree;
@@ -1,22 +1,22 @@
1
- import Table from "@cqsjjb/jjb-react-admin-component/Table";
2
- import { getIndexColumn } from "../../utils/index";
3
- import "./index.less";
4
-
5
- function TablePro(props) {
6
- const {
7
- columns = [],
8
- showIndex = true,
9
- useAlignCenter = true,
10
- rowKey = "id",
11
- ...restProps
12
- } = props;
13
-
14
- const storeIndex = props.storeIndex || `${window.process.env.app.antd["ant-prefix"]}_${Math.random().toString(36).substring(2)}`;
15
- function calcColumns() {
16
- showIndex && columns.unshift(getIndexColumn(props.pagination));
17
- return columns.map(item => ({ align: useAlignCenter ? "center" : "left", ...item }));
18
- }
19
- return <Table rowKey={rowKey} storeIndex={storeIndex} columns={calcColumns()} {...restProps} />;
20
- }
21
-
22
- export default TablePro;
1
+ import Table from "@cqsjjb/jjb-react-admin-component/Table";
2
+ import { getIndexColumn } from "../../utils/index";
3
+ import "./index.less";
4
+
5
+ function TablePro(props) {
6
+ const {
7
+ columns = [],
8
+ showIndex = true,
9
+ useAlignCenter = true,
10
+ rowKey = "id",
11
+ ...restProps
12
+ } = props;
13
+
14
+ const storeIndex = props.storeIndex || `${window.process.env.app.antd["ant-prefix"]}_${Math.random().toString(36).substring(2)}`;
15
+ function calcColumns() {
16
+ showIndex && columns.unshift(getIndexColumn(props.pagination));
17
+ return columns.map(item => ({ align: useAlignCenter ? "center" : "left", ...item }));
18
+ }
19
+ return <Table rowKey={rowKey} storeIndex={storeIndex} columns={calcColumns()} {...restProps} />;
20
+ }
21
+
22
+ export default TablePro;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zy-react-library",
3
3
  "private": false,
4
- "version": "1.0.45",
4
+ "version": "1.0.46",
5
5
  "type": "module",
6
6
  "description": "",
7
7
  "author": "LiuJiaNan",