cfel-base-components 2.5.50 → 2.5.52

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,128 +1,200 @@
1
- import React from "react";
2
- import { createRoot } from "react-dom/client";
3
- import style from "./index.module.less";
4
- import { SwapOutlined, QqOutlined, WeiboOutlined } from "@ant-design/icons";
5
- import { ConfigProvider } from "antd";
6
- import "./index.scss";
7
- import Layout from "../../src/components/layout-console";
8
- //import Layout from "../../src/components/layout-console";
1
+ import React from 'react'
2
+ import { createRoot } from 'react-dom/client'
3
+ import style from './index.module.less'
4
+ import { SwapOutlined, QqOutlined, WeiboOutlined } from '@ant-design/icons'
5
+ import { ConfigProvider } from 'antd'
6
+ import './index.scss'
7
+ import Layout from '../../src/components/layout'
8
+ import LayoutConsole from '../../src/components/layout-console'
9
9
  // import Account from '../../src/components/universal-pages/account';
10
10
  // import AccountInfo from '../../src/components/universal-pages/accountInfo';
11
- import CpcRole from "../../src/components/universal-pages/cpcRole";
12
- import CpcRoleInfo from "../../src/components/universal-pages/cpcRoleInfo";
13
- import ProTable from "../../src/components/base-component/ProTable";
14
- import PageContainer from "../../src/components/base-component/PageContainer";
11
+ import CpcRole from '../../src/components/universal-pages/cpcRole'
12
+ import CpcRoleInfo from '../../src/components/universal-pages/cpcRoleInfo'
13
+ import ProTable from '../../src/components/base-component/ProTable'
14
+ import PageContainer from '../../src/components/base-component/PageContainer'
15
15
 
