cfel-base-components 2.4.3 → 2.5.0

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.
@@ -42,6 +42,7 @@ const devConfig = {
42
42
  { loader: 'sass-loader' }
43
43
  ]
44
44
  },
45
+
45
46
  {
46
47
  test: /.min.css$/,
47
48
  use: [
@@ -21,14 +21,13 @@
21
21
  source: "\u9489\u9489",
22
22
  name: "\u8FDC\u822A\u8DE8\u56FD\u63A7\u80A1\u96C6\u56E2",
23
23
  shortName: "\u8FDC\u822A\u8DE8\u56FD\u63A7\u80A1\u96C6\u56E2",
24
- logo: ""
25
24
  },
26
25
  user: {
27
26
  id: 1676424765496406018,
28
27
  userId: "01436565094521893533",
29
28
  unionId: "xsU4QrgEfZxxj8YxEWAYJAiEiE",
30
- name: "\u5434\u91D1\u521A",
31
- avatar: "https:\/\/pic.imgdb.cn\/item\/64a520d21ddac507cc4653d3.jpg",
29
+ name: "\u5434\u5434\u5434\u5434",
30
+ avatar: "https://static-legacy.dingtalk.com/media/lQLPM5AkqOufBy7NAyDNAyCwJZ592czMOC4EeIgNJAAGAA_800_800.png",
32
31
  account: "15957797376",
33
32
  roleInfo: []
34
33
  },
@@ -42,6 +41,7 @@
42
41
  logoutUrl: "\/sso\/logout?back=http%3A%2F%2Flios-iot-obee-daily.chengfengerlai.com%2Fdelivery",
43
42
  switchTenantUrl: "https:\/\/cfel-sso-daily.chengfengerlai.com\/tenant\/switch?fakeAccountId=1676424765496406018\u0026redirect=http:\/\/lios-iot-obee-daily.chengfengerlai.com\/sso\/login?back=http%3A%2F%2Flios-iot-obee-daily.chengfengerlai.com%2Fdelivery",
44
43
  productCode: "lios-iot-obee",
44
+ logo: "https://cdn.chengfengerlai.com/logo/company-logo/cfel-logo-white.png",
45
45
  env: "daily"
46
46
  };
47
47
  </script>
@@ -1,16 +1,133 @@
1
1
  import React from "react";
2
2
  import { createRoot } from "react-dom/client";
3
3
  import style from "./index.module.less";
4
- import { SwapOutlined } from "@ant-design/icons";
4
+ import { SwapOutlined, QqOutlined, WeiboOutlined } from "@ant-design/icons";
5
5
  import { ConfigProvider } from "antd";
6
6
  import "./index.scss";
7
- import PageContainer from "../../src/components/base-component/PageContainer";
8
7
  import Layout from "../../src/components/layout";
9
8
  // import Account from '../../src/components/universal-pages/account';
10
9
  // import AccountInfo from '../../src/components/universal-pages/accountInfo';
11
10
  import CpcRole from "../../src/components/universal-pages/cpcRole";
12
11
  import CpcRoleInfo from "../../src/components/universal-pages/cpcRoleInfo";
13
12
  import ProTable from "../../src/components/base-component/ProTable";
