whistle.mock-plugins 1.1.3-dev.14 → 1.1.3-dev.15
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
|
@@ -1262,36 +1262,73 @@ const InterfaceManagement = () => {
|
|
|
1262
1262
|
|
|
1263
1263
|
{/* 接口编辑/创建模态框 */}
|
|
1264
1264
|
<Modal
|
|
1265
|
-
title={
|
|
1265
|
+
title={
|
|
1266
|
+
<div style={{
|
|
1267
|
+
fontSize: '18px',
|
|
1268
|
+
fontWeight: 600,
|
|
1269
|
+
color: '#262626',
|
|
1270
|
+
display: 'flex',
|
|
1271
|
+
alignItems: 'center',
|
|
1272
|
+
gap: '8px'
|
|
1273
|
+
}}>
|
|
1274
|
+
<span>{editingInterface ? '编辑接口' : '添加接口'}</span>
|
|
1275
|
+
<Badge
|
|
1276
|
+
count="配置向导"
|
|
1277
|
+
style={{
|
|
1278
|
+
backgroundColor: '#f0f9ff',
|
|
1279
|
+
color: '#1677ff',
|
|
1280
|
+
fontSize: '11px',
|
|
1281
|
+
fontWeight: 'normal'
|
|
1282
|
+
}}
|
|
1283
|
+
/>
|
|
1284
|
+
</div>
|
|
1285
|
+
}
|
|
1266
1286
|
open={modalVisible}
|
|
1267
1287
|
onOk={handleSubmit}
|
|
1268
1288
|
onCancel={handleCancel}
|
|
1269
|
-
width={
|
|
1289
|
+
width={900}
|
|
1270
1290
|
destroyOnClose
|
|
1271
1291
|
okText={editingInterface ? '保存' : '创建'}
|
|
1272
1292
|
cancelText="取消"
|
|
1273
|
-
bodyStyle={{
|
|
1293
|
+
bodyStyle={{
|
|
1294
|
+
maxHeight: '75vh',
|
|
1295
|
+
overflow: 'auto',
|
|
1296
|
+
padding: '0',
|
|
1297
|
+
background: '#fafafa'
|
|
1298
|
+
}}
|
|
1299
|
+
className="interface-modal"
|
|
1274
1300
|
>
|
|
1275
|
-
<
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1301
|
+
<div style={{ padding: '24px' }}>
|
|
1302
|
+
<Form
|
|
1303
|
+
form={form}
|
|
1304
|
+
layout="vertical"
|
|
1305
|
+
initialValues={{
|
|
1306
|
+
name: '',
|
|
1307
|
+
group: '',
|
|
1308
|
+
pattern: '',
|
|
1309
|
+
proxyType: 'response',
|
|
1310
|
+
statusCode: '200',
|
|
1311
|
+
contentType: 'application/json; charset=utf-8',
|
|
1312
|
+
responses: [],
|
|
1313
|
+
httpMethod: 'ALL',
|
|
1314
|
+
targetUrl: '',
|
|
1315
|
+
headerItems: [],
|
|
1316
|
+
paramMatchers: [],
|
|
1317
|
+
responseDelay: '0'
|
|
1318
|
+
}}
|
|
1319
|
+
>
|
|
1320
|
+
{/* 第一步:基础信息 */}
|
|
1321
|
+
<Card
|
|
1322
|
+
title={
|
|
1323
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
|
|
1324
|
+
<Badge count="1" style={{ backgroundColor: '#1677ff' }} />
|
|
1325
|
+
<span>基础信息</span>
|
|
1326
|
+
</div>
|
|
1327
|
+
}
|
|
1328
|
+
style={{ marginBottom: '16px' }}
|
|
1329
|
+
bodyStyle={{ padding: '20px' }}
|
|
1330
|
+
>
|
|
1331
|
+
<div style={{ display: 'flex', flexDirection: 'row', gap: '16px' }}>
|
|
1295
1332
|
<div style={{ flex: 1 }}>
|
|
1296
1333
|
<Form.Item
|
|
1297
1334
|
name="name"
|
|
@@ -1335,10 +1372,22 @@ const InterfaceManagement = () => {
|
|
|
1335
1372
|
))}
|
|
1336
1373
|
</Select>
|
|
1337
1374
|
</Form.Item>
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1375
|
+
</div>
|
|
1376
|
+
</div>
|
|
1377
|
+
</Card>
|
|
1378
|
+
|
|
1379
|
+
{/* 第二步:URL配置 */}
|
|
1380
|
+
<Card
|
|
1381
|
+
title={
|
|
1382
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
|
|
1383
|
+
<Badge count="2" style={{ backgroundColor: '#1677ff' }} />
|
|
1384
|
+
<span>URL配置</span>
|
|
1385
|
+
</div>
|
|
1386
|
+
}
|
|
1387
|
+
style={{ marginBottom: '16px' }}
|
|
1388
|
+
bodyStyle={{ padding: '20px' }}
|
|
1389
|
+
>
|
|
1390
|
+
<div style={{ display: 'flex', flexDirection: 'row', gap: '16px' }}>
|
|
1342
1391
|
<div style={{ flex: 1 }}>
|
|
1343
1392
|
<Form.Item
|
|
1344
1393
|
name="pattern"
|
|
@@ -1478,7 +1527,20 @@ const InterfaceManagement = () => {
|
|
|
1478
1527
|
<div style={{ flex: 1 }}>
|
|
1479
1528
|
{/* 这里可以留空或添加其他字段 */}
|
|
1480
1529
|
</div>
|
|
1481
|
-
|
|
1530
|
+
</div>
|
|
1531
|
+
</Card>
|
|
1532
|
+
|
|
1533
|
+
{/* 第三步:高级配置 */}
|
|
1534
|
+
<Card
|
|
1535
|
+
title={
|
|
1536
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
|
|
1537
|
+
<Badge count="3" style={{ backgroundColor: '#1677ff' }} />
|
|
1538
|
+
<span>高级配置</span>
|
|
1539
|
+
</div>
|
|
1540
|
+
}
|
|
1541
|
+
style={{ marginBottom: '16px' }}
|
|
1542
|
+
bodyStyle={{ padding: '20px' }}
|
|
1543
|
+
>
|
|
1482
1544
|
|
|
1483
1545
|
{/* 根据proxyType显示不同的表单项 */}
|
|
1484
1546
|
<Form.Item noStyle shouldUpdate={(prevValues, currentValues) => prevValues.proxyType !== currentValues.proxyType}>
|
|
@@ -1739,7 +1801,9 @@ const InterfaceManagement = () => {
|
|
|
1739
1801
|
return null;
|
|
1740
1802
|
}}
|
|
1741
1803
|
</Form.Item>
|
|
1742
|
-
|
|
1804
|
+
</Card>
|
|
1805
|
+
</Form>
|
|
1806
|
+
</div>
|
|
1743
1807
|
</Modal>
|
|
1744
1808
|
|
|
1745
1809
|
{/* 使用拆分后的预览模态框组件 */}
|
|
@@ -1144,6 +1144,59 @@
|
|
|
1144
1144
|
background: #e6f4ff;
|
|
1145
1145
|
}
|
|
1146
1146
|
|
|
1147
|
+
/* 接口弹窗样式 */
|
|
1148
|
+
.interface-modal .ant-modal-header {
|
|
1149
|
+
border-bottom: 1px solid #f0f0f0;
|
|
1150
|
+
padding: 16px 24px;
|
|
1151
|
+
margin-bottom: 0;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
.interface-modal .ant-modal-body {
|
|
1155
|
+
padding: 0;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
.interface-modal .ant-card {
|
|
1159
|
+
border: 1px solid #e8e8e8;
|
|
1160
|
+
border-radius: 8px;
|
|
1161
|
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
.interface-modal .ant-card-head {
|
|
1165
|
+
background: #fafafa;
|
|
1166
|
+
border-bottom: 1px solid #f0f0f0;
|
|
1167
|
+
padding: 0 20px;
|
|
1168
|
+
min-height: 48px;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
.interface-modal .ant-card-head-title {
|
|
1172
|
+
font-size: 14px;
|
|
1173
|
+
font-weight: 600;
|
|
1174
|
+
color: #262626;
|
|
1175
|
+
padding: 12px 0;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
.interface-modal .ant-form-item-label > label {
|
|
1179
|
+
font-size: 13px;
|
|
1180
|
+
font-weight: 500;
|
|
1181
|
+
color: #434343;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
.interface-modal .ant-form-item {
|
|
1185
|
+
margin-bottom: 16px;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
.interface-modal .ant-input,
|
|
1189
|
+
.interface-modal .ant-select-selector {
|
|
1190
|
+
border-radius: 6px;
|
|
1191
|
+
border: 1px solid #d9d9d9;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
.interface-modal .ant-input:focus,
|
|
1195
|
+
.interface-modal .ant-select-focused .ant-select-selector {
|
|
1196
|
+
border-color: #4096ff;
|
|
1197
|
+
box-shadow: 0 0 0 2px rgba(64, 150, 255, 0.1);
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1147
1200
|
/* 分页器样式 */
|
|
1148
1201
|
.interface-table .ant-pagination-options {
|
|
1149
1202
|
margin-right: 16px;
|