16
- const menuList = [
16
+ const menu = [
17
17
  {
18
- label: "Dashboard",
19
- key: "dashboard",
20
- icon: <QqOutlined />,
18
+ label: '云厂商',
19
+ icon: <i className="iconfont icon-wangluo" />,
20
+ key: 'cloud-list',
21
+ },
22
+ {
23
+ label: '产品模型',
24
+ icon: <i className="iconfont icon-jiqun" />,
25
+ key: 'catalog',
21
26
  children: [
22
27
  {
23
- label: "Overview",
24
- key: "dashboard-overview",
25
- children: [
26
- {
27
- label: "Overview",
28
- key: "dashboard-overview-overview",
29
- },
30
- {
31
- label: "Overview",
32
- key: "dashboard-overview-overview1",
33
- },
34
- {
35
- label: "Overview",
36
- key: "dashboard-overview-overview2",
37
- },
38
- ],
28
+ label: '产品模型',
29
+ key: 'product-list',
30
+ },
31
+ {
32
+ label: '商品模型',
33
+ key: 'commodity-list',
34
+ },
35
+ {
36
+ label: '定价项列表',
37
+ key: 'entity-list',
38
+ },
39
+ {
40
+ label: '资源类型管理',
41
+ key: 'rsourceType-list',
42
+ },
43
+ ],
44
+ },
45
+ {
46
+ label: '数据字典',
47
+ icon: <i className="iconfont icon-shujuzidian" />,
48
+ key: 'dictionary-list',
49
+ },
50
+ {
51
+ label: '实例管理',
52
+ icon: <i className="iconfont icon-moxing-miaobian" />,
53
+ children: [
54
+ {
55
+ label: '容器镜像服务管理',
56
+ key: 'instance-list',
57
+ },
58
+ {
59
+ label: 'Kaas服务管理',
60
+ key: 'cluster-puhui',
61
+ },
62
+ {
63
+ label: '代理服务管理',
64
+ key: 'proxy-manage',
39
65
  },
40
66
  {
41
- label: "Stats",
42
- key: "dashboard-stats",
67
+ label: '控制台首页文档管理',
68
+ key: 'console-doc',
69
+ },
70
+ {
71
+ label: '轻量云注册管理',
72
+ key: 'register-manage',
43
73
  },
44
74
  ],
45
75
  },
76
+
46
77
  {
47
- label: "User Management",
48
- key: "user-management",
49
- icon: <WeiboOutlined />,
78
+ label: 'API管理',
79
+ key: 'apiAction',
80
+ icon: <i className="iconfont icon-API" />,
50
81
  children: [
51
82
  {
52
- label: "Users",
53
- key: "user-management-users",
83
+ label: 'API 应用管理',
84
+ key: 'api-app-list',
54
85
  },
55
86
  {
56
- label: "Roles",
57
- key: "user-management-roles",
87
+ label: 'API 分组管理',
88
+ key: 'group-list',
89
+ },
90
+ {
91
+ label: 'API 接口管理',
92
+ key: 'api-route-list',
58
93
  },
59
94
  ],
60
95
  },
61
96
  {
62
- label: "Settings",
63
- key: "settings",
64
- icon: <QqOutlined />,
97
+ label: '消息中心',
98
+ key: 'msgAction',
99
+ icon: <i className="iconfont icon-xiaoxi" />,
65
100
  children: [
66
101
  {
67
- label: "Profile",
68
- key: "settings-profile",
102
+ label: '消息管理',
103
+ key: 'send-list',
104
+ },
105
+ {
106
+ label: '事件点管理',
107
+ key: 'event-list',
108
+ },
109
+ {
110
+ label: '消息模版管理',
111
+ key: 'msgtemplate-list',
69
112
  },
70
113
  {
71
- label: "Preferences",
72
- key: "settings-preferences",
114
+ label: '邮件账号管理',
115
+ key: 'mail-list',
73
116
  },
74
117
  ],
75
118
  },
76
119
  {
77
- label: "Reports",
78
- key: "reports",
79
- icon: <WeiboOutlined />,
120
+ label: '权限资源配置',
121
+ key: 'menuAction',
122
+ icon: <i className="iconfont icon-qingdan" />,
123
+ children: [
124
+ {
125
+ label: '菜单管理',
126
+ key: 'menuControlList',
127
+ },
128
+ {
129
+ label: '权限策略管理',
130
+ key: 'strategy-list',
131
+ },
132
+ {
133
+ label: '权限规则管理',
134
+ key: 'rule-list',
135
+ },
136
+ ],
137
+ },
138
+ {
139
+ label: '配额管理',
140
+ icon: <i className="iconfont icon-peie" />,
141
+ key: 'quotaList',
142
+ },
143
+ {
144
+ label: '库存管理',
145
+ icon: <i className="iconfont icon-peie" />,
146
+ key: 'inventoryList',
147
+ },
148
+ {
149
+ label: '权限管理',
150
+ key: 'authority',
151
+ icon: <i className="iconfont icon-shezhi" />,
80
152
  children: [
81
153
  {
82
- label: "Sales",
83
- key: "reports-sales",
154
+ label: '账号列表',
155
+ key: 'account-list',
84
156
  },
85
157
  {
86
- label: "Performance",
87
- key: "reports-performance",
158
+ label: '角色列表',
159
+ key: 'role-list',
88
160
  },
89
161
  ],
90
162
  },
91
- ];
163
+ ]
92
164
 
93
165
  const App = () => {
94
166
  const columns = [
95
167
  {
96
- title: "名称",
97
- dataIndex: "name",
98
- key: "name",
168
+ title: '名称',
169
+ dataIndex: 'name',
170
+ key: 'name',
99
171
  },
100
172
  {
101
- title: "描述",
102
- dataIndex: "description",
103
- key: "description",
173
+ title: '描述',
174
+ dataIndex: 'description',
175
+ key: 'description',
104
176
  },
105
177
  {
106
- title: "状态",
107
- dataIndex: "status",
108
- key: "status",
178
+ title: '状态',
179
+ dataIndex: 'status',
180
+ key: 'status',
109
181
  },
110
182
  {
111
- title: "操作",
183
+ title: '操作',
112
184
  width: 120,
113
- fixed: "right",
185
+ fixed: 'right',
114
186
  render: (row) => (
115
187
  <a
116
188
  onClick={() => {
117
- setEditingData(row);
118
- setInstanceDetailOpen(true);
189
+ setEditingData(row)
190
+ setInstanceDetailOpen(true)
119
191
  }}
120
192
  >
121
193
  详情
122
194
  </a>
123
195
  ),
124
196
  },
125
- ];
197
+ ]
126
198
 
