whistle.mock-plugins 1.1.3-dev.11 → 1.1.3-dev.13
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
|
@@ -976,6 +976,27 @@ const InterfaceManagement = () => {
|
|
|
976
976
|
重构后版本 V2
|
|
977
977
|
</div>
|
|
978
978
|
|
|
979
|
+
{/* 警告信息置顶显示 */}
|
|
980
|
+
{!features.length && (
|
|
981
|
+
<Alert
|
|
982
|
+
message="未找到功能模块"
|
|
983
|
+
description="请先在模拟数据页面创建功能模块,然后再添加接口"
|
|
984
|
+
type="warning"
|
|
985
|
+
showIcon
|
|
986
|
+
style={{ marginBottom: 16 }}
|
|
987
|
+
/>
|
|
988
|
+
)}
|
|
989
|
+
|
|
990
|
+
{selectedFeature?.active === false && (
|
|
991
|
+
<Alert
|
|
992
|
+
message="功能模块已禁用"
|
|
993
|
+
description="当前功能模块已被禁用,所有关联接口不会生效。您可以在模拟数据页面启用此功能模块。"
|
|
994
|
+
type="warning"
|
|
995
|
+
showIcon
|
|
996
|
+
style={{ marginBottom: 16 }}
|
|
997
|
+
/>
|
|
998
|
+
)}
|
|
999
|
+
|
|
979
1000
|
<Card className="interface-control-panel">
|
|
980
1001
|
<div className="control-panel-header">
|
|
981
1002
|
<div className="control-left">
|
|
@@ -1043,57 +1064,6 @@ const InterfaceManagement = () => {
|
|
|
1043
1064
|
loading={interfacesLoading}
|
|
1044
1065
|
/>
|
|
1045
1066
|
</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
1067
|
|
|
1098
1068
|
<Button
|
|
1099
1069
|
type="primary"
|
|
@@ -1111,14 +1081,9 @@ const InterfaceManagement = () => {
|
|
|
1111
1081
|
<div className="control-panel-stats">
|
|
1112
1082
|
<div className="stats-left">
|
|
1113
1083
|
<Space size="large">
|
|
1114
|
-
<span className="stat-item">
|
|
1115
|
-
<span className="stat-label">功能模块:</span>
|
|
1116
|
-
<span className="stat-value">{selectedFeature?.name}</span>
|
|
1117
|
-
</span>
|
|
1118
|
-
|
|
1119
1084
|
{selectedGroup && (
|
|
1120
1085
|
<span className="stat-item">
|
|
1121
|
-
<span className="stat-label"
|
|
1086
|
+
<span className="stat-label">当前分组:</span>
|
|
1122
1087
|
<Tag color="blue">{selectedGroup}</Tag>
|
|
1123
1088
|
</span>
|
|
1124
1089
|
)}
|
|
@@ -1196,33 +1161,71 @@ const InterfaceManagement = () => {
|
|
|
1196
1161
|
</Popconfirm>
|
|
1197
1162
|
</Space>
|
|
1198
1163
|
)}
|
|
1164
|
+
|
|
1165
|
+
{/* 列设置按钮 */}
|
|
1166
|
+
<Popover
|
|
1167
|
+
title="自定义显示列"
|
|
1168
|
+
trigger="click"
|
|
1169
|
+
open={columnConfigVisible}
|
|
1170
|
+
onOpenChange={handleColumnConfigToggle}
|
|
1171
|
+
content={
|
|
1172
|
+
<div style={{ width: 280 }}>
|
|
1173
|
+
<div style={{ marginBottom: 12 }}>
|
|
1174
|
+
<Space>
|
|
1175
|
+
<Button size="small" onClick={handleSelectAllColumns}>
|
|
1176
|
+
全选
|
|
1177
|
+
</Button>
|
|
1178
|
+
<Button size="small" onClick={handleResetColumns}>
|
|
1179
|
+
重置
|
|
1180
|
+
</Button>
|
|
1181
|
+
</Space>
|
|
1182
|
+
</div>
|
|
1183
|
+
<Checkbox.Group
|
|
1184
|
+
value={tableConfig.visibleColumns || COLUMN_CONFIG.map(col => col.key)}
|
|
1185
|
+
onChange={handleColumnConfigChange}
|
|
1186
|
+
style={{ width: '100%' }}
|
|
1187
|
+
>
|
|
1188
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
|
1189
|
+
{COLUMN_CONFIG.map(col => (
|
|
1190
|
+
<Checkbox
|
|
1191
|
+
key={col.key}
|
|
1192
|
+
value={col.key}
|
|
1193
|
+
disabled={col.required}
|
|
1194
|
+
style={{
|
|
1195
|
+
width: '100%',
|
|
1196
|
+
color: col.required ? '#999' : undefined
|
|
1197
|
+
}}
|
|
1198
|
+
>
|
|
1199
|
+
{col.title}
|
|
1200
|
+
{col.required && (
|
|
1201
|
+
<span style={{ color: '#999', fontSize: '12px', marginLeft: 4 }}>
|
|
1202
|
+
(必须)
|
|
1203
|
+
</span>
|
|
1204
|
+
)}
|
|
1205
|
+
</Checkbox>
|
|
1206
|
+
))}
|
|
1207
|
+
</div>
|
|
1208
|
+
</Checkbox.Group>
|
|
1209
|
+
</div>
|
|
1210
|
+
}
|
|
1211
|
+
>
|
|
1212
|
+
<Tooltip title="自定义表格显示列">
|
|
1213
|
+
<Button
|
|
1214
|
+
icon={<SettingOutlined />}
|
|
1215
|
+
type="text"
|
|
1216
|
+
size="small"
|
|
1217
|
+
className="inline-column-settings-btn"
|
|
1218
|
+
style={{ marginLeft: (selectedRowKeys.length > 0 || selectedGroup) ? 16 : 0 }}
|
|
1219
|
+
>
|
|
1220
|
+
列设置
|
|
1221
|
+
</Button>
|
|
1222
|
+
</Tooltip>
|
|
1223
|
+
</Popover>
|
|
1199
1224
|
</div>
|
|
1200
1225
|
</div>
|
|
1201
1226
|
</Card>
|
|
1202
1227
|
|
|
1203
|
-
{
|
|
1204
|
-
<Alert
|
|
1205
|
-
message="未找到功能模块"
|
|
1206
|
-
description="请先在模拟数据页面创建功能模块,然后再添加接口"
|
|
1207
|
-
type="warning"
|
|
1208
|
-
showIcon
|
|
1209
|
-
style={{ marginBottom: 16 }}
|
|
1210
|
-
/>
|
|
1211
|
-
)}
|
|
1212
|
-
|
|
1213
|
-
{selectedFeature?.active === false && (
|
|
1214
|
-
<Alert
|
|
1215
|
-
message="功能模块已禁用"
|
|
1216
|
-
description="当前功能模块已被禁用,所有关联接口不会生效。您可以在模拟数据页面启用此功能模块。"
|
|
1217
|
-
type="warning"
|
|
1218
|
-
showIcon
|
|
1219
|
-
style={{ marginBottom: 16 }}
|
|
1220
|
-
/>
|
|
1221
|
-
)}
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
<Card className="list-container-card" bordered={false} bodyStyle={{ padding: 0 }}>
|
|
1228
|
+
<Card className="list-container-card" bordered={false} bodyStyle={{ padding: 0 }}>
|
|
1226
1229
|
<div className="interface-list-container">
|
|
1227
1230
|
<Table
|
|
1228
1231
|
columns={columns}
|
|
@@ -1119,11 +1119,32 @@
|
|
|
1119
1119
|
font-style: italic;
|
|
1120
1120
|
}
|
|
1121
1121
|
|
|
1122
|
+
/* 内联列设置按钮样式 */
|
|
1123
|
+
.inline-column-settings-btn {
|
|
1124
|
+
display: flex;
|
|
1125
|
+
align-items: center;
|
|
1126
|
+
gap: 6px;
|
|
1127
|
+
padding: 4px 8px;
|
|
1128
|
+
border-radius: 4px;
|
|
1129
|
+
border: 1px solid #d9d9d9;
|
|
1130
|
+
background: #ffffff;
|
|
1131
|
+
color: #666;
|
|
1132
|
+
font-size: 12px;
|
|
1133
|
+
transition: all 0.2s ease;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
.inline-column-settings-btn:hover {
|
|
1137
|
+
border-color: #4096ff;
|
|
1138
|
+
background: #f0f9ff;
|
|
1139
|
+
color: #4096ff;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
.inline-column-settings-btn:active {
|
|
1143
|
+
border-color: #1677ff;
|
|
1144
|
+
background: #e6f4ff;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1122
1147
|
/* 分页器样式 */
|
|
1123
1148
|
.interface-table .ant-pagination-options {
|
|
1124
1149
|
margin-right: 16px;
|
|
1125
1150
|
}
|
|
1126
|
-
|
|
1127
|
-
.interface-table .ant-pagination-options-size-changer {
|
|
1128
|
-
margin-right: 16px;
|
|
1129
|
-
}
|