@blueking/bk-user-selector 0.0.8 → 0.0.10

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,37 +1340,37 @@ optgroup {
1340
1340
  background-color: #f0f1f5;
1341
1341
  color: #c4c6cc;
1342
1342
  cursor: not-allowed;
1343
- }.dropdown-content[data-v-c68dfcac] {
1343
+ }.dropdown-content[data-v-01b75e6e] {
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-c68dfcac] {
1349
+ .dropdown-content .no-data[data-v-01b75e6e] {
1350
1350
  padding: 10px;
1351
1351
  text-align: center;
1352
1352
  color: #979ba5;
1353
1353
  }
1354
- .dropdown-content .user-group .group-header[data-v-c68dfcac] {
1354
+ .dropdown-content .user-group .group-header[data-v-01b75e6e] {
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-c68dfcac] {
1360
+ .dropdown-content .user-group .group-header .group-count[data-v-01b75e6e] {
1361
1361
  margin-left: 4px;
1362
1362
  }
1363
- .dropdown-content .user-option[data-v-c68dfcac] {
1363
+ .dropdown-content .user-option[data-v-01b75e6e] {
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-c68dfcac]:hover {
1370
+ .dropdown-content .user-option[data-v-01b75e6e]:hover {
1371
1371
  background-color: #f5f7fa;
1372
1372
  }
1373
- .dropdown-content .user-option .tenant-name[data-v-c68dfcac] {
1373
+ .dropdown-content .user-option .tenant-name[data-v-01b75e6e] {
1374
1374
  color: #f59500;
1375
1375
  margin-left: 4px;
1376
1376
  padding: 0 4px;
@@ -1398,11 +1398,11 @@ optgroup {
1398
1398
  white-space: nowrap;
1399
1399
  padding: 0 3px;
1400
1400
  border-radius: 2px;
1401
- }.multiple-selector[data-v-a09f11c3] {
1401
+ }.multiple-selector[data-v-1a376d26] {
1402
1402
  position: relative;
1403
1403
  width: 100%;
1404
1404
  }
1405
- .multiple-selector .tags-container[data-v-a09f11c3] {
1405
+ .multiple-selector .tags-container[data-v-1a376d26] {
1406
1406
  min-height: 32px;
1407
1407
  border: 1px solid #dcdee5;
1408
1408
  border-radius: 2px;
@@ -1410,46 +1410,46 @@ optgroup {
1410
1410
  transition: all 0.2s ease;
1411
1411
  background-color: #fff;
1412
1412
  }
1413
- .multiple-selector .tags-container.focused[data-v-a09f11c3] {
1413
+ .multiple-selector .tags-container.focused[data-v-1a376d26] {
1414
1414
  border-color: #3a84ff;
1415
1415
  box-shadow: 0 0 0 2px rgba(58, 132, 255, 0.1);
1416
1416
  }
1417
- .multiple-selector .tags-container.collapsed[data-v-a09f11c3] {
1417
+ .multiple-selector .tags-container.collapsed[data-v-1a376d26] {
1418
1418
  display: flex;
1419
1419
  flex-wrap: wrap;
1420
1420
  align-items: center;
1421
1421
  }
1422
- .multiple-selector .tag-list[data-v-a09f11c3] {
1422
+ .multiple-selector .tag-list[data-v-1a376d26] {
1423
1423
  display: flex;
1424
1424
  flex-wrap: wrap;
1425
1425
  align-items: center;
1426
1426
  }
1427
- .multiple-selector .tag-wrapper[data-v-a09f11c3] {
1427
+ .multiple-selector .tag-wrapper[data-v-1a376d26] {
1428
1428
  display: inline-flex;
1429
1429
  align-items: center;
1430
1430
  max-width: 100%;
1431
1431
  }
1432
- .multiple-selector .search-input[data-v-a09f11c3] {
1432
+ .multiple-selector .search-input[data-v-1a376d26] {
1433
1433
  outline: none;
1434
1434
  border: none;
1435
1435
  height: 28px;
1436
1436
  min-width: 10px;
1437
1437
  background: transparent;
1438
1438
  }
1439
- .multiple-selector .search-input[data-v-a09f11c3]::placeholder {
1439
+ .multiple-selector .search-input[data-v-1a376d26]::placeholder {
1440
1440
  color: #c4c6cc;
1441
1441
  }
1442
- .multiple-selector .search-input.inline[data-v-a09f11c3] {
1442
+ .multiple-selector .search-input.inline[data-v-1a376d26] {
1443
1443
  min-width: 10px;
1444
1444
  }
1445
- .multiple-selector .search-input.last[data-v-a09f11c3], .multiple-selector .search-input.collapsed[data-v-a09f11c3] {
1445
+ .multiple-selector .search-input.last[data-v-1a376d26], .multiple-selector .search-input.collapsed[data-v-1a376d26] {
1446
1446
  flex: 1;
1447
1447
  min-width: 60px;
1448
- }.single-selector[data-v-8b8dd0fd] {
1448
+ }.single-selector[data-v-22d9b76f] {
1449
1449
  position: relative;
1450
1450
  width: 100%;
1451
1451
  }
1452
- .input-container[data-v-8b8dd0fd] {
1452
+ .input-container[data-v-22d9b76f] {
1453
1453
  position: relative;
1454
1454
  display: flex;
1455
1455
  align-items: center;
@@ -1459,21 +1459,21 @@ optgroup {
1459
1459
  padding: 0 8px;
1460
1460
  background-color: #fff;
1461
1461
  }
1462
- .input-container[data-v-8b8dd0fd]:focus-within {
1462
+ .input-container[data-v-22d9b76f]:focus-within {
1463
1463
  border-color: #3a84ff;
1464
1464
  box-shadow: 0 0 0 2px rgba(58, 132, 255, 0.1);
1465
1465
  }
1466
- .search-input[data-v-8b8dd0fd] {
1466
+ .search-input[data-v-22d9b76f] {
1467
1467
  flex: 1;
1468
1468
  outline: none;
1469
1469
  border: none;
1470
1470
  height: 30px;
1471
1471
  background: transparent;
1472
1472
  }
1473
- .search-input[data-v-8b8dd0fd]::placeholder {
1473
+ .search-input[data-v-22d9b76f]::placeholder {
1474
1474
  color: #c4c6cc;
1475
1475
  }
1476
- .selected-user[data-v-8b8dd0fd] {
1476
+ .selected-user[data-v-22d9b76f] {
1477
1477
  display: inline-flex;
1478
1478
  align-items: center;
1479
1479
  background-color: #f0f1f5;
@@ -1483,15 +1483,15 @@ optgroup {
1483
1483
  height: 24px;
1484
1484
  max-width: calc(100% - 32px);
1485
1485
  }
1486
- .selected-user .tenant-name[data-v-8b8dd0fd] {
1486
+ .selected-user .tenant-name[data-v-22d9b76f] {
1487
1487
  color: #f59500;
1488
1488
  margin-left: 4px;
1489
1489
  }
1490
- .selected-user .close-icon[data-v-8b8dd0fd] {
1490
+ .selected-user .close-icon[data-v-22d9b76f] {
1491
1491
  margin-left: 4px;
1492
1492
  cursor: pointer;
1493
1493
  font-style: normal;
1494
- }.bk-user-selector[data-v-bc7b4ccd] {
1494
+ }.bk-user-selector[data-v-84252deb] {
1495
1495
  width: 100%;
1496
1496
  position: relative;
1497
1497
  font-size: 12px;
@@ -3099,7 +3099,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3099
3099
  const emit = __emit;
3100
3100
  const groupedUsers = computed(() => {
3101
3101
  const groups = {};
3102
- console.log("props.options", props.options);
3103
3102
  if (Array.isArray(props.userGroup) && props.userGroup.length > 0) {
3104
3103
  groups[props.userGroupName] = props.userGroup.map((group) => ({
3105
3104
  id: group.id,
@@ -3153,9 +3152,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3153
3152
  class: "user-group",
3154
3153
  key: groupName
3155
3154
  }, [
3156
- createElementVNode(
3155
+ Object.keys(groupedUsers.value).length > 1 ? (openBlock(), createElementBlock(
3157
3156
  "div",
3158
3157
  {
3158
+ key: 0,
3159
3159
  class: "group-header",
3160
3160
  onMousedown: _cache[0] || (_cache[0] = withModifiers(() => {
3161
3161
  }, ["prevent"]))
@@ -3178,7 +3178,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3178
3178
  ],
3179
3179
  32
3180
3180
  /* NEED_HYDRATION */
3181
- ),
3181
+ )) : createCommentVNode("v-if", true),
3182
3182
  (openBlock(true), createElementBlock(
3183
3183
  Fragment,
3184
3184
  null,
@@ -3223,7 +3223,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3223
3223
  };
3224
3224
  }
3225
3225
  });
3226
- const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-c68dfcac"]]);
3226
+ const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-01b75e6e"]]);
3227
3227
  const _hoisted_1$3 = { class: "tag-content" };
3228
3228
  const _hoisted_2$2 = { class: "user-name" };
3229
3229
  const _hoisted_3$2 = {
@@ -3293,83 +3293,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3293
3293
  },
3294
3294
  __name: "multiple-selector",
3295
3295
  props: {
3296
- /**
3297
- * 绑定值
3298
- */
3299
- modelValue: {
3300
- type: Array,
3301
- default: () => []
3302
- },
3303
- /**
3304
- * 占位文本
3305
- */
3306
- placeholder: {
3307
- type: String,
3308
- default: "请输入人员名称搜索"
3309
- },
3310
- /**
3311
- * 是否可拖拽
3312
- */
3313
- draggable: {
3314
- type: Boolean,
3315
- default: false
3316
- },
3317
- /**
3318
- * API 基础 URL
3319
- */
3320
- apiBaseUrl: {
3321
- type: String,
3322
- default: ""
3323
- },
3324
- /**
3325
- * 租户 ID
3326
- */
3327
- tenantId: {
3328
- type: String,
3329
- default: ""
3330
- },
3331
- /**
3332
- * 已选用户
3333
- */
3334
- selectedUsers: {
3335
- type: Array,
3336
- default: () => []
3337
- },
3338
- /**
3339
- * 租户信息映射
3340
- */
3341
- tenants: {
3342
- type: Object,
3343
- default: () => ({})
3344
- },
3345
- /**
3346
- * 当前用户ID
3347
- */
3348
- currentUserId: {
3349
- type: String,
3350
- default: ""
3351
- },
3352
- /**
3353
- * 精确查找key
3354
- */
3355
- exactSearchKey: {
3356
- type: String,
3357
- default: "bk_username"
3358
- },
3359
- /**
3360
- * 用户组
3361
- */
3362
- userGroup: {
3363
- type: Array,
3364
- default: () => []
3365
- },
3366
- /**
3367
- * 用户组名称
3368
- */
3369
- userGroupName: {
3370
- type: String,
3371
- default: "用户群组"
3372
- }
3296
+ modelValue: { default: () => [] },
3297
+ draggable: { type: Boolean, default: false },
3298
+ selectedUsers: { default: () => [] },
3299
+ tenants: { default: () => ({}) },
3300
+ apiBaseUrl: { default: "" },
3301
+ tenantId: { default: "" },
3302
+ placeholder: { default: "请输入人员名称搜索" },
3303
+ currentUserId: { default: "" },
3304
+ exactSearchKey: { default: "bk_username" },
3305
+ userGroup: { default: () => [] },
3306
+ userGroupName: { default: "用户群组" }
3373
3307
  },
3374
3308
  emits: ["update:selectedUsers", "add-user", "remove-user"],
3375
3309
  setup(__props, { emit: __emit }) {
@@ -3632,7 +3566,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3632
3566
  (openBlock(true), createElementBlock(
3633
3567
  Fragment,
3634
3568
  null,
3635
- renderList(__props.selectedUsers, (user, index) => {
3569
+ renderList(_ctx.selectedUsers, (user, index) => {
3636
3570
  return openBlock(), createElementBlock("div", {
3637
3571
  class: "tag-wrapper",
3638
3572
  key: user.id,
@@ -3640,15 +3574,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3640
3574
  }, [
3641
3575
  createVNode(UserTag, {
3642
3576
  active: index === activeTagIndex.value,
3643
- "current-tenant-id": __props.tenantId,
3644
- draggable: __props.draggable,
3645
- tenants: __props.tenants,
3577
+ "current-tenant-id": _ctx.tenantId,
3578
+ draggable: _ctx.draggable,
3579
+ tenants: _ctx.tenants,
3646
3580
  user,
3647
3581
  onClick: ($event) => handleTagClick(index),
3648
3582
  onClose: ($event) => removeUser(user)
3649
3583
  }, null, 8, ["active", "current-tenant-id", "draggable", "tenants", "user", "onClick", "onClose"]),
3650
3584
  createCommentVNode(" 在当前激活标签后插入输入框 "),
3651
- index === activeTagIndex.value && activeTagIndex.value !== __props.selectedUsers.length - 1 ? withDirectives((openBlock(), createElementBlock(
3585
+ index === activeTagIndex.value && activeTagIndex.value !== _ctx.selectedUsers.length - 1 ? withDirectives((openBlock(), createElementBlock(
3652
3586
  "input",
3653
3587
  {
3654
3588
  key: 0,
@@ -3674,13 +3608,13 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3674
3608
  /* KEYED_FRAGMENT */
3675
3609
  )),
3676
3610
  createCommentVNode(" 最后一个输入框 "),
3677
- activeTagIndex.value === -1 || activeTagIndex.value === __props.selectedUsers.length - 1 ? withDirectives((openBlock(), createElementBlock("input", {
3611
+ activeTagIndex.value === -1 || activeTagIndex.value === _ctx.selectedUsers.length - 1 ? withDirectives((openBlock(), createElementBlock("input", {
3678
3612
  key: 0,
3679
3613
  ref_key: "lastInputRef",
3680
3614
  ref: lastInputRef,
3681
3615
  class: "search-input last",
3682
3616
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(searchQuery) ? searchQuery.value = $event : null),
3683
- placeholder: !__props.selectedUsers.length ? __props.placeholder : "",
3617
+ placeholder: !_ctx.selectedUsers.length ? _ctx.placeholder : "",
3684
3618
  onFocus: handleInputFocus,
3685
3619
  onInput: handleInput,
3686
3620
  onKeydown: handleKeyDown,
@@ -3690,8 +3624,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3690
3624
  ]) : createCommentVNode("v-if", true),
3691
3625
  createCommentVNode(' "我"标签 '),
3692
3626
  createVNode(MeTag, {
3693
- "current-user-id": __props.currentUserId,
3694
- "is-disabled": !!__props.currentUserId && __props.selectedUsers.some((user) => user.id === __props.currentUserId),
3627
+ "current-user-id": _ctx.currentUserId,
3628
+ "is-disabled": !!_ctx.currentUserId && _ctx.selectedUsers.some((user) => user.id === _ctx.currentUserId),
3695
3629
  onClick: addCurrentUser
3696
3630
  }, null, 8, ["current-user-id", "is-disabled"])
3697
3631
  ],
@@ -3720,10 +3654,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3720
3654
  null,
3721
3655
  renderList(visibleUsers.value, (user) => {
3722
3656
  return openBlock(), createBlock(UserTag, {
3723
- "current-tenant-id": __props.tenantId,
3657
+ "current-tenant-id": _ctx.tenantId,
3724
3658
  key: user.id,
3725
3659
  "show-tenant": true,
3726
- tenants: __props.tenants,
3660
+ tenants: _ctx.tenants,
3727
3661
  user,
3728
3662
  onClick: handleFocus,
3729
3663
  onClose: ($event) => removeUser(user)
@@ -3748,7 +3682,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3748
3682
  /* STABLE */
3749
3683
  })), [
3750
3684
  [unref(bkTooltips), {
3751
- content: __props.selectedUsers.slice(visibleUsers.value.length).map((user) => user.display_name).join(","),
3685
+ content: _ctx.selectedUsers.slice(visibleUsers.value.length).map((user) => user.display_name).join(","),
3752
3686
  placement: "top"
3753
3687
  }]
3754
3688
  ]) : createCommentVNode("v-if", true),
@@ -3758,15 +3692,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3758
3692
  ref: collapsedInputRef,
3759
3693
  class: "search-input collapsed",
3760
3694
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(searchQuery) ? searchQuery.value = $event : null),
3761
- placeholder: !__props.selectedUsers.length ? __props.placeholder : "",
3695
+ placeholder: !_ctx.selectedUsers.length ? _ctx.placeholder : "",
3762
3696
  onFocus: handleFocus
3763
3697
  }, null, 40, _hoisted_3$1), [
3764
3698
  [vModelText, unref(searchQuery)]
3765
3699
  ]),
3766
3700
  createCommentVNode(' 未聚焦状态下的"我"标签 '),
3767
3701
  createVNode(MeTag, {
3768
- "current-user-id": __props.currentUserId,
3769
- "is-disabled": !!__props.currentUserId && __props.selectedUsers.some((user) => user[props.exactSearchKey] === __props.currentUserId),
3702
+ "current-user-id": _ctx.currentUserId,
3703
+ "is-disabled": !!_ctx.currentUserId && _ctx.selectedUsers.some((user) => user[props.exactSearchKey] === _ctx.currentUserId),
3770
3704
  onClick: addCurrentUser
3771
3705
  }, null, 8, ["current-user-id", "is-disabled"])
3772
3706
  ],
@@ -3784,10 +3718,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3784
3718
  loading: unref(searchLoading),
3785
3719
  options: options.value,
3786
3720
  "search-query": unref(searchQuery),
3787
- "tenant-id": __props.tenantId,
3788
- tenants: __props.tenants,
3789
- "user-group": __props.userGroup,
3790
- "user-group-name": __props.userGroupName,
3721
+ "tenant-id": _ctx.tenantId,
3722
+ tenants: _ctx.tenants,
3723
+ "user-group": _ctx.userGroup,
3724
+ "user-group-name": _ctx.userGroupName,
3791
3725
  onSelectUser: addUser
3792
3726
  }, null, 8, ["container-width", "is-show", "loading", "options", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
3793
3727
  ])), [
@@ -3796,8 +3730,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3796
3730
  };
3797
3731
  }
3798
3732
  });
3799
- const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-a09f11c3"]]);
3800
- const _withScopeId = (n) => (pushScopeId("data-v-8b8dd0fd"), n = n(), popScopeId(), n);
3733
+ const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-1a376d26"]]);
3734
+ const _withScopeId = (n) => (pushScopeId("data-v-22d9b76f"), n = n(), popScopeId(), n);
3801
3735
  const _hoisted_1$1 = { class: "input-container" };
3802
3736
  const _hoisted_2 = {
3803
3737
  key: 0,
@@ -3817,15 +3751,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3817
3751
  },
3818
3752
  __name: "single-selector",
3819
3753
  props: {
3820
- modelValue: {},
3754
+ modelValue: { default: "" },
3821
3755
  tenants: {},
3822
- apiBaseUrl: {},
3823
- tenantId: {},
3824
- placeholder: {},
3825
- currentUserId: {},
3826
- exactSearchKey: {},
3827
- userGroup: {},
3828
- userGroupName: {}
3756
+ apiBaseUrl: { default: "" },
3757
+ tenantId: { default: "" },
3758
+ placeholder: { default: "请输入人员名称搜索" },
3759
+ currentUserId: { default: "" },
3760
+ exactSearchKey: { default: "bk_username" },
3761
+ userGroup: { default: () => [] },
3762
+ userGroupName: { default: "用户群组" }
3829
3763
  },
3830
3764
  emits: ["update:modelValue", "change"],
3831
3765
  setup(__props, { emit: __emit }) {
@@ -3886,7 +3820,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3886
3820
  try {
3887
3821
  const result = await searchUsers(props.apiBaseUrl, props.tenantId, keyword);
3888
3822
  options.value = formatUsers(result).filter((user) => !selectedUser.value || user.id !== selectedUser.value);
3889
- console.log("options.value", options.value);
3890
3823
  } catch (error) {
3891
3824
  console.error("获取用户列表失败:", error);
3892
3825
  options.value = [];
@@ -3895,7 +3828,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3895
3828
  }
3896
3829
  };
3897
3830
  const addUser = (user) => {
3898
- console.log("addUser", user);
3899
3831
  selectedUser.value = user.id;
3900
3832
  searchQuery.value = "";
3901
3833
  showDropdown.value = false;
@@ -3910,7 +3842,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3910
3842
  }
3911
3843
  };
3912
3844
  const handleInput = () => {
3913
- console.log("handleInput", searchQuery.value);
3914
3845
  fetchUsers(searchQuery.value);
3915
3846
  showDropdown.value = searchQuery.value.length >= 2;
3916
3847
  };
@@ -3918,7 +3849,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3918
3849
  showDropdown.value = false;
3919
3850
  };
3920
3851
  watch(selectedUser, (newVal) => {
3921
- console.log("selectedUser", newVal);
3922
3852
  emit("update:modelValue", newVal);
3923
3853
  });
3924
3854
  return (_ctx, _cache) => {
@@ -3964,10 +3894,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3964
3894
  ]),
3965
3895
  createCommentVNode(' "我"标签 '),
3966
3896
  createVNode(MeTag, {
3967
- "is-disabled": !!_ctx.currentUserId && !!selectedUserInfo.value && selectedUserInfo.value[_ctx.exactSearchKey || "bk_username"] === _ctx.currentUserId,
3968
3897
  "current-user-id": _ctx.currentUserId,
3898
+ "is-disabled": !!_ctx.currentUserId && !!selectedUserInfo.value && selectedUserInfo.value[_ctx.exactSearchKey] === _ctx.currentUserId,
3969
3899
  onClick: addCurrentUser
3970
- }, null, 8, ["is-disabled", "current-user-id"])
3900
+ }, null, 8, ["current-user-id", "is-disabled"])
3971
3901
  ]),
3972
3902
  createCommentVNode(" 使用新的公共下拉选项组件 "),
3973
3903
  createVNode(SelectionPopover, {
@@ -3988,8 +3918,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3988
3918
  };
3989
3919
  }
3990
3920
  });
3991
- const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-8b8dd0fd"]]);
3992
- const _hoisted_1 = { class: "bk-user-selector" };
3921
+ const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-22d9b76f"]]);
3922
+ const _hoisted_1 = {
3923
+ ref: "containerRef",
3924
+ class: "bk-user-selector"
3925
+ };
3993
3926
  const _sfc_main = /* @__PURE__ */ defineComponent({
3994
3927
  ...{
3995
3928
  name: "BkUserSelector"
@@ -4022,7 +3955,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4022
3955
  const ids = Array.isArray(props.modelValue) ? props.modelValue : [];
4023
3956
  if (ids.length > 0) {
4024
3957
  try {
4025
- console.log(props.exactSearchKey);
4026
3958
  const result = await lookupUsers(props.apiBaseUrl, props.tenantId, props.exactSearchKey, ids);
4027
3959
  selectedUsers.value = formatUsers(result);
4028
3960
  } catch (error) {
@@ -4053,50 +3985,56 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4053
3985
  initSelectedUsers();
4054
3986
  });
4055
3987
  return (_ctx, _cache) => {
4056
- return openBlock(), createElementBlock("section", _hoisted_1, [
4057
- createCommentVNode(" 单选模式 "),
4058
- !_ctx.multiple ? (openBlock(), createBlock(SingleSelector, {
4059
- key: 0,
4060
- modelValue: selectedUser.value,
4061
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedUser.value = $event),
4062
- "api-base-url": _ctx.apiBaseUrl,
4063
- "current-user-id": _ctx.currentUserId,
4064
- "exact-search-key": _ctx.exactSearchKey,
4065
- placeholder: _ctx.placeholder,
4066
- "tenant-id": _ctx.tenantId,
4067
- tenants: unref(tenants),
4068
- "user-group": _ctx.userGroup,
4069
- "user-group-name": _ctx.userGroupName,
4070
- onChange: handleUpdateUser
4071
- }, null, 8, ["modelValue", "api-base-url", "current-user-id", "exact-search-key", "placeholder", "tenant-id", "tenants", "user-group", "user-group-name"])) : (openBlock(), createElementBlock(
4072
- Fragment,
4073
- { key: 1 },
4074
- [
4075
- createCommentVNode(" 多选模式 "),
4076
- createVNode(MultipleSelector, {
4077
- modelValue: selectedUserIds.value,
4078
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => selectedUserIds.value = $event),
4079
- "api-base-url": _ctx.apiBaseUrl,
4080
- "current-user-id": _ctx.currentUserId,
4081
- draggable: _ctx.draggable,
4082
- "exact-search-key": _ctx.exactSearchKey,
4083
- placeholder: _ctx.placeholder,
4084
- "selected-users": selectedUsers.value,
4085
- "tenant-id": _ctx.tenantId,
4086
- tenants: unref(tenants),
4087
- "user-group": _ctx.userGroup,
4088
- "user-group-name": _ctx.userGroupName,
4089
- "onUpdate:selectedUsers": handleUpdateSelectedUsers
4090
- }, null, 8, ["modelValue", "api-base-url", "current-user-id", "draggable", "exact-search-key", "placeholder", "selected-users", "tenant-id", "tenants", "user-group", "user-group-name"])
4091
- ],
4092
- 2112
4093
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
4094
- ))
4095
- ]);
3988
+ return openBlock(), createElementBlock(
3989
+ "section",
3990
+ _hoisted_1,
3991
+ [
3992
+ createCommentVNode(" 单选模式 "),
3993
+ !_ctx.multiple ? (openBlock(), createBlock(SingleSelector, {
3994
+ key: 0,
3995
+ modelValue: selectedUser.value,
3996
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedUser.value = $event),
3997
+ "api-base-url": _ctx.apiBaseUrl,
3998
+ "current-user-id": _ctx.currentUserId,
3999
+ "exact-search-key": _ctx.exactSearchKey,
4000
+ placeholder: _ctx.placeholder,
4001
+ "tenant-id": _ctx.tenantId,
4002
+ tenants: unref(tenants),
4003
+ "user-group": _ctx.userGroup,
4004
+ "user-group-name": _ctx.userGroupName,
4005
+ onChange: handleUpdateUser
4006
+ }, null, 8, ["modelValue", "api-base-url", "current-user-id", "exact-search-key", "placeholder", "tenant-id", "tenants", "user-group", "user-group-name"])) : (openBlock(), createElementBlock(
4007
+ Fragment,
4008
+ { key: 1 },
4009
+ [
4010
+ createCommentVNode(" 多选模式 "),
4011
+ createVNode(MultipleSelector, {
4012
+ modelValue: selectedUserIds.value,
4013
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => selectedUserIds.value = $event),
4014
+ "api-base-url": _ctx.apiBaseUrl,
4015
+ "current-user-id": _ctx.currentUserId,
4016
+ draggable: _ctx.draggable,
4017
+ "exact-search-key": _ctx.exactSearchKey,
4018
+ placeholder: _ctx.placeholder,
4019
+ "selected-users": selectedUsers.value,
4020
+ "tenant-id": _ctx.tenantId,
4021
+ tenants: unref(tenants),
4022
+ "user-group": _ctx.userGroup,
4023
+ "user-group-name": _ctx.userGroupName,
4024
+ "onUpdate:selectedUsers": handleUpdateSelectedUsers
4025
+ }, null, 8, ["modelValue", "api-base-url", "current-user-id", "draggable", "exact-search-key", "placeholder", "selected-users", "tenant-id", "tenants", "user-group", "user-group-name"])
4026
+ ],
4027
+ 2112
4028
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
4029
+ ))
4030
+ ],
4031
+ 512
4032
+ /* NEED_PATCH */
4033
+ );
4096
4034
  };
4097
4035
  }
4098
4036
  });
4099
- const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bc7b4ccd"]]);
4037
+ const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-84252deb"]]);
4100
4038
  export {
4101
4039
  BkUserSelector,
4102
4040
  BkUserSelector as default