whistle.mock-plugins 1.1.3-dev.10 → 1.1.3-dev.12

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whistle.mock-plugins",
3
- "version": "1.1.3-dev.10",
3
+ "version": "1.1.3-dev.12",
4
4
  "description": "Whistle 插件,用于快速创建 API 模拟数据",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -1043,57 +1043,6 @@ const InterfaceManagement = () => {
1043
1043
  loading={interfacesLoading}
1044
1044
  />
1045
1045
  </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
1046
 
1098
1047
  <Button
1099
1048
  type="primary"
@@ -1220,9 +1169,73 @@ const InterfaceManagement = () => {
1220
1169
  />
1221
1170
  )}
1222
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>
1223
1237
 
1224
-
1225
- <Card className="list-container-card" bordered={false} bodyStyle={{ padding: 0 }}>
1238
+ <Card className="list-container-card" bordered={false} bodyStyle={{ padding: 0 }}>
1226
1239
  <div className="interface-list-container">
1227
1240
  <Table
1228
1241
  columns={columns}
@@ -273,9 +273,11 @@
273
273
  }
274
274
 
275
275
  .list-container-card {
276
- border-radius: 12px;
276
+ border-radius: 0 0 8px 8px;
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;
279
281
  }
280
282
 
281
283
  .interface-list-container {
@@ -1117,4 +1119,59 @@
1117
1119
  .no-response {
1118
1120
  color: #999;
1119
1121
  font-style: italic;
1120
- }
1122
+ }
1123
+
1124
+ /* 表格工具栏样式 */
1125
+ .table-toolbar {
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 {
1150
+ display: flex;
1151
+ align-items: center;
1152
+ gap: 6px;
1153
+ padding: 6px 12px;
1154
+ border-radius: 6px;
1155
+ border: 1px solid #d9d9d9;
1156
+ background: #ffffff;
1157
+ color: #666;
1158
+ font-size: 13px;
1159
+ transition: all 0.2s ease;
1160
+ }
1161
+
1162
+ .table-column-settings-btn:hover {
1163
+ border-color: #4096ff;
1164
+ background: #f6ffed;
1165
+ color: #4096ff;
1166
+ transform: translateY(-1px);
1167
+ box-shadow: 0 2px 4px rgba(64, 150, 255, 0.15);
1168
+ }
1169
+
1170
+ .table-column-settings-btn:active {
1171
+ transform: translateY(0);
1172
+ }
1173
+
1174
+ /* 分页器样式 */
1175
+ .interface-table .ant-pagination-options {
1176
+ margin-right: 16px;
1177
+ }