whistle.mock-plugins 1.1.3-dev.7 → 1.1.3-dev.8
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/package.json
CHANGED
|
@@ -1013,10 +1013,16 @@ const InterfaceManagement = () => {
|
|
|
1013
1013
|
<Dropdown
|
|
1014
1014
|
overlay={
|
|
1015
1015
|
<Menu
|
|
1016
|
-
selectedKeys={selectedGroup ? [selectedGroup] : []}
|
|
1017
|
-
onClick={({ key }) =>
|
|
1016
|
+
selectedKeys={selectedGroup ? [selectedGroup] : ['ALL_GROUPS']}
|
|
1017
|
+
onClick={({ key }) => {
|
|
1018
|
+
if (key === 'ALL_GROUPS') {
|
|
1019
|
+
setSelectedGroup(null);
|
|
1020
|
+
} else {
|
|
1021
|
+
setSelectedGroup(key === selectedGroup ? null : key);
|
|
1022
|
+
}
|
|
1023
|
+
}}
|
|
1018
1024
|
>
|
|
1019
|
-
<Menu.Item key=
|
|
1025
|
+
<Menu.Item key="ALL_GROUPS">全部分组</Menu.Item>
|
|
1020
1026
|
{groups.map(group => (
|
|
1021
1027
|
<Menu.Item key={group}>
|
|
1022
1028
|
{group} ({interfaces.filter(item => item.group === group).length})
|
|
@@ -1043,57 +1049,6 @@ const InterfaceManagement = () => {
|
|
|
1043
1049
|
loading={interfacesLoading}
|
|
1044
1050
|
/>
|
|
1045
1051
|
</Tooltip>
|
|
1046
|
-
|
|
1047
|
-
<Popover
|
|
1048
|
-
title="自定义显示列"
|
|
1049
|
-
trigger="click"
|
|
1050
|
-
open={columnConfigVisible}
|
|
1051
|
-
onOpenChange={handleColumnConfigToggle}
|
|
1052
|
-
content={
|
|
1053
|
-
<div style={{ width: 280 }}>
|
|
1054
|
-
<div style={{ marginBottom: 12 }}>
|
|
1055
|
-
<Space>
|
|
1056
|
-
<Button size="small" onClick={handleSelectAllColumns}>
|
|
1057
|
-
全选
|
|
1058
|
-
</Button>
|
|
1059
|
-
<Button size="small" onClick={handleResetColumns}>
|
|
1060
|
-
重置
|
|
1061
|
-
</Button>
|
|
1062
|
-
</Space>
|
|
1063
|
-
</div>
|
|
1064
|
-
<Checkbox.Group
|
|
1065
|
-
value={tableConfig.visibleColumns || COLUMN_CONFIG.map(col => col.key)}
|
|
1066
|
-
onChange={handleColumnConfigChange}
|
|
1067
|
-
style={{ width: '100%' }}
|
|
1068
|
-
>
|
|
1069
|
-
<div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
|
1070
|
-
{COLUMN_CONFIG.map(col => (
|
|
1071
|
-
<Checkbox
|
|
1072
|
-
key={col.key}
|
|
1073
|
-
value={col.key}
|
|
1074
|
-
disabled={col.required}
|
|
1075
|
-
style={{
|
|
1076
|
-
width: '100%',
|
|
1077
|
-
color: col.required ? '#999' : undefined
|
|
1078
|
-
}}
|
|
1079
|
-
>
|
|
1080
|
-
{col.title}
|
|
1081
|
-
{col.required && (
|
|
1082
|
-
<span style={{ color: '#999', fontSize: '12px', marginLeft: 4 }}>
|
|
1083
|
-
(必须)
|
|
1084
|
-
</span>
|
|
1085
|
-
)}
|
|
1086
|
-
</Checkbox>
|
|
1087
|
-
))}
|
|
1088
|
-
</div>
|
|
1089
|
-
</Checkbox.Group>
|
|
1090
|
-
</div>
|
|
1091
|
-
}
|
|
1092
|
-
>
|
|
1093
|
-
<Button icon={<SettingOutlined />} size="small">
|
|
1094
|
-
列设置
|
|
1095
|
-
</Button>
|
|
1096
|
-
</Popover>
|
|
1097
1052
|
|
|
1098
1053
|
<Button
|
|
1099
1054
|
type="primary"
|
|
@@ -1196,6 +1151,69 @@ const InterfaceManagement = () => {
|
|
|
1196
1151
|
</Popconfirm>
|
|
1197
1152
|
</Space>
|
|
1198
1153
|
)}
|
|
1154
|
+
|
|
1155
|
+
{/* 列设置按钮 */}
|
|
1156
|
+
<Popover
|
|
1157
|
+
title="自定义显示列"
|
|
1158
|
+
trigger="click"
|
|
1159
|
+
open={columnConfigVisible}
|
|
1160
|
+
onOpenChange={handleColumnConfigToggle}
|
|
1161
|
+
content={
|
|
1162
|
+
<div style={{ width: 280 }}>
|
|
1163
|
+
<div style={{ marginBottom: 12 }}>
|
|
1164
|
+
<Space>
|
|
1165
|
+
<Button size="small" onClick={handleSelectAllColumns}>
|
|
1166
|
+
全选
|
|
1167
|
+
</Button>
|
|
1168
|
+
<Button size="small" onClick={handleResetColumns}>
|
|
1169
|
+
重置
|
|
1170
|
+
</Button>
|
|
1171
|
+
</Space>
|
|
1172
|
+
</div>
|
|
1173
|
+
<Checkbox.Group
|
|
1174
|
+
value={tableConfig.visibleColumns || COLUMN_CONFIG.map(col => col.key)}
|
|
1175
|
+
onChange={handleColumnConfigChange}
|
|
1176
|
+
style={{ width: '100%' }}
|
|
1177
|
+
>
|
|
1178
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
|
1179
|
+
{COLUMN_CONFIG.map(col => (
|
|
1180
|
+
<Checkbox
|
|
1181
|
+
key={col.key}
|
|
1182
|
+
value={col.key}
|
|
1183
|
+
disabled={col.required}
|
|
1184
|
+
style={{
|
|
1185
|
+
width: '100%',
|
|
1186
|
+
color: col.required ? '#999' : undefined
|
|
1187
|
+
}}
|
|
1188
|
+
>
|
|
1189
|
+
{col.title}
|
|
1190
|
+
{col.required && (
|
|
1191
|
+
<span style={{ color: '#999', fontSize: '12px', marginLeft: 4 }}>
|
|
1192
|
+
(必须)
|
|
1193
|
+
</span>
|
|
1194
|
+
)}
|
|
1195
|
+
</Checkbox>
|
|
1196
|
+
))}
|
|
1197
|
+
</div>
|
|
1198
|
+
</Checkbox.Group>
|
|
1199
|
+
</div>
|
|
1200
|
+
}
|
|
1201
|
+
>
|
|
1202
|
+
<Tooltip title="自定义显示列">
|
|
1203
|
+
<Button
|
|
1204
|
+
icon={<SettingOutlined />}
|
|
1205
|
+
type="text"
|
|
1206
|
+
size="middle"
|
|
1207
|
+
className="column-settings-btn"
|
|
1208
|
+
style={{
|
|
1209
|
+
marginLeft: (selectedRowKeys.length > 0 || selectedGroup) ? 16 : 0,
|
|
1210
|
+
color: '#666'
|
|
1211
|
+
}}
|
|
1212
|
+
>
|
|
1213
|
+
列设置
|
|
1214
|
+
</Button>
|
|
1215
|
+
</Tooltip>
|
|
1216
|
+
</Popover>
|
|
1199
1217
|
</div>
|
|
1200
1218
|
</div>
|
|
1201
1219
|
</Card>
|
|
@@ -15,10 +15,6 @@
|
|
|
15
15
|
--transition-time: 0.3s;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.interface-management-container {
|
|
19
|
-
padding: 24px;
|
|
20
|
-
background: #f5f7fa;
|
|
21
|
-
}
|
|
22
18
|
|
|
23
19
|
/* 统一控制台 */
|
|
24
20
|
.interface-control-panel {
|
|
@@ -111,6 +107,21 @@
|
|
|
111
107
|
font-size: 13px;
|
|
112
108
|
}
|
|
113
109
|
|
|
110
|
+
/* 列设置按钮 */
|
|
111
|
+
.column-settings-btn {
|
|
112
|
+
transition: all 0.2s ease;
|
|
113
|
+
border-radius: 6px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.column-settings-btn:hover {
|
|
117
|
+
background-color: #f5f5f5;
|
|
118
|
+
color: var(--primary-color) !important;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.column-settings-btn:active {
|
|
122
|
+
background-color: #e6f7ff;
|
|
123
|
+
}
|
|
124
|
+
|
|
114
125
|
/* 旧版样式兼容 */
|
|
115
126
|
.interface-header-card {
|
|
116
127
|
margin-bottom: 16px;
|