whistle.mock-plugins 1.2.0-beta.6 → 1.2.0-beta.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whistle.mock-plugins",
3
- "version": "1.2.0-beta.6",
3
+ "version": "1.2.0-beta.8",
4
4
  "description": "Whistle 插件,用于快速创建 API 模拟数据",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -1298,21 +1298,14 @@ const InterfaceManagement = () => {
1298
1298
  tooltip="为接口设置分组,便于管理和批量操作"
1299
1299
  >
1300
1300
  <Select
1301
- placeholder="选择或创建分组"
1301
+ placeholder="选择或输入新分组名称"
1302
1302
  showSearch
1303
1303
  allowClear
1304
1304
  style={{ width: '100%' }}
1305
- mode="tags"
1306
- maxTagCount="responsive"
1307
- maxTagTextLength={10}
1308
- onChange={(value) => {
1309
- // 如果值是数组(tags模式),只取第一个元素
1310
- if (Array.isArray(value) && value.length > 0) {
1311
- // 如果第一个元素是空字符串,则设置为undefined
1312
- const groupValue = value[0] === '' ? undefined : value[0];
1313
- form.setFieldsValue({ group: groupValue });
1314
- }
1315
- }}
1305
+ dropdownMatchSelectWidth={false}
1306
+ filterOption={(input, option) =>
1307
+ option?.children?.toLowerCase()?.indexOf(input.toLowerCase()) >= 0
1308
+ }
1316
1309
  onInputKeyDown={(e) => {
1317
1310
  // 防止回车键提交表单
1318
1311
  if (e.key === 'Enter') {
@@ -1353,21 +1353,14 @@ const InterfaceManagement = () => {
1353
1353
  tooltip="为接口设置分组,便于管理和批量操作"
1354
1354
  >
1355
1355
  <Select
1356
- placeholder="选择或创建分组"
1356
+ placeholder="选择或输入新分组名称"
1357
1357
  showSearch
1358
1358
  allowClear
1359
1359
  style={{ width: '100%' }}
1360
- mode="tags"
1361
- maxTagCount="responsive"
1362
- maxTagTextLength={10}
1363
- onChange={(value) => {
1364
- // 如果值是数组(tags模式),只取第一个元素
1365
- if (Array.isArray(value) && value.length > 0) {
1366
- // 如果第一个元素是空字符串,则设置为undefined
1367
- const groupValue = value[0] === '' ? undefined : value[0];
1368
- form.setFieldsValue({ group: groupValue });
1369
- }
1370
- }}
1360
+ dropdownMatchSelectWidth={false}
1361
+ filterOption={(input, option) =>
1362
+ option?.children?.toLowerCase()?.indexOf(input.toLowerCase()) >= 0
1363
+ }
1371
1364
  onInputKeyDown={(e) => {
1372
1365
  // 防止回车键提交表单
1373
1366
  if (e.key === 'Enter') {