whistle.mock-plugins 1.1.3-dev.12 → 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">
|
|
@@ -1060,14 +1081,9 @@ const InterfaceManagement = () => {
|
|
|
1060
1081
|
<div className="control-panel-stats">
|
|
1061
1082
|
<div className="stats-left">
|
|
1062
1083
|
<Space size="large">
|
|
1063
|
-
<span className="stat-item">
|
|
1064
|
-
<span className="stat-label">功能模块:</span>
|
|
1065
|
-
<span className="stat-value">{selectedFeature?.name}</span>
|
|
1066
|
-
</span>
|
|
1067
|
-
|
|
1068
1084
|
{selectedGroup && (
|
|
1069
1085
|
<span className="stat-item">
|
|
1070
|
-
<span className="stat-label"
|
|
1086
|
+
<span className="stat-label">当前分组:</span>
|
|
1071
1087
|
<Tag color="blue">{selectedGroup}</Tag>
|
|
1072
1088
|
</span>
|
|
1073
1089
|
)}
|
|
@@ -1145,96 +1161,70 @@ const InterfaceManagement = () => {
|
|
|
1145
1161
|
</Popconfirm>
|
|
1146
1162
|
</Space>
|
|
1147
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>
|
|
1148
1224
|
</div>
|
|
1149
1225
|
</div>
|
|
1150
1226
|
</Card>
|
|
1151
1227
|
|
|
1152
|
-
{!features.length && (
|
|
1153
|
-
<Alert
|
|
1154
|
-
message="未找到功能模块"
|
|
1155
|
-
description="请先在模拟数据页面创建功能模块,然后再添加接口"
|
|
1156
|
-
type="warning"
|
|
1157
|
-
showIcon
|
|
1158
|
-
style={{ marginBottom: 16 }}
|
|
1159
|
-
/>
|
|
1160
|
-
)}
|
|
1161
|
-
|
|
1162
|
-
{selectedFeature?.active === false && (
|
|
1163
|
-
<Alert
|
|
1164
|
-
message="功能模块已禁用"
|
|
1165
|
-
description="当前功能模块已被禁用,所有关联接口不会生效。您可以在模拟数据页面启用此功能模块。"
|
|
1166
|
-
type="warning"
|
|
1167
|
-
showIcon
|
|
1168
|
-
style={{ marginBottom: 16 }}
|
|
1169
|
-
/>
|
|
1170
|
-
)}
|
|
1171
|
-
|
|
1172
|
-
{/* 表格工具栏 */}
|
|
1173
|
-
<div className="table-toolbar">
|
|
1174
|
-
<div className="table-toolbar-left">
|
|
1175
|
-
{/* 可以在这里添加其他表格相关的工具 */}
|
|
1176
|
-
</div>
|
|
1177
|
-
<div className="table-toolbar-right">
|
|
1178
|
-
<Popover
|
|
1179
|
-
title="自定义显示列"
|
|
1180
|
-
trigger="click"
|
|
1181
|
-
open={columnConfigVisible}
|
|
1182
|
-
onOpenChange={handleColumnConfigToggle}
|
|
1183
|
-
content={
|
|
1184
|
-
<div style={{ width: 280 }}>
|
|
1185
|
-
<div style={{ marginBottom: 12 }}>
|
|
1186
|
-
<Space>
|
|
1187
|
-
<Button size="small" onClick={handleSelectAllColumns}>
|
|
1188
|
-
全选
|
|
1189
|
-
</Button>
|
|
1190
|
-
<Button size="small" onClick={handleResetColumns}>
|
|
1191
|
-
重置
|
|
1192
|
-
</Button>
|
|
1193
|
-
</Space>
|
|
1194
|
-
</div>
|
|
1195
|
-
<Checkbox.Group
|
|
1196
|
-
value={tableConfig.visibleColumns || COLUMN_CONFIG.map(col => col.key)}
|
|
1197
|
-
onChange={handleColumnConfigChange}
|
|
1198
|
-
style={{ width: '100%' }}
|
|
1199
|
-
>
|
|
1200
|
-
<div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
|
1201
|
-
{COLUMN_CONFIG.map(col => (
|
|
1202
|
-
<Checkbox
|
|
1203
|
-
key={col.key}
|
|
1204
|
-
value={col.key}
|
|
1205
|
-
disabled={col.required}
|
|
1206
|
-
style={{
|
|
1207
|
-
width: '100%',
|
|
1208
|
-
color: col.required ? '#999' : undefined
|
|
1209
|
-
}}
|
|
1210
|
-
>
|
|
1211
|
-
{col.title}
|
|
1212
|
-
{col.required && (
|
|
1213
|
-
<span style={{ color: '#999', fontSize: '12px', marginLeft: 4 }}>
|
|
1214
|
-
(必须)
|
|
1215
|
-
</span>
|
|
1216
|
-
)}
|
|
1217
|
-
</Checkbox>
|
|
1218
|
-
))}
|
|
1219
|
-
</div>
|
|
1220
|
-
</Checkbox.Group>
|
|
1221
|
-
</div>
|
|
1222
|
-
}
|
|
1223
|
-
>
|
|
1224
|
-
<Tooltip title="自定义表格显示列">
|
|
1225
|
-
<Button
|
|
1226
|
-
icon={<SettingOutlined />}
|
|
1227
|
-
type="text"
|
|
1228
|
-
size="small"
|
|
1229
|
-
className="table-column-settings-btn"
|
|
1230
|
-
>
|
|
1231
|
-
列设置
|
|
1232
|
-
</Button>
|
|
1233
|
-
</Tooltip>
|
|
1234
|
-
</Popover>
|
|
1235
|
-
</div>
|
|
1236
|
-
</div>
|
|
1237
|
-
|
|
1238
1228
|
<Card className="list-container-card" bordered={false} bodyStyle={{ padding: 0 }}>
|
|
1239
1229
|
<div className="interface-list-container">
|
|
1240
1230
|
<Table
|
|
@@ -273,11 +273,9 @@
|
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
.list-container-card {
|
|
276
|
-
border-radius:
|
|
276
|
+
border-radius: 12px;
|
|
277
277
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
278
278
|
margin-bottom: 40px;
|
|
279
|
-
border: 1px solid #f0f2f5;
|
|
280
|
-
border-top: none;
|
|
281
279
|
}
|
|
282
280
|
|
|
283
281
|
.interface-list-container {
|
|
@@ -1121,54 +1119,29 @@
|
|
|
1121
1119
|
font-style: italic;
|
|
1122
1120
|
}
|
|
1123
1121
|
|
|
1124
|
-
/*
|
|
1125
|
-
.
|
|
1126
|
-
display: flex;
|
|
1127
|
-
justify-content: space-between;
|
|
1128
|
-
align-items: center;
|
|
1129
|
-
padding: 12px 16px;
|
|
1130
|
-
background: #fafbfc;
|
|
1131
|
-
border: 1px solid #f0f2f5;
|
|
1132
|
-
border-bottom: none;
|
|
1133
|
-
border-radius: 8px 8px 0 0;
|
|
1134
|
-
margin-bottom: 0;
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
|
-
.table-toolbar-left {
|
|
1138
|
-
display: flex;
|
|
1139
|
-
align-items: center;
|
|
1140
|
-
gap: 12px;
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
.table-toolbar-right {
|
|
1144
|
-
display: flex;
|
|
1145
|
-
align-items: center;
|
|
1146
|
-
gap: 8px;
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
.table-column-settings-btn {
|
|
1122
|
+
/* 内联列设置按钮样式 */
|
|
1123
|
+
.inline-column-settings-btn {
|
|
1150
1124
|
display: flex;
|
|
1151
1125
|
align-items: center;
|
|
1152
1126
|
gap: 6px;
|
|
1153
|
-
padding:
|
|
1154
|
-
border-radius:
|
|
1127
|
+
padding: 4px 8px;
|
|
1128
|
+
border-radius: 4px;
|
|
1155
1129
|
border: 1px solid #d9d9d9;
|
|
1156
1130
|
background: #ffffff;
|
|
1157
1131
|
color: #666;
|
|
1158
|
-
font-size:
|
|
1132
|
+
font-size: 12px;
|
|
1159
1133
|
transition: all 0.2s ease;
|
|
1160
1134
|
}
|
|
1161
1135
|
|
|
1162
|
-
.
|
|
1136
|
+
.inline-column-settings-btn:hover {
|
|
1163
1137
|
border-color: #4096ff;
|
|
1164
|
-
background: #
|
|
1138
|
+
background: #f0f9ff;
|
|
1165
1139
|
color: #4096ff;
|
|
1166
|
-
transform: translateY(-1px);
|
|
1167
|
-
box-shadow: 0 2px 4px rgba(64, 150, 255, 0.15);
|
|
1168
1140
|
}
|
|
1169
1141
|
|
|
1170
|
-
.
|
|
1171
|
-
|
|
1142
|
+
.inline-column-settings-btn:active {
|
|
1143
|
+
border-color: #1677ff;
|
|
1144
|
+
background: #e6f4ff;
|
|
1172
1145
|
}
|
|
1173
1146
|
|
|
1174
1147
|
/* 分页器样式 */
|