127
199
  return (
128
200
  <ConfigProvider
@@ -145,10 +217,10 @@ const App = () => {
145
217
  productList={false}
146
218
  menuList={menuList}
147
219
  type=""
148
- customAction={()=>{
149
- history.push("/web/user-info")
220
+ customAction={() => {
221
+ history.push('/web/user-info')
150
222
  }}
151
- actions={["动作1","动作2"]}
223
+ actions={['动作1', '动作2']}
152
224
  >
153
225
  {/* <CpcRoleInfo
154
226
  isShowTab={{
@@ -158,16 +230,12 @@ const App = () => {
158
230
  tableData: false,
159
231
  }}></CpcRoleInfo> */}
160
232
  <PageContainer>
161
- <ProTable
162
- columns={columns}
163
- nameSpace="device"
164
- dataSource={[{ name: "1", description: "1", status: "1" }]}
165
- />
233
+ <ProTable columns={columns} nameSpace="device" dataSource={[{ name: '1', description: '1', status: '1' }]} />
166
234
  </PageContainer>
167
235
  </Layout>
168
236
  </ConfigProvider>
169
- );
170
- };
171
- const container = document.getElementById("root");
172
- const root = createRoot(container);
173
- root.render(<App />);
237
+ )
238
+ }
239
+ const container = document.getElementById('root')
240
+ const root = createRoot(container)
241
+ root.render(<App />)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cfel-base-components",
3
- "version": "2.5.50",
3
+ "version": "2.5.52",
4
4
  "description": "cfel-base-components",
5
5
  "main": "/src/index.tsx",
6
6
  "types": "src/index.d.ts",
@@ -22,6 +22,75 @@ ul {
22
22
  list-style: none;
23
23
  cursor: pointer;
24
24
 
25
+ .#{$menuPrefixCls}-submenu-arrow {
26
+ display: inline-block;
27
+ position: absolute;
28
+ top: 52%;
29
+ right: 16px;
30
+ width: 16px;
31
+ height: 16px;
32
+ transform: translateY(0);
33
+ transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
34
+
35
+ // 当菜单收起时隐藏箭头
36
+ .ant-layout-sider-collapsed & {
37
+ display: none;
38
+ }
39
+
40
+ &::before,
41
+ &::after {
42
+ position: absolute;
43
+ width: 6px;
44
+ height: 1.25px;
45
+ scale: 1.25;
46
+ background: #788bb1;
47
+ border-radius: 2px;
48
+ transition:
49
+ background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
50
+ transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
51
+ content: '';
52
+ }
53
+
54
+ &::before {
55
+ transform: rotate(-45deg) translateX(2.5px);
56
+ }
57
+
58
+ &::after {
59
+ transform: rotate(45deg) translateX(-2.5px);
60
+ }
61
+
62
+ // RTL support
63
+ &.#{$menuPrefixCls}-rtl,
64
+ .#{$menuPrefixCls}-submenu-rtl & {
65
+ right: auto;
66
+ left: 16px;
67
+ }
68
+ }
69
+
70
+ .#{$menuPrefixCls}-submenu-open > .#{$menuPrefixCls}-submenu-title {
71
+ .#{$menuPrefixCls}-submenu-arrow {
72
+ transform: translateY(-3px);
73
+ &::before {
74
+ transform: rotate(45deg) translateX(2.5px);
75
+ }
76
+ &::after {
77
+ transform: rotate(-45deg) translateX(-2.5px);
78
+ }
79
+ }
80
+ }
81
+
82
+ .#{$menuPrefixCls}-submenu-selected {
83
+ > .#{$menuPrefixCls}-submenu-title {
84
+ .#{$menuPrefixCls}-submenu-arrow {
85
+ &::before,
86
+ &::after {
87
+ background-color: #185dff;
88
+ }
89
+ }
90
+ }
91
+ }
92
+
93
+
25
94
  > li {
26
95
  &:hover {
27
96
  > .menu-item-content {
@@ -679,73 +748,6 @@ body {
679
748
  }
680
749
  }
681
750
 
682
- .#{$menuPrefixCls}-submenu-arrow {
683
- display: inline-block;
684
- position: absolute;
685
- top: 52%;
686
- right: 16px;
687
- width: 16px;
688
- height: 16px;
689
- transform: translateY(0);
690
- transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
691
-
692
- // 当菜单收起时隐藏箭头
693
- .ant-layout-sider-collapsed & {
694
- display: none;
695
- }
696
-
697
- &::before,
698
- &::after {
699
- position: absolute;
700
- width: 6px;
701
- height: 1.25px;
702
- scale: 1.25;
703
- background: #788bb1;
704
- border-radius: 2px;
705
- transition:
706
- background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
707
- transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
708
- content: '';
709
- }
710
-
711
- &::before {
712
- transform: rotate(-45deg) translateX(2.5px);
713
- }
714
-
715
- &::after {
716
- transform: rotate(45deg) translateX(-2.5px);
717
- }
718
-
719
- // RTL support
720
- &.#{$menuPrefixCls}-rtl,
721
- .#{$menuPrefixCls}-submenu-rtl & {
722
- right: auto;
723
- left: 16px;
724
- }
725
- }
726
-
727
- .#{$menuPrefixCls}-submenu-open > .#{$menuPrefixCls}-submenu-title {
728
- .#{$menuPrefixCls}-submenu-arrow {
729
- transform: translateY(-3px);
730
- &::before {
731
- transform: rotate(45deg) translateX(2.5px);
732
- }
733
- &::after {
734
- transform: rotate(-45deg) translateX(-2.5px);
735
- }
736
- }
737
- }
738
-
739
- .#{$menuPrefixCls}-submenu-selected {
740
- > .#{$menuPrefixCls}-submenu-title {
741
- .#{$menuPrefixCls}-submenu-arrow {
742
- &::before,
743
- &::after {
744
- background-color: #185dff;
745
- }
746
- }
747
- }
748
- }
749
751
 
750
752
  .#{$menuPrefixCls} {
751
753
  &-zoom-enter,
@@ -207,18 +207,15 @@ export default function LiosLayout(props: LiosLayoutlProps) {
207
207
  <div className="layout-side-mask1"></div>
208
208
 
209
209
  <div className="header-logo" style={{ justifyContent: collapsed ? 'center' : '', paddingLeft: collapsed ? '0' : '' }}>
210
- {!collapsed && (
211
- <img
212
- style={{ zIndex: 99 }}
213
- onClick={() => {
214
- window.open('/home')
215
- }}
216
- className={`logo-base current-logo`}
217
- src={logo || logoUrl}
218
- />
219
- )}
220
- {collapsed && <img className={`logo-sub`} src={subLogoUrl} />}
221
- {/* {collapsed && <img className={`logo-base sub-logo`} src={logo || subLogoUrl} />} */}
210
+ <div
211
+ onClick={() => {
212
+ window.open('/home')
213
+ }}
214
+ >
215
+ {!collapsed && <img className={`logo-base current-logo`} src={logo || logoUrl} />}
216
+ {collapsed && <img className={`logo-sub`} src={subLogoUrl} />}
217
+ {/* {collapsed && <img className={`logo-base sub-logo`} src={logo || subLogoUrl} />} */}
218
+ </div>
222
219
 
223
220
  {/* {!collapsed && (
224
221
  <div
@@ -339,7 +336,14 @@ export default function LiosLayout(props: LiosLayoutlProps) {
339
336
  classNames += ' submenu-selected'
340
337
  }
341
338
  return (
342
- <MenuItem key={item.key} className="menu-item-content">
339
+ <MenuItem
340
+ key={item.key}
341
+ className="menu-item-content"
342
+ style={{
343
+ position: 'relative',
344
+ zIndex: 99,
345
+ }}
346
+ >
343
347
  <div>
344
348
  <span className={`menu-item-icon ${isSelected ? 'submenu-selected' : ''}`}>{item.icon}</span>
345
349
  {!collapsed && <span className={classNames}>{item.label}</span>}
@@ -22,6 +22,72 @@ ul {
22
22
  list-style: none;
23
23
  cursor: pointer;
24
24
 
25
+ .#{$menuPrefixCls}-submenu-arrow {
26
+ display: inline-block;
27
+ position: absolute;
28
+ top: 52%;
29
+ right: 16px;
30
+ width: 16px;
31
+ height: 16px;
32
+ transform: translateY(0);
33
+ transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
34
+ // 当菜单收起时隐藏箭头
35
+ .ant-layout-sider-collapsed & {
36
+ display: none;
37
+ }
38
+
39
+ &::before,
40
+ &::after {
41
+ position: absolute;
42
+ width: 6px;
43
+ height: 1.25px;
44
+ scale: 1.25;
45
+ background: rgba(255, 255, 255, 0.65);
46
+ border-radius: 2px;
47
+ transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
48
+ content: '';
49
+ }
50
+
51
+ &::before {
52
+ transform: rotate(-45deg) translateX(2.5px);
53
+ }
54
+
55
+ &::after {
56
+ transform: rotate(45deg) translateX(-2.5px);
57
+ }
58
+
59
+ // RTL support
60
+ &.#{$menuPrefixCls}-rtl,
61
+ .#{$menuPrefixCls}-submenu-rtl & {
62
+ right: auto;
63
+ left: 16px;
64
+ }
65
+ }
66
+
67
+ .#{$menuPrefixCls}-submenu-open > .#{$menuPrefixCls}-submenu-title {
68
+ .#{$menuPrefixCls}-submenu-arrow {
69
+ transform: translateY(-3px);
70
+ &::before {
71
+ transform: rotate(45deg) translateX(2.5px);
72
+ }
73
+ &::after {
74
+ transform: rotate(-45deg) translateX(-2.5px);
75
+ }
76
+ }
77
+ }
78
+
79
+ .#{$menuPrefixCls}-submenu-selected {
80
+ > .#{$menuPrefixCls}-submenu-title {
81
+ .#{$menuPrefixCls}-submenu-arrow {
82
+ &::before,
83
+ &::after {
84
+ background-color: rgba(255, 255, 255);
85
+ }
86
+ }
87
+ }
88
+ }
89
+
90
+
25
91
  > li {
26
92
  &:hover {
27
93
  > .menu-item-content {
@@ -714,70 +780,6 @@ body {
714
780
  }
715
781
  }
716
782
 
717
- .#{$menuPrefixCls}-submenu-arrow {
718
- display: inline-block;
719
- position: absolute;
720
- top: 52%;
721
- right: 16px;
722
- width: 16px;
723
- height: 16px;
724
- transform: translateY(0);
725
- transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
726
- // 当菜单收起时隐藏箭头
727
- .ant-layout-sider-collapsed & {
728
- display: none;
729
- }
730
-
731
- &::before,
732
- &::after {
733
- position: absolute;
734
- width: 6px;
735
- height: 1.25px;
736
- scale: 1.25;
737
- background: rgba(255, 255, 255, 0.65);
738
- border-radius: 2px;
739
- transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
740
- content: '';
741
- }
742
-
743
- &::before {
744
- transform: rotate(-45deg) translateX(2.5px);
745
- }
746
-
747
- &::after {
748
- transform: rotate(45deg) translateX(-2.5px);
749
- }
750
-
751
- // RTL support
752
- &.#{$menuPrefixCls}-rtl,
753
- .#{$menuPrefixCls}-submenu-rtl & {
754
- right: auto;
755
- left: 16px;
756
- }
757
- }
758
-
759
- .#{$menuPrefixCls}-submenu-open > .#{$menuPrefixCls}-submenu-title {
760
- .#{$menuPrefixCls}-submenu-arrow {
761
- transform: translateY(-3px);
762
- &::before {
763
- transform: rotate(45deg) translateX(2.5px);
764
- }
765
- &::after {
766
- transform: rotate(-45deg) translateX(-2.5px);
767
- }
768
- }
769
- }
770
-
771
- .#{$menuPrefixCls}-submenu-selected {
772
- > .#{$menuPrefixCls}-submenu-title {
773
- .#{$menuPrefixCls}-submenu-arrow {
774
- &::before,
775
- &::after {
776
- background-color: rgba(255, 255, 255);
777
- }
778
- }
779
- }
780
- }
781
783
 
782
784
  .#{$menuPrefixCls} {
783
785
  &-zoom-enter,