@blueking/bk-user-selector 0.0.18 → 0.0.20

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/vue2/vue2.css CHANGED
@@ -1340,70 +1340,70 @@ optgroup {
1340
1340
  background-color: #f0f1f5;
1341
1341
  color: #c4c6cc;
1342
1342
  cursor: not-allowed;
1343
- }.dropdown-content[data-v-7bcec2be] {
1343
+ }.dropdown-content[data-v-a24bd074] {
1344
1344
  min-height: 40px;
1345
1345
  max-height: 300px;
1346
1346
  overflow-y: auto;
1347
1347
  padding: 5px 0;
1348
1348
  }
1349
- .dropdown-content .no-data[data-v-7bcec2be] {
1349
+ .dropdown-content .no-data[data-v-a24bd074] {
1350
1350
  padding: 10px;
1351
1351
  text-align: center;
1352
1352
  color: #979ba5;
1353
1353
  }
1354
- .dropdown-content .user-group .group-header[data-v-7bcec2be] {
1354
+ .dropdown-content .user-group .group-header[data-v-a24bd074] {
1355
1355
  padding: 8px 12px;
1356
1356
  color: #979ba5;
1357
1357
  display: flex;
1358
1358
  align-items: center;
1359
1359
  }
1360
- .dropdown-content .user-group .group-header .group-count[data-v-7bcec2be] {
1360
+ .dropdown-content .user-group .group-header .group-count[data-v-a24bd074] {
1361
1361
  margin-left: 4px;
1362
1362
  }
1363
- .dropdown-content .user-option[data-v-7bcec2be] {
1363
+ .dropdown-content .user-option[data-v-a24bd074] {
1364
1364
  padding: 8px 12px;
1365
1365
  cursor: pointer;
1366
1366
  display: flex;
1367
1367
  align-items: center;
1368
1368
  height: 32px;
1369
1369
  }
1370
- .dropdown-content .user-option[data-v-7bcec2be]:hover {
1370
+ .dropdown-content .user-option[data-v-a24bd074]:hover {
1371
1371
  background-color: #f5f7fa;
1372
1372
  }
1373
- .dropdown-content .user-option .tenant-name[data-v-7bcec2be] {
1373
+ .dropdown-content .user-option .tenant-name[data-v-a24bd074] {
1374
1374
  color: #f59500;
1375
1375
  margin-left: 4px;
1376
1376
  padding: 0 4px;
1377
1377
  }.bk-user-selector-popover.bk-popover.bk-pop2-content {
1378
1378
  padding: 0;
1379
- }.user-tag[data-v-87c12feb] {
1379
+ }.user-tag[data-v-7099192b] {
1380
1380
  margin-right: 4px;
1381
1381
  margin-left: 0;
1382
1382
  }
1383
- .user-tag.draggable[data-v-87c12feb] {
1383
+ .user-tag.draggable[data-v-7099192b] {
1384
1384
  cursor: move;
1385
1385
  }
1386
- .user-tag.active[data-v-87c12feb] {
1386
+ .user-tag.active[data-v-7099192b] {
1387
1387
  background-color: #e1ecff;
1388
1388
  border-color: #3a84ff;
1389
1389
  }
1390
- .user-tag .tag-content .user-name[data-v-87c12feb] {
1390
+ .user-tag .tag-content .user-name[data-v-7099192b] {
1391
1391
  white-space: nowrap;
1392
1392
  overflow: hidden;
1393
1393
  text-overflow: ellipsis;
1394
1394
  font-size: 12px;
1395
1395
  }
1396
- .user-tag .tag-content .tenant-name[data-v-87c12feb] {
1396
+ .user-tag .tag-content .tenant-name[data-v-7099192b] {
1397
1397
  color: #f59500;
1398
1398
  margin-left: 3px;
1399
1399
  white-space: nowrap;
1400
1400
  padding: 0 3px;
1401
1401
  border-radius: 2px;
1402
- }.multiple-selector[data-v-1b988eae] {
1402
+ }.multiple-selector[data-v-5e95d86c] {
1403
1403
  position: relative;
1404
1404
  width: 100%;
1405
1405
  }
1406
- .multiple-selector .tags-container[data-v-1b988eae] {
1406
+ .multiple-selector .tags-container[data-v-5e95d86c] {
1407
1407
  min-height: 32px;
1408
1408
  border: 1px solid #dcdee5;
1409
1409
  border-radius: 2px;
@@ -1411,46 +1411,46 @@ optgroup {
1411
1411
  transition: all 0.2s ease;
1412
1412
  background-color: #fff;
1413
1413
  }
1414
- .multiple-selector .tags-container.focused[data-v-1b988eae] {
1414
+ .multiple-selector .tags-container.focused[data-v-5e95d86c] {
1415
1415
  border-color: #3a84ff;
1416
1416
  box-shadow: 0 0 0 2px rgba(58, 132, 255, 0.1);
1417
1417
  }
1418
- .multiple-selector .tags-container.collapsed[data-v-1b988eae] {
1418
+ .multiple-selector .tags-container.collapsed[data-v-5e95d86c] {
1419
1419
  display: flex;
1420
1420
  flex-wrap: wrap;
1421
1421
  align-items: center;
1422
1422
  }
1423
- .multiple-selector .tag-list[data-v-1b988eae] {
1423
+ .multiple-selector .tag-list[data-v-5e95d86c] {
1424
1424
  display: flex;
1425
1425
  flex-wrap: wrap;
1426
1426
  align-items: center;
1427
1427
  }
1428
- .multiple-selector .tag-wrapper[data-v-1b988eae] {
1428
+ .multiple-selector .tag-wrapper[data-v-5e95d86c] {
1429
1429
  display: inline-flex;
1430
1430
  align-items: center;
1431
1431
  max-width: 100%;
1432
1432
  }
1433
- .multiple-selector .search-input[data-v-1b988eae] {
1433
+ .multiple-selector .search-input[data-v-5e95d86c] {
1434
1434
  outline: none;
1435
1435
  border: none;
1436
1436
  height: 28px;
1437
1437
  min-width: 10px;
1438
1438
  background: transparent;
1439
1439
  }
1440
- .multiple-selector .search-input[data-v-1b988eae]::placeholder {
1440
+ .multiple-selector .search-input[data-v-5e95d86c]::placeholder {
1441
1441
  color: #c4c6cc;
1442
1442
  }
1443
- .multiple-selector .search-input.inline[data-v-1b988eae] {
1443
+ .multiple-selector .search-input.inline[data-v-5e95d86c] {
1444
1444
  min-width: 10px;
1445
1445
  }
1446
- .multiple-selector .search-input.last[data-v-1b988eae], .multiple-selector .search-input.collapsed[data-v-1b988eae] {
1446
+ .multiple-selector .search-input.last[data-v-5e95d86c], .multiple-selector .search-input.collapsed[data-v-5e95d86c] {
1447
1447
  flex: 1;
1448
1448
  min-width: 60px;
1449
- }.single-selector[data-v-5040d42f] {
1449
+ }.single-selector[data-v-02021e20] {
1450
1450
  position: relative;
1451
1451
  width: 100%;
1452
1452
  }
1453
- .input-container[data-v-5040d42f] {
1453
+ .input-container[data-v-02021e20] {
1454
1454
  position: relative;
1455
1455
  display: flex;
1456
1456
  align-items: center;
@@ -1460,38 +1460,19 @@ optgroup {
1460
1460
  padding: 0 8px;
1461
1461
  background-color: #fff;
1462
1462
  }
1463
- .input-container[data-v-5040d42f]:focus-within {
1463
+ .input-container[data-v-02021e20]:focus-within {
1464
1464
  border-color: #3a84ff;
1465
1465
  box-shadow: 0 0 0 2px rgba(58, 132, 255, 0.1);
1466
1466
  }
1467
- .search-input[data-v-5040d42f] {
1467
+ .search-input[data-v-02021e20] {
1468
1468
  flex: 1;
1469
1469
  outline: none;
1470
1470
  border: none;
1471
1471
  height: 30px;
1472
1472
  background: transparent;
1473
1473
  }
1474
- .search-input[data-v-5040d42f]::placeholder {
1474
+ .search-input[data-v-02021e20]::placeholder {
1475
1475
  color: #c4c6cc;
1476
- }
1477
- .selected-user[data-v-5040d42f] {
1478
- display: inline-flex;
1479
- align-items: center;
1480
- background-color: #f0f1f5;
1481
- border-radius: 2px;
1482
- padding: 0 8px;
1483
- margin-right: 8px;
1484
- height: 24px;
1485
- max-width: calc(100% - 32px);
1486
- }
1487
- .selected-user .tenant-name[data-v-5040d42f] {
1488
- color: #f59500;
1489
- margin-left: 4px;
1490
- }
1491
- .selected-user .close-icon[data-v-5040d42f] {
1492
- margin-left: 4px;
1493
- cursor: pointer;
1494
- font-style: normal;
1495
1476
  }.bk-user-selector[data-v-c23f5bc9] {
1496
1477
  width: 100%;
1497
1478
  position: relative;
@@ -1,4 +1,4 @@
1
- import { ref, onBeforeMount, defineComponent, createElementBlock, createCommentVNode, openBlock, withModifiers, normalizeClass, computed, createBlock, unref, withCtx, createVNode, createElementVNode, toDisplayString, Fragment, renderList, watch, nextTick, onMounted, withDirectives, isRef, vModelText, createTextVNode, pushScopeId, popScopeId } from "vue";
1
+ import { ref, onBeforeMount, defineComponent, createElementBlock, createCommentVNode, openBlock, withModifiers, normalizeClass, h, computed, createBlock, unref, withCtx, createVNode, createElementVNode, toDisplayString, Fragment, renderList, watch, nextTick, onMounted, withDirectives, isRef, vModelText, createTextVNode } from "vue";
2
2
  import { Popover, Loading, Tag, bkTooltips, clickoutside } from "bkui-vue";
3
3
  const getTenants = async (apiBaseUrl, tenantId) => {
4
4
  if (!apiBaseUrl || !tenantId) {
@@ -3013,17 +3013,40 @@ const _export_sfc = (sfc, props) => {
3013
3013
  return target;
3014
3014
  };
3015
3015
  const MeTag = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-887b7c44"]]);
3016
+ const UserRender = defineComponent({
3017
+ name: "UserRender",
3018
+ props: {
3019
+ render: {
3020
+ type: Function,
3021
+ required: true
3022
+ },
3023
+ user: {
3024
+ type: Object,
3025
+ required: true
3026
+ }
3027
+ },
3028
+ setup(props) {
3029
+ return () => {
3030
+ try {
3031
+ return props.render(h, props.user);
3032
+ } catch (error) {
3033
+ console.error("Error rendering tag:", error);
3034
+ return h("div", props.user.name);
3035
+ }
3036
+ };
3037
+ }
3038
+ });
3016
3039
  const _hoisted_1$4 = {
3017
3040
  key: 0,
3018
3041
  class: "no-data"
3019
3042
  };
3020
3043
  const _hoisted_2$3 = { class: "group-name" };
3021
- const _hoisted_3$3 = { class: "group-count" };
3044
+ const _hoisted_3$2 = { class: "group-count" };
3022
3045
  const _hoisted_4$1 = ["onMousedown"];
3023
3046
  const _hoisted_5 = { key: 0 };
3024
3047
  const _hoisted_6 = { key: 1 };
3025
3048
  const _hoisted_7 = {
3026
- key: 2,
3049
+ key: 0,
3027
3050
  class: "tenant-name"
3028
3051
  };
3029
3052
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
@@ -3101,6 +3124,12 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3101
3124
  emptyText: {
3102
3125
  type: String,
3103
3126
  default: "无匹配人员"
3127
+ },
3128
+ /**
3129
+ * 渲染列表项
3130
+ */
3131
+ renderListItem: {
3132
+ type: Function
3104
3133
  }
3105
3134
  },
3106
3135
  emits: ["select-user"],
@@ -3110,7 +3139,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3110
3139
  const groupedUsers = computed(() => {
3111
3140
  const groups = {};
3112
3141
  if (Array.isArray(props.userGroup) && props.userGroup.length > 0) {
3113
- groups[props.userGroupName] = props.userGroup.filter((group) => !group.hidden).map((group) => ({
3142
+ groups[props.userGroupName] = props.userGroup.map((group) => ({
3114
3143
  ...group,
3115
3144
  tenantId: "",
3116
3145
  type: "userGroup"
@@ -3180,7 +3209,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3180
3209
  ),
3181
3210
  createElementVNode(
3182
3211
  "span",
3183
- _hoisted_3$3,
3212
+ _hoisted_3$2,
3184
3213
  "(" + toDisplayString(group.length) + ")",
3185
3214
  1
3186
3215
  /* TEXT */
@@ -3198,20 +3227,19 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3198
3227
  key: user.id,
3199
3228
  onMousedown: withModifiers(($event) => selectUser(user), ["prevent"])
3200
3229
  }, [
3201
- createElementVNode("div", null, [
3202
- user.login_name ? (openBlock(), createElementBlock(
3203
- "span",
3204
- _hoisted_5,
3205
- toDisplayString(user.login_name) + "(" + toDisplayString(user.name) + ")",
3206
- 1
3207
- /* TEXT */
3208
- )) : (openBlock(), createElementBlock(
3230
+ __props.renderListItem ? (openBlock(), createElementBlock("div", _hoisted_5, [
3231
+ createVNode(unref(UserRender), {
3232
+ render: __props.renderListItem,
3233
+ user
3234
+ }, null, 8, ["render", "user"])
3235
+ ])) : (openBlock(), createElementBlock("div", _hoisted_6, [
3236
+ createElementVNode(
3209
3237
  "span",
3210
- _hoisted_6,
3238
+ null,
3211
3239
  toDisplayString(user.name),
3212
3240
  1
3213
3241
  /* TEXT */
3214
- )),
3242
+ ),
3215
3243
  user.tenantId !== __props.tenantId && user.tenantId && __props.tenants[user.tenantId] ? (openBlock(), createElementBlock(
3216
3244
  "span",
3217
3245
  _hoisted_7,
@@ -3219,7 +3247,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3219
3247
  1
3220
3248
  /* TEXT */
3221
3249
  )) : createCommentVNode("v-if", true)
3222
- ])
3250
+ ]))
3223
3251
  ], 40, _hoisted_4$1);
3224
3252
  }),
3225
3253
  128
@@ -3241,10 +3269,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3241
3269
  };
3242
3270
  }
3243
3271
  });
3244
- const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-7bcec2be"]]);
3245
- const _hoisted_1$3 = { class: "tag-content" };
3246
- const _hoisted_2$2 = { class: "user-name" };
3247
- const _hoisted_3$2 = {
3272
+ const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-a24bd074"]]);
3273
+ const _hoisted_1$3 = { key: 0 };
3274
+ const _hoisted_2$2 = {
3275
+ key: 1,
3276
+ class: "tag-content"
3277
+ };
3278
+ const _hoisted_3$1 = { class: "user-name" };
3279
+ const _hoisted_4 = {
3248
3280
  key: 0,
3249
3281
  class: "tenant-name"
3250
3282
  };
@@ -3259,7 +3291,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3259
3291
  currentTenantId: {},
3260
3292
  draggable: { type: Boolean },
3261
3293
  active: { type: Boolean },
3262
- showTenant: { type: Boolean }
3294
+ showTenant: { type: Boolean },
3295
+ renderTag: { type: Function }
3263
3296
  },
3264
3297
  emits: ["click", "close"],
3265
3298
  setup(__props, { emit: __emit }) {
@@ -3278,22 +3311,27 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3278
3311
  onClose: handleClose
3279
3312
  }, {
3280
3313
  default: withCtx(() => [
3281
- createElementVNode("div", _hoisted_1$3, [
3314
+ _ctx.renderTag ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
3315
+ createVNode(unref(UserRender), {
3316
+ render: _ctx.renderTag,
3317
+ user: _ctx.user
3318
+ }, null, 8, ["render", "user"])
3319
+ ])) : (openBlock(), createElementBlock("div", _hoisted_2$2, [
3282
3320
  createElementVNode(
3283
3321
  "span",
3284
- _hoisted_2$2,
3322
+ _hoisted_3$1,
3285
3323
  toDisplayString(_ctx.user.name),
3286
3324
  1
3287
3325
  /* TEXT */
3288
3326
  ),
3289
3327
  _ctx.user.tenantId !== _ctx.currentTenantId && _ctx.user.tenantId ? (openBlock(), createElementBlock(
3290
3328
  "span",
3291
- _hoisted_3$2,
3329
+ _hoisted_4,
3292
3330
  " @" + toDisplayString(_ctx.tenants[_ctx.user.tenantId]),
3293
3331
  1
3294
3332
  /* TEXT */
3295
3333
  )) : createCommentVNode("v-if", true)
3296
- ])
3334
+ ]))
3297
3335
  ]),
3298
3336
  _: 1
3299
3337
  /* STABLE */
@@ -3301,10 +3339,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3301
3339
  };
3302
3340
  }
3303
3341
  });
3304
- const UserTag = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-87c12feb"]]);
3342
+ const UserTag = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-7099192b"]]);
3305
3343
  const _hoisted_1$2 = ["onClick"];
3306
3344
  const _hoisted_2$1 = ["placeholder"];
3307
- const _hoisted_3$1 = ["placeholder"];
3345
+ const _hoisted_3 = ["placeholder"];
3308
3346
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3309
3347
  ...{
3310
3348
  name: "BkUserSelectorMultiple"
@@ -3353,6 +3391,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3353
3391
  const options = computed(() => {
3354
3392
  return searchResults.value.filter((user) => !props.selectedUsers.some((selectedUser) => selectedUser.id === user.id));
3355
3393
  });
3394
+ const userGroupFilter = computed(() => {
3395
+ return props.userGroup.filter((group) => !props.selectedUsers.some((user) => user.id === group.id) && !group.hidden);
3396
+ });
3356
3397
  const initSortable = () => {
3357
3398
  if (!props.draggable || !sortableContainerRef.value) return;
3358
3399
  if (sortableInstance.value) {
@@ -3611,11 +3652,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3611
3652
  active: index === activeTagIndex.value,
3612
3653
  "current-tenant-id": _ctx.tenantId,
3613
3654
  draggable: _ctx.draggable,
3655
+ "render-tag": _ctx.renderTag,
3614
3656
  tenants: _ctx.tenants,
3615
3657
  user,
3616
3658
  onClick: ($event) => handleTagClick(index),
3617
3659
  onClose: ($event) => removeUser(user)
3618
- }, null, 8, ["active", "current-tenant-id", "draggable", "tenants", "user", "onClick", "onClose"]),
3660
+ }, null, 8, ["active", "current-tenant-id", "draggable", "render-tag", "tenants", "user", "onClick", "onClose"]),
3619
3661
  createCommentVNode(" 在当前激活标签后插入输入框 "),
3620
3662
  index === activeTagIndex.value && activeTagIndex.value !== _ctx.selectedUsers.length - 1 ? withDirectives((openBlock(), createElementBlock(
3621
3663
  "input",
@@ -3691,12 +3733,13 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3691
3733
  return openBlock(), createBlock(UserTag, {
3692
3734
  "current-tenant-id": _ctx.tenantId,
3693
3735
  key: user.id,
3736
+ "render-tag": _ctx.renderTag,
3694
3737
  "show-tenant": true,
3695
3738
  tenants: _ctx.tenants,
3696
3739
  user,
3697
3740
  onClick: handleFocus,
3698
3741
  onClose: ($event) => removeUser(user)
3699
- }, null, 8, ["current-tenant-id", "tenants", "user", "onClose"]);
3742
+ }, null, 8, ["current-tenant-id", "render-tag", "tenants", "user", "onClose"]);
3700
3743
  }),
3701
3744
  128
3702
3745
  /* KEYED_FRAGMENT */
@@ -3729,7 +3772,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3729
3772
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(searchQuery) ? searchQuery.value = $event : null),
3730
3773
  placeholder: !_ctx.selectedUsers.length ? _ctx.placeholder : "",
3731
3774
  onFocus: handleFocus
3732
- }, null, 40, _hoisted_3$1), [
3775
+ }, null, 40, _hoisted_3), [
3733
3776
  [vModelText, unref(searchQuery)]
3734
3777
  ]),
3735
3778
  createCommentVNode(' 未聚焦状态下的"我"标签 '),
@@ -3753,14 +3796,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3753
3796
  "is-show": showDropdown.value,
3754
3797
  loading: unref(searchLoading),
3755
3798
  options: options.value,
3799
+ "render-list-item": _ctx.renderListItem,
3756
3800
  "search-query": unref(searchQuery),
3757
3801
  "tenant-id": _ctx.tenantId,
3758
3802
  tenants: _ctx.tenants,
3759
- "user-group": _ctx.userGroup,
3803
+ "user-group": userGroupFilter.value,
3760
3804
  "user-group-name": _ctx.userGroupName,
3761
3805
  onClickoutside: handleClickOutside,
3762
3806
  onSelectUser: addUser
3763
- }, null, 8, ["container-width", "empty-text", "is-show", "loading", "options", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
3807
+ }, null, 8, ["container-width", "empty-text", "is-show", "loading", "options", "render-list-item", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
3764
3808
  ],
3765
3809
  512
3766
3810
  /* NEED_PATCH */
@@ -3768,21 +3812,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3768
3812
  };
3769
3813
  }
3770
3814
  });
3771
- const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-1b988eae"]]);
3772
- const _withScopeId = (n) => (pushScopeId("data-v-5040d42f"), n = n(), popScopeId(), n);
3815
+ const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-5e95d86c"]]);
3773
3816
  const _hoisted_1$1 = { class: "input-container" };
3774
- const _hoisted_2 = {
3775
- key: 0,
3776
- class: "tenant-name"
3777
- };
3778
- const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
3779
- "i",
3780
- { class: "close-icon" },
3781
- "×",
3782
- -1
3783
- /* HOISTED */
3784
- ));
3785
- const _hoisted_4 = ["placeholder"];
3817
+ const _hoisted_2 = ["placeholder"];
3786
3818
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3787
3819
  ...{
3788
3820
  name: "BkUserSelectorSingle"
@@ -3813,6 +3845,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3813
3845
  const selectedUser = ref(props.modelValue || "");
3814
3846
  const searchQuery = ref("");
3815
3847
  const showDropdown = ref(false);
3848
+ const userGroupFilter = computed(() => {
3849
+ return props.userGroup.filter((group) => group.id !== selectedUser.value && !group.hidden);
3850
+ });
3816
3851
  const selectedUserInfo = computed(() => {
3817
3852
  const userGroup = (props.userGroup || []).map((group) => ({
3818
3853
  ...group,
@@ -3911,24 +3946,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3911
3946
  createCommentVNode(" 用户标签显示 "),
3912
3947
  selectedUserInfo.value ? (openBlock(), createElementBlock("div", {
3913
3948
  key: 0,
3914
- class: "selected-user",
3915
3949
  onClick: withModifiers(removeSelectedUser, ["stop"])
3916
3950
  }, [
3917
- createElementVNode(
3918
- "span",
3919
- null,
3920
- toDisplayString(selectedUserInfo.value.name),
3921
- 1
3922
- /* TEXT */
3923
- ),
3924
- selectedUserInfo.value.tenantId !== _ctx.tenantId && selectedUserInfo.value.tenantId && _ctx.tenants[selectedUserInfo.value.tenantId] ? (openBlock(), createElementBlock(
3925
- "span",
3926
- _hoisted_2,
3927
- "@" + toDisplayString(_ctx.tenants[selectedUserInfo.value.tenantId]),
3928
- 1
3929
- /* TEXT */
3930
- )) : createCommentVNode("v-if", true),
3931
- _hoisted_3
3951
+ createVNode(UserTag, {
3952
+ "render-tag": _ctx.renderTag,
3953
+ tenants: _ctx.tenants,
3954
+ user: selectedUserInfo.value,
3955
+ onClose: removeSelectedUser
3956
+ }, null, 8, ["render-tag", "tenants", "user"])
3932
3957
  ])) : createCommentVNode("v-if", true),
3933
3958
  withDirectives(createElementVNode("input", {
3934
3959
  ref_key: "inputRef",
@@ -3938,7 +3963,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3938
3963
  placeholder: selectedUserInfo.value ? "" : _ctx.placeholder,
3939
3964
  onFocus: handleInputFocus,
3940
3965
  onInput: handleInput
3941
- }, null, 40, _hoisted_4), [
3966
+ }, null, 40, _hoisted_2), [
3942
3967
  [vModelText, searchQuery.value]
3943
3968
  ]),
3944
3969
  createCommentVNode(' "我"标签 '),
@@ -3955,20 +3980,21 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3955
3980
  "is-show": showDropdown.value,
3956
3981
  loading: isLoading.value,
3957
3982
  options: options.value,
3983
+ "render-list-item": _ctx.renderListItem,
3958
3984
  "search-query": searchQuery.value,
3959
3985
  "tenant-id": _ctx.tenantId,
3960
3986
  tenants: _ctx.tenants,
3961
- "user-group": _ctx.userGroup,
3987
+ "user-group": userGroupFilter.value,
3962
3988
  "user-group-name": _ctx.userGroupName,
3963
3989
  onSelectUser: addUser
3964
- }, null, 8, ["container-width", "empty-text", "is-show", "loading", "options", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
3990
+ }, null, 8, ["container-width", "empty-text", "is-show", "loading", "options", "render-list-item", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
3965
3991
  ])), [
3966
3992
  [unref(clickoutside), handleClickOutside]
3967
3993
  ]);
3968
3994
  };
3969
3995
  }
3970
3996
  });
3971
- const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-5040d42f"]]);
3997
+ const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-02021e20"]]);
3972
3998
  const _hoisted_1 = {
3973
3999
  ref: "containerRef",
3974
4000
  class: "bk-user-selector"