13
+ import PageContainer from "../../src/components/base-component/PageContainer";
14
+
15
+ const menuList = [
16
+ {
17
+ label: "目录1",
18
+ key: "a",
19
+ icon: <QqOutlined />,
20
+ children: [
21
+ {
22
+ label: "目录1-子目录1",
23
+ key: "a-1",
24
+ },
25
+ {
26
+ label: "目录1-子目录2",
27
+ key: "a-2",
28
+ },
29
+ ],
30
+ },
31
+ {
32
+ label: "目录2",
33
+ key: "b",
34
+ icon: <WeiboOutlined />,
35
+ children: [
36
+ {
37
+ label: "目录2-子目录1",
38
+ key: "b-1",
39
+ },
40
+ ],
41
+ },
42
+ {
43
+ label: "目录1",
44
+ key: "c",
45
+ icon: <QqOutlined />,
46
+ children: [
47
+ {
48
+ label: "目录1-子目录1",
49
+ key: "c-1",
50
+ },
51
+ ],
52
+ },
53
+ {
54
+ label: "目录2",
55
+ key: "d",
56
+ icon: <WeiboOutlined />,
57
+ children: [
58
+ {
59
+ label: "目录2-子目录1",
60
+ key: "d-1",
61
+ },
62
+ ],
63
+ },
64
+ {
65
+ label: "目录1",
66
+ key: "e",
67
+ icon: <QqOutlined />,
68
+ children: [
69
+ {
70
+ label: "目录1-子目录1",
71
+ key: "e-1",
72
+ },
73
+ ],
74
+ },
75
+ {
76
+ label: "目录2",
77
+ key: "f",
78
+ icon: <WeiboOutlined />,
79
+ children: [
80
+ {
81
+ label: "目录2-子目录1",
82
+ key: "f-1",
83
+ },
84
+ ],
85
+ },
86
+ {
87
+ label: "目录1",
88
+ key: "g",
89
+ icon: <QqOutlined />,
90
+ children: [
91
+ {
92
+ label: "目录1-子目录1",
93
+ key: "g-1",
94
+ },
95
+ ],
96
+ },
97
+ {
98
+ label: "目录2",
99
+ key: "h",
100
+ icon: <WeiboOutlined />,
101
+ children: [
102
+ {
103
+ label: "目录2-子目录1",
104
+ key: "h-1",
105
+ },
106
+ ],
107
+ },
108
+ {
109
+ label: "目录1",
110
+ key: "i",
111
+ icon: <QqOutlined />,
112
+ children: [
113
+ {
114
+ label: "目录1-子目录1",
115
+ key: "i-1",
116
+ },
117
+ ],
118
+ },
119
+ {
120
+ label: "目录2",
121
+ key: "j",
122
+ icon: <WeiboOutlined />,
123
+ children: [
124
+ {
125
+ label: "目录2-子目录1",
126
+ key: "j-1",
127
+ },
128
+ ],
129
+ },
130
+ ];
14
131
 
15
132
  const App = () => {
16
133
  const columns = [
@@ -65,37 +182,11 @@ const App = () => {
65
182
  <Layout
66
183
  appName="控制台"
67
184
  productList={false}
68
- menuList={[
69
- {
70
- label: "设备中心",
71
- key: "device",
72
- icon: <SwapOutlined />,
73
- children: [
74
- {
75
- label: "设备管理",
76
- key: "device-list",
77
- },
78
- ],
79
- },
80
- ]}
81
- logoUrl={
82
- "https://cdn.chengfengerlai.com/logo/company-logo/chengfengerlai-puhui.png"
83
- }
84
- user={{
85
- name: window?.g_config?.user?.name,
86
- avatar: window?.g_config?.user?.avatar,
87
- tenantName: window?.g_config?.tenant?.name,
88
- role: window?.g_config?.user?.roleInfo,
89
- }}
90
- custom={{
91
- type: window?.g_config?.custom?.type,
92
- isCompleted: window?.g_config?.custom?.isCompleted,
93
- isAudited: window?.g_config?.custom?.isAudited,
94
- hrefUrl: "/web/user-info",
95
- historyAction: history,
185
+ menuList={menuList}
186
+ customAction={()=>{
187
+ history.push("/web/user-info")
96
188
  }}
97
- logoutUrl={window?.g_config?.logoutUrl}
98
- switchTenantUrl={window?.g_config?.switchTenantUrl}
189
+ actions={["动作1","动作2"]}
99
190
  >
100
191
  {/* <CpcRoleInfo
101
192
  isShowTab={{
@@ -104,12 +195,13 @@ const App = () => {
104
195
  tableEmpower: true,
105
196
  tableData: false,
106
197
  }}></CpcRoleInfo> */}
107
-
108
- <ProTable
109
- columns={columns}
110
- nameSpace="device"
111
- dataSource={[{ name: "1", description: "1", status: "1" }]}
112
- />
198
+ <PageContainer>
199
+ <ProTable
200
+ columns={columns}
201
+ nameSpace="device"
202
+ dataSource={[{ name: "1", description: "1", status: "1" }]}
203
+ />
204
+ </PageContainer>
113
205
  </Layout>
114
206
  </ConfigProvider>
115
207
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cfel-base-components",
3
- "version": "2.4.3",
3
+ "version": "2.5.0",
4
4
  "description": "cfel-base-components",
5
5
  "main": "/src/index.tsx",
6
6
  "types": "src/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  .page-wraper {
2
2
  height: 100%;
3
3
  overflow-y: auto;
4
- padding: 12px 12px 0;
4
+ padding: 8px 8px 0;
5
5
  display: flex;
6
6
  flex-direction: column;
7
7
  }
@@ -21,10 +21,6 @@ export default function ProTableComponent({
21
21
  scroll={{
22
22
  x: "max-content",
23
23
  }}
24
- columnsState={{
25
- persistenceKey: nameSpace,
26
- persistenceType: "localStorage",
27
- }}
28
24
  {...restFileds}
29
25
  />
30
26
  );