aldehyde 0.2.333 → 0.2.335
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/lib/controls/rfield/index.js +1 -1
- package/lib/controls/rfield/index.js.map +1 -1
- package/lib/detail/button/inline-edit-button.d.ts +13 -0
- package/lib/detail/button/inline-edit-button.d.ts.map +1 -0
- package/lib/detail/button/inline-edit-button.js +17 -0
- package/lib/detail/button/inline-edit-button.js.map +1 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/lib/layout2/components/theme-button.js +1 -1
- package/lib/layout2/components/theme-button.js.map +1 -1
- package/lib/layout2/components/user-button.d.ts +2 -1
- package/lib/layout2/components/user-button.d.ts.map +1 -1
- package/lib/layout2/components/user-button.js +8 -2
- package/lib/layout2/components/user-button.js.map +1 -1
- package/lib/layout3/components/tabs-layout.js +1 -1
- package/lib/layout3/components/tabs-layout.js.map +1 -1
- package/lib/layout3/css/header.css +166 -138
- package/lib/layout3/css/main.css +74 -4
- package/lib/layout3/css/sider.css +5 -4
- package/lib/layout3/css/tabs-layout.css +1 -4
- package/lib/layout3/header.d.ts.map +1 -1
- package/lib/layout3/header.js +2 -1
- package/lib/layout3/header.js.map +1 -1
- package/lib/layout3/page.d.ts.map +1 -1
- package/lib/layout3/page.js +1 -1
- package/lib/layout3/page.js.map +1 -1
- package/lib/layout3/sider.js +1 -1
- package/lib/layout3/sider.js.map +1 -1
- package/lib/layout4/components/tabs-layout.d.ts +5 -0
- package/lib/layout4/components/tabs-layout.d.ts.map +1 -0
- package/lib/layout4/components/tabs-layout.js +68 -0
- package/lib/layout4/components/tabs-layout.js.map +1 -0
- package/lib/layout4/css/header.css +164 -0
- package/lib/layout4/css/main.css +119 -0
- package/lib/layout4/css/sider.css +11 -0
- package/lib/layout4/css/tabs-layout.css +43 -0
- package/lib/layout4/header.d.ts +11 -0
- package/lib/layout4/header.d.ts.map +1 -0
- package/lib/layout4/header.js +137 -0
- package/lib/layout4/header.js.map +1 -0
- package/lib/layout4/imgs/header-bg.png +0 -0
- package/lib/layout4/imgs/home.png +0 -0
- package/lib/layout4/imgs/menu-item-bg.png +0 -0
- package/lib/layout4/imgs/user.png +0 -0
- package/lib/layout4/main.d.ts +8 -0
- package/lib/layout4/main.d.ts.map +1 -0
- package/lib/layout4/main.js +14 -0
- package/lib/layout4/main.js.map +1 -0
- package/lib/layout4/page.d.ts +8 -0
- package/lib/layout4/page.d.ts.map +1 -0
- package/lib/layout4/page.js +60 -0
- package/lib/layout4/page.js.map +1 -0
- package/lib/layout4/sider.d.ts +10 -0
- package/lib/layout4/sider.d.ts.map +1 -0
- package/lib/layout4/sider.js +125 -0
- package/lib/layout4/sider.js.map +1 -0
- package/lib/lowcode-components/base-table/index.d.ts.map +1 -1
- package/lib/lowcode-components/base-table/index.js +9 -6
- package/lib/lowcode-components/base-table/index.js.map +1 -1
- package/lib/lowcode-components/lowcode-view/component/screen-fit/index.d.ts +0 -4
- package/lib/lowcode-components/lowcode-view/component/screen-fit/index.d.ts.map +1 -1
- package/lib/lowcode-components/lowcode-view/component/screen-fit/index.js +7 -5
- package/lib/lowcode-components/lowcode-view/component/screen-fit/index.js.map +1 -1
- package/lib/lowcode-components/lowcode-view/index.d.ts.map +1 -1
- package/lib/lowcode-components/lowcode-view/index.js +3 -8
- package/lib/lowcode-components/lowcode-view/index.js.map +1 -1
- package/lib/table/act-table.d.ts +8 -0
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +52 -13
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/column/column-builder.d.ts.map +1 -1
- package/lib/table/column/column-builder.js +32 -8
- package/lib/table/column/column-builder.js.map +1 -1
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/table/relation-table.js +2 -0
- package/lib/table/relation-table.js.map +1 -1
- package/lib/tmpl/hcservice-v3.d.ts +4 -0
- package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
- package/lib/tmpl/hcservice-v3.js +6 -0
- package/lib/tmpl/hcservice-v3.js.map +1 -1
- package/lib/tmpl/interface.d.ts +6 -1
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/interface.js.map +1 -1
- package/lib/tmpl/tmpl-config-analysis.d.ts.map +1 -1
- package/lib/tmpl/tmpl-config-analysis.js +2 -2
- package/lib/tmpl/tmpl-config-analysis.js.map +1 -1
- package/lib/tree/index.css +11 -9
- package/lib/tree/tmpl-tree.js +1 -1
- package/lib/tree/tmpl-tree.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/rfield/index.tsx +1 -1
- package/src/aldehyde/detail/button/inline-edit-button.tsx +40 -0
- package/src/aldehyde/index.tsx +6 -1
- package/src/aldehyde/layout2/components/theme-button.tsx +1 -1
- package/src/aldehyde/layout2/components/user-button.tsx +23 -14
- package/src/aldehyde/layout3/components/tabs-layout.tsx +1 -1
- package/src/aldehyde/layout3/css/header.css +166 -138
- package/src/aldehyde/layout3/css/main.css +74 -4
- package/src/aldehyde/layout3/css/sider.css +5 -4
- package/src/aldehyde/layout3/css/tabs-layout.css +1 -4
- package/src/aldehyde/layout3/header.tsx +8 -6
- package/src/aldehyde/layout3/page.tsx +1 -0
- package/src/aldehyde/layout3/sider.tsx +1 -1
- package/src/aldehyde/layout4/components/tabs-layout.tsx +106 -0
- package/src/aldehyde/layout4/css/header.css +164 -0
- package/src/aldehyde/layout4/css/main.css +119 -0
- package/src/aldehyde/layout4/css/sider.css +11 -0
- package/src/aldehyde/layout4/css/tabs-layout.css +43 -0
- package/src/aldehyde/layout4/header.tsx +182 -0
- package/src/aldehyde/layout4/imgs/header-bg.png +0 -0
- package/src/aldehyde/layout4/imgs/home.png +0 -0
- package/src/aldehyde/layout4/imgs/menu-item-bg.png +0 -0
- package/src/aldehyde/layout4/imgs/user.png +0 -0
- package/src/aldehyde/layout4/imgs/user.svg +27 -0
- package/src/aldehyde/layout4/main.tsx +27 -0
- package/src/aldehyde/layout4/page.tsx +91 -0
- package/src/aldehyde/layout4/sider.tsx +178 -0
- package/src/aldehyde/lowcode-components/base-table/index.tsx +22 -19
- package/src/aldehyde/lowcode-components/lowcode-view/component/screen-fit/index.tsx +7 -10
- package/src/aldehyde/lowcode-components/lowcode-view/index.tsx +2 -7
- package/src/aldehyde/table/act-table.tsx +275 -229
- package/src/aldehyde/table/column/column-builder.tsx +550 -505
- package/src/aldehyde/table/relation-table.tsx +1 -0
- package/src/aldehyde/tmpl/hcservice-v3.tsx +16 -0
- package/src/aldehyde/tmpl/interface.tsx +6 -1
- package/src/aldehyde/tmpl/tmpl-config-analysis.tsx +6 -6
- package/src/aldehyde/tree/index.css +11 -9
- package/src/aldehyde/tree/tmpl-tree.tsx +1 -1
|
@@ -1,156 +1,184 @@
|
|
|
1
|
-
.layout-header{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
text-transform: none;
|
|
39
|
-
background-image: linear-gradient(180deg, #FFFFFF 36%, #008BFD 100%);
|
|
40
|
-
-webkit-background-clip: text;
|
|
41
|
-
background-clip: text;
|
|
42
|
-
-webkit-text-fill-color: transparent;
|
|
43
|
-
color: transparent;
|
|
44
|
-
position: absolute;
|
|
45
|
-
top: 46px;
|
|
46
|
-
left: 33px;
|
|
47
|
-
font-weight: 500;
|
|
48
|
-
}
|
|
1
|
+
.layout-header {
|
|
2
|
+
padding: 0;
|
|
3
|
+
color: #ffffff;
|
|
4
|
+
position: relative;
|
|
5
|
+
height: auto;
|
|
6
|
+
background: #041B3B;
|
|
7
|
+
|
|
8
|
+
.header-top {
|
|
9
|
+
background-size: 100% 100%;
|
|
10
|
+
background-repeat: no-repeat;
|
|
11
|
+
background-position: center;
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 103px;
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
background-color: #041B3B;
|
|
17
|
+
border: none;
|
|
18
|
+
|
|
19
|
+
.header-title {
|
|
20
|
+
font-family: YouSheBiaoTiHei;
|
|
21
|
+
font-size: 48px;
|
|
22
|
+
line-height: 62px;
|
|
23
|
+
text-align: justify;
|
|
24
|
+
font-style: normal;
|
|
25
|
+
text-transform: none;
|
|
26
|
+
background-image: linear-gradient(180deg, #FFFFFF 0%, #90DEFF 100%);
|
|
27
|
+
/* 可以调整方向和颜色 */
|
|
28
|
+
/* 2. 关键: 将背景裁剪到文字形状 */
|
|
29
|
+
-webkit-background-clip: text;
|
|
30
|
+
/* 对于 Webkit 内核浏览器 (如 Safari, 老版Chrome) */
|
|
31
|
+
background-clip: text;
|
|
32
|
+
/* 标准属性 */
|
|
33
|
+
/* 3. 关键: 将文字颜色设置为透明,以显示背景渐变 */
|
|
34
|
+
-webkit-text-fill-color: transparent;
|
|
35
|
+
/* 对于 Webkit 内核浏览器 */
|
|
36
|
+
color: transparent;
|
|
37
|
+
/* 标准属性,但注意某些环境下可能需 -webkit-text-fill-color 配合 */
|
|
49
38
|
}
|
|
50
|
-
|
|
39
|
+
|
|
40
|
+
.header-time {
|
|
41
|
+
font-size: 18px;
|
|
42
|
+
line-height: 24px;
|
|
43
|
+
letter-spacing: 1px;
|
|
44
|
+
text-align: left;
|
|
45
|
+
font-style: normal;
|
|
46
|
+
text-transform: none;
|
|
47
|
+
background-image: linear-gradient(180deg, #FFFFFF 36%, #008BFD 100%);
|
|
48
|
+
-webkit-background-clip: text;
|
|
49
|
+
background-clip: text;
|
|
50
|
+
-webkit-text-fill-color: transparent;
|
|
51
|
+
color: transparent;
|
|
51
52
|
position: absolute;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
top: 46px;
|
|
54
|
+
left: 33px;
|
|
55
|
+
font-weight: 500;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.header-right {
|
|
60
|
+
position: absolute;
|
|
61
|
+
right: 28px;
|
|
62
|
+
top: 52px;
|
|
63
|
+
line-height: normal;
|
|
64
|
+
|
|
65
|
+
.message-bar {
|
|
66
|
+
min-width: 0;
|
|
67
|
+
|
|
68
|
+
svg {
|
|
69
|
+
color: #009BFF
|
|
63
70
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.message-bar:hover {
|
|
74
|
+
background: transparent;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.header-user {
|
|
78
|
+
button .ant-btn-icon {
|
|
79
|
+
margin-top: 4px;
|
|
68
80
|
}
|
|
69
81
|
}
|
|
70
|
-
|
|
71
|
-
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.header-nav {
|
|
85
|
+
margin: 0 0 16px 0;
|
|
86
|
+
display: flex;
|
|
87
|
+
justify-content: start;
|
|
88
|
+
align-items: center;
|
|
89
|
+
line-height: normal;
|
|
90
|
+
|
|
91
|
+
.header-home-page {
|
|
92
|
+
width: 220px;
|
|
72
93
|
display: flex;
|
|
73
|
-
justify-content: start;
|
|
74
94
|
align-items: center;
|
|
95
|
+
justify-content: flex-start;
|
|
96
|
+
padding: 4px 0 4px 24px;
|
|
97
|
+
margin-right: 12px;
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
background-size: 100% 100%;
|
|
100
|
+
background-repeat: no-repeat;
|
|
101
|
+
background-position: center;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.header-menu {
|
|
105
|
+
width: calc(100% - 220px);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.home-page-icon {
|
|
109
|
+
color: #90DEFF;
|
|
110
|
+
font-size: 18px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.home-page-title {
|
|
114
|
+
margin-left: 10px;
|
|
115
|
+
font-family: YouSheBiaoTiHei;
|
|
116
|
+
background: linear-gradient(180deg, #FFFFFF 0%, #90DEFF 100%);
|
|
117
|
+
-webkit-background-clip: text;
|
|
118
|
+
background-clip: text;
|
|
119
|
+
-webkit-text-fill-color: transparent;
|
|
120
|
+
font-size: 20px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.ant-menu-submenu-selected::after,
|
|
124
|
+
.ant-menu-submenu:hover::after,
|
|
125
|
+
.ant-menu-submenu-open::after,
|
|
126
|
+
.ant-menu-submenu::after {
|
|
127
|
+
border-bottom: none !important;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.menu-disabled {
|
|
131
|
+
cursor: not-allowed;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.menu-item {
|
|
135
|
+
position: relative;
|
|
136
|
+
width: 126px;
|
|
137
|
+
height: 42px;
|
|
75
138
|
line-height: normal;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
.
|
|
89
|
-
color: #90DEFF;
|
|
90
|
-
font-size: 18px;
|
|
91
|
-
}
|
|
92
|
-
.home-page-title{
|
|
93
|
-
margin-left: 10px;
|
|
94
|
-
font-family: YouSheBiaoTiHei;
|
|
95
|
-
background: linear-gradient(180deg, #FFFFFF 0%, #90DEFF 100%);
|
|
96
|
-
-webkit-background-clip: text;
|
|
97
|
-
background-clip: text;
|
|
98
|
-
-webkit-text-fill-color: transparent;
|
|
99
|
-
font-size: 20px;
|
|
100
|
-
}
|
|
101
|
-
.ant-menu-submenu-selected::after,
|
|
102
|
-
.ant-menu-submenu:hover::after,
|
|
103
|
-
.ant-menu-submenu-open::after,
|
|
104
|
-
.ant-menu-submenu::after{
|
|
105
|
-
border-bottom: none !important;
|
|
106
|
-
}
|
|
107
|
-
.menu-disabled{
|
|
108
|
-
cursor: not-allowed;
|
|
109
|
-
}
|
|
110
|
-
.menu-item {
|
|
111
|
-
position: relative;
|
|
112
|
-
width: 126px;
|
|
113
|
-
height: 42px;
|
|
114
|
-
line-height: normal;
|
|
139
|
+
display: flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
justify-content: center;
|
|
142
|
+
background: linear-gradient(180deg, rgba(124, 208, 255, 0.3) 0%, rgba(0, 41, 147, 0) 100%), linear-gradient(360deg, rgba(0, 133, 255, 0.5) 0%, rgba(0, 163, 255, 0.15) 22%, rgba(0, 163, 255, 0) 100%), rgba(0, 0, 0, 0.75);
|
|
143
|
+
border-radius: 120px 120px 120px 120px;
|
|
144
|
+
border: 1px solid;
|
|
145
|
+
background-clip: padding-box;
|
|
146
|
+
color: #009BFF;
|
|
147
|
+
font-weight: 500;
|
|
148
|
+
z-index: 1;
|
|
149
|
+
|
|
150
|
+
.menu-item-border,
|
|
151
|
+
.menu-item-border-sel {
|
|
115
152
|
display: flex;
|
|
116
153
|
align-items: center;
|
|
117
154
|
justify-content: center;
|
|
118
|
-
|
|
155
|
+
width: 118px;
|
|
156
|
+
height: 40px;
|
|
119
157
|
border-radius: 120px 120px 120px 120px;
|
|
120
158
|
border: 1px solid;
|
|
121
159
|
background-clip: padding-box;
|
|
122
|
-
|
|
123
|
-
font-weight: 500;
|
|
124
|
-
z-index: 1;
|
|
125
|
-
.menu-item-border,.menu-item-border-sel{
|
|
126
|
-
display: flex;
|
|
127
|
-
align-items: center;
|
|
128
|
-
justify-content: center;
|
|
129
|
-
width: 118px;
|
|
130
|
-
height: 40px;
|
|
131
|
-
border-radius: 120px 120px 120px 120px;
|
|
132
|
-
border: 1px solid;
|
|
133
|
-
background-clip: padding-box;
|
|
134
|
-
background: linear-gradient(180deg, #203c51, #02243e);
|
|
135
|
-
}
|
|
136
|
-
.menu-item-border-sel{
|
|
137
|
-
background: rgba(0,142,255,0.56);
|
|
138
|
-
box-shadow: inset 0px 0px 20px 5px #000C27;
|
|
139
|
-
color:#C4E8FF !important;
|
|
140
|
-
font-weight: 700 !important;
|
|
141
|
-
}
|
|
160
|
+
background: linear-gradient(180deg, #203c51, #02243e);
|
|
142
161
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
bottom: 0;
|
|
150
|
-
margin-bottom: -2px;
|
|
151
|
-
background: linear-gradient(90deg, rgba(0,0,0,0), rgba(0, 102, 255, 0.3), rgba(0, 102, 255, 1), rgba(0, 102, 255, 0.3),rgba(0,0,0,0));
|
|
152
|
-
border-radius: inherit;
|
|
153
|
-
z-index: -1;
|
|
162
|
+
|
|
163
|
+
.menu-item-border-sel {
|
|
164
|
+
background: rgba(0, 142, 255, 0.56);
|
|
165
|
+
box-shadow: inset 0px 0px 20px 5px #000C27;
|
|
166
|
+
color: #C4E8FF !important;
|
|
167
|
+
font-weight: 700 !important;
|
|
154
168
|
}
|
|
155
169
|
}
|
|
170
|
+
|
|
171
|
+
.menu-item::before {
|
|
172
|
+
content: '';
|
|
173
|
+
position: absolute;
|
|
174
|
+
top: 0;
|
|
175
|
+
left: 0;
|
|
176
|
+
right: 0;
|
|
177
|
+
bottom: 0;
|
|
178
|
+
margin-bottom: -2px;
|
|
179
|
+
background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 102, 255, 0.3), rgba(0, 102, 255, 1), rgba(0, 102, 255, 0.3), rgba(0, 0, 0, 0));
|
|
180
|
+
border-radius: inherit;
|
|
181
|
+
z-index: -1;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
156
184
|
}
|
|
@@ -20,9 +20,6 @@
|
|
|
20
20
|
|
|
21
21
|
.ant-drawer,
|
|
22
22
|
.ant-modal-content {
|
|
23
|
-
.ant-drawer-content {
|
|
24
|
-
border: none !important;
|
|
25
|
-
}
|
|
26
23
|
|
|
27
24
|
.ant-card-head {
|
|
28
25
|
background: transparent !important;
|
|
@@ -32,6 +29,47 @@
|
|
|
32
29
|
background: #041B3B !important;
|
|
33
30
|
}
|
|
34
31
|
}
|
|
32
|
+
|
|
33
|
+
.ant-menu-overflow-item-rest .ant-menu-submenu-title {
|
|
34
|
+
height: 100%;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.ant-menu-submenu-popup {
|
|
41
|
+
|
|
42
|
+
.menu-item-selected {
|
|
43
|
+
background: transparent !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ant-menu-submenu-title a {
|
|
47
|
+
color: #bec8d6
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ant-menu-submenu-selected a {
|
|
51
|
+
color: var(--ant-primary-color)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ant-table-tbody,
|
|
56
|
+
.ant-table-summary {
|
|
57
|
+
.ant-table-cell:has(.xiaoji) {
|
|
58
|
+
background-color: var(--color-5) !important;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ant-table-cell:has(.heji) {
|
|
62
|
+
background-color: var(--color-7) !important;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.xiaoji {
|
|
66
|
+
background-color: var(--color-5) !important;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.heji {
|
|
70
|
+
background-color: var(--color-7) !important;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
35
73
|
}
|
|
36
74
|
|
|
37
75
|
.v3-antd-table {
|
|
@@ -45,7 +83,7 @@
|
|
|
45
83
|
}
|
|
46
84
|
|
|
47
85
|
.ant-table-tbody .ant-table-cell {
|
|
48
|
-
background:
|
|
86
|
+
background: var(--ant-layout-body-bg) !important;
|
|
49
87
|
}
|
|
50
88
|
}
|
|
51
89
|
|
|
@@ -54,4 +92,36 @@
|
|
|
54
92
|
.ant-table-css-var {
|
|
55
93
|
--ant-table-border-color: #05449a;
|
|
56
94
|
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.v3-antd-modal {
|
|
98
|
+
.ant-modal-content {
|
|
99
|
+
background: var(--ant-color-bg-base) !important;
|
|
100
|
+
border: 1px solid var(--ant-color-border-secondary) !important;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.ant-modal-header {
|
|
104
|
+
background: transparent;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.v3-antd-drawer {
|
|
109
|
+
background: var(--ant-color-bg-base) !important;
|
|
110
|
+
border: 2px solid var(--ant-color-border-secondary) !important;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.v3-antd-card {
|
|
114
|
+
background: transparent;
|
|
115
|
+
|
|
116
|
+
.ant-card-head {
|
|
117
|
+
background: var(--ant-color-bg-container) !important;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.ant-card-body {
|
|
121
|
+
background: transparent;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.v3-antd-card:hover {
|
|
126
|
+
border-color: var(--ant-color-border-secondary);
|
|
57
127
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
.layout-sider{
|
|
1
|
+
.v3-layout-sider {
|
|
2
2
|
margin-bottom: 12px;
|
|
3
3
|
overflow: auto;
|
|
4
|
-
background: linear-gradient(
|
|
4
|
+
background: linear-gradient(180deg, rgba(7, 27, 67, 0.1) 0%, rgba(13, 46, 89, 0.2) 100%), radial-gradient(188% 188% at -139% 100%, rgba(39, 115, 255, 0.1) 0%, rgba(39, 115, 255, 0) 100%), radial-gradient(488% 488% at -439% 100%, rgba(39, 115, 255, 0.2) 0%, rgba(39, 115, 255, 0) 100%), radial-gradient(716% 716% at -667% 100%, rgba(39, 115, 255, 0.5) 0%, rgba(39, 115, 255, 0) 100%);
|
|
5
5
|
border: 1px solid #05449a;
|
|
6
6
|
box-shadow: inset 0 0 8px #042c64, inset 0 0 8px #042c64;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
|
|
8
|
+
.ant-menu-item-selected {
|
|
9
|
+
background: linear-gradient(90deg, #88EFFF00, rgba(163, 194, 255, 0.2), #88EFFF00);
|
|
9
10
|
}
|
|
10
11
|
}
|
|
@@ -164,12 +164,14 @@ const Header: React.FC<HeaderPropsType> = ({ systemName, menuList }) => {
|
|
|
164
164
|
<HomeFilled className="home-page-icon" />
|
|
165
165
|
<div className="home-page-title">{translate("${首页}")}</div>
|
|
166
166
|
</NavLink>
|
|
167
|
-
<
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
167
|
+
<div className="header-menu">
|
|
168
|
+
<Menu
|
|
169
|
+
mode="horizontal"
|
|
170
|
+
items={menu}
|
|
171
|
+
selectedKeys={selectedKeys}
|
|
172
|
+
style={{ background: "#041B3B", border: "none" }}
|
|
173
|
+
/>
|
|
174
|
+
</div>
|
|
173
175
|
</div>
|
|
174
176
|
</Layout.Header>
|
|
175
177
|
);
|
|
@@ -62,6 +62,7 @@ const Page: React.FC<PagePropsType> = (props: PagePropsType) => {
|
|
|
62
62
|
table={{ className: "v3-antd-table" }}
|
|
63
63
|
drawer={{ className: "v3-antd-drawer" }}
|
|
64
64
|
modal={{ className: "v3-antd-modal" }}
|
|
65
|
+
card={{ className: "v3-antd-card" }}
|
|
65
66
|
>
|
|
66
67
|
<Layout style={{ height: "100%" }}>
|
|
67
68
|
<Header systemName={systemName ? systemName : Units.programName_NavLeft()} menuList={menu}></Header>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import React, { useCallback, useMemo } from "react";
|
|
2
|
+
import { Dropdown, Tabs } from 'antd';
|
|
3
|
+
import { MenuItemType } from 'antd/es/menu/interface';
|
|
4
|
+
import { KeepAliveTabContext } from '../../layout2/tabs/tabs-context';
|
|
5
|
+
import { KeepAliveTab, useTabs } from "../../hooks/use-tabs";
|
|
6
|
+
import antdIcons from '@ant-design/icons';
|
|
7
|
+
import { useNavigate } from 'react-router-dom';
|
|
8
|
+
import Units from '../../units';
|
|
9
|
+
import { useLocale } from "../../locale/useLocale";
|
|
10
|
+
import "../css/tabs-layout.css";
|
|
11
|
+
|
|
12
|
+
const getIcon = (icon?: string): React.ReactElement | undefined => {
|
|
13
|
+
return icon && antdIcons[icon] && React.createElement(antdIcons[icon]);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const TabsLayout: React.FC = () => {
|
|
17
|
+
const { translate } = useLocale();
|
|
18
|
+
const navigate = useNavigate();
|
|
19
|
+
const { activeTabRoutePath, tabs = [], closeTab, refreshTab, closeOtherTab } = useTabs();
|
|
20
|
+
|
|
21
|
+
const menuItems: MenuItemType[] = useMemo(
|
|
22
|
+
() => tabs.length <= 1 ? [] : [
|
|
23
|
+
{ label: translate("${关闭}"), key: "close" },
|
|
24
|
+
{ label: translate("${关闭其他}"), key: "other" },
|
|
25
|
+
],
|
|
26
|
+
[tabs]);
|
|
27
|
+
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
|
+
const menuClick = useCallback(({ key, domEvent }: any, tab: KeepAliveTab) => {
|
|
30
|
+
domEvent.stopPropagation();
|
|
31
|
+
if (key === 'refresh') {
|
|
32
|
+
refreshTab(tab.routePath);
|
|
33
|
+
} else if (key === "close") {
|
|
34
|
+
closeTab(tab.routePath);
|
|
35
|
+
} else if (key === "other") {
|
|
36
|
+
closeOtherTab(tab.routePath);
|
|
37
|
+
}
|
|
38
|
+
}, [closeOtherTab, closeTab, refreshTab]);
|
|
39
|
+
|
|
40
|
+
const renderTabTitle = useCallback((tab: KeepAliveTab) => {
|
|
41
|
+
let label = Units.mapMenu(tab.title) ? Units.mapMenu(tab.title) : tab.title;
|
|
42
|
+
label = translate("${" + label + "}");
|
|
43
|
+
return (
|
|
44
|
+
<Dropdown
|
|
45
|
+
menu={{
|
|
46
|
+
items: menuItems,
|
|
47
|
+
onClick: (e) => menuClick(e, tab),
|
|
48
|
+
}}
|
|
49
|
+
trigger={['contextMenu']}
|
|
50
|
+
onOpenChange={open => open && navigate(tab.pathname)}
|
|
51
|
+
>
|
|
52
|
+
<div className='flex gap-[6px]'>
|
|
53
|
+
{getIcon(tab.icon)}
|
|
54
|
+
{label}
|
|
55
|
+
</div>
|
|
56
|
+
</Dropdown >
|
|
57
|
+
)
|
|
58
|
+
}, [menuItems]);
|
|
59
|
+
|
|
60
|
+
const tabItems = useMemo(() => {
|
|
61
|
+
return tabs.map(tab => ({
|
|
62
|
+
key: tab.routePath,
|
|
63
|
+
label: renderTabTitle(tab),
|
|
64
|
+
children: (
|
|
65
|
+
<div key={tab.key} className="overflow-y-auto tabs-children">
|
|
66
|
+
{tab.children}
|
|
67
|
+
</div>
|
|
68
|
+
),
|
|
69
|
+
closable: tabs.length > 1, // 剩最后一个就不能删除了
|
|
70
|
+
}))
|
|
71
|
+
}, [tabs]);
|
|
72
|
+
|
|
73
|
+
const onTabsChange = useCallback((tabKey: string) => {
|
|
74
|
+
const tab = tabs.find(r => r.routePath === tabKey);
|
|
75
|
+
if (tab) {
|
|
76
|
+
navigate(tab.pathname);
|
|
77
|
+
}
|
|
78
|
+
}, [tabs]);
|
|
79
|
+
|
|
80
|
+
const keepAliveContextValue = useMemo(
|
|
81
|
+
() => ({
|
|
82
|
+
closeTab,
|
|
83
|
+
closeOtherTab,
|
|
84
|
+
refreshTab,
|
|
85
|
+
}),
|
|
86
|
+
[closeTab, closeOtherTab, refreshTab]
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<KeepAliveTabContext.Provider value={keepAliveContextValue}>
|
|
91
|
+
<Tabs
|
|
92
|
+
className="v4-tabs-layout"
|
|
93
|
+
activeKey={activeTabRoutePath}
|
|
94
|
+
items={tabItems}
|
|
95
|
+
type="editable-card"
|
|
96
|
+
onChange={onTabsChange}
|
|
97
|
+
hideAdd
|
|
98
|
+
onEdit={(e) => closeTab(e.toString())}
|
|
99
|
+
size="small"
|
|
100
|
+
// tabBarGutter={10}
|
|
101
|
+
/>
|
|
102
|
+
</KeepAliveTabContext.Provider>
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export default TabsLayout;
|