@blueking/bk-user-selector 0.0.11 → 0.0.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/README.md +1 -0
- package/package.json +1 -1
- package/typings/components/multiple-selector.vue.d.ts +3 -0
- package/typings/components/selection-popover.vue.d.ts +15 -0
- package/typings/components/single-selector.vue.d.ts +3 -0
- package/typings/components/user-selector.vue.d.ts +3 -0
- package/typings/types/index.d.ts +4 -0
- package/vue2/index.es.min.js +230 -198
- package/vue2/index.iife.min.js +231 -199
- package/vue2/index.umd.min.js +231 -199
- package/vue2/vue2.css +26 -26
- package/vue3/index.es.min.js +230 -198
- package/vue3/index.iife.min.js +231 -199
- package/vue3/index.umd.min.js +231 -199
- package/vue3/vue3.css +26 -26
package/vue3/index.es.min.js
CHANGED
|
@@ -3092,6 +3092,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3092
3092
|
userGroupName: {
|
|
3093
3093
|
type: String,
|
|
3094
3094
|
default: "用户群组"
|
|
3095
|
+
},
|
|
3096
|
+
/**
|
|
3097
|
+
* 无匹配人员时的提示文本
|
|
3098
|
+
*/
|
|
3099
|
+
emptyText: {
|
|
3100
|
+
type: String,
|
|
3101
|
+
default: "无匹配人员"
|
|
3095
3102
|
}
|
|
3096
3103
|
},
|
|
3097
3104
|
emits: ["select-user"],
|
|
@@ -3141,7 +3148,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3141
3148
|
createElementVNode(
|
|
3142
3149
|
"span",
|
|
3143
3150
|
null,
|
|
3144
|
-
toDisplayString(__props.searchQuery.length > 1 ?
|
|
3151
|
+
toDisplayString(__props.searchQuery.length > 1 ? __props.emptyText : "请至少输入2个字符搜索"),
|
|
3145
3152
|
1
|
|
3146
3153
|
/* TEXT */
|
|
3147
3154
|
)
|
|
@@ -3224,7 +3231,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3224
3231
|
};
|
|
3225
3232
|
}
|
|
3226
3233
|
});
|
|
3227
|
-
const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
3234
|
+
const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-05b232a4"]]);
|
|
3228
3235
|
const _hoisted_1$3 = { class: "tag-content" };
|
|
3229
3236
|
const _hoisted_2$2 = { class: "user-name" };
|
|
3230
3237
|
const _hoisted_3$2 = {
|
|
@@ -3304,7 +3311,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3304
3311
|
currentUserId: { default: "" },
|
|
3305
3312
|
exactSearchKey: { default: "bk_username" },
|
|
3306
3313
|
userGroup: { default: () => [] },
|
|
3307
|
-
userGroupName: { default: "用户群组" }
|
|
3314
|
+
userGroupName: { default: "用户群组" },
|
|
3315
|
+
emptyText: { default: "无匹配人员" }
|
|
3308
3316
|
},
|
|
3309
3317
|
emits: ["update:selectedUsers", "add-user", "remove-user"],
|
|
3310
3318
|
setup(__props, { emit: __emit }) {
|
|
@@ -3381,7 +3389,13 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3381
3389
|
}
|
|
3382
3390
|
});
|
|
3383
3391
|
};
|
|
3384
|
-
const handleClickOutside = () => {
|
|
3392
|
+
const handleClickOutside = ({ event }) => {
|
|
3393
|
+
event.stopPropagation();
|
|
3394
|
+
const target = event.target;
|
|
3395
|
+
const container = containerRef.value;
|
|
3396
|
+
if ((container == null ? void 0 : container.contains(target)) || container === target) {
|
|
3397
|
+
return;
|
|
3398
|
+
}
|
|
3385
3399
|
isFocused.value = false;
|
|
3386
3400
|
showDropdown.value = false;
|
|
3387
3401
|
activeTagIndex.value = -1;
|
|
@@ -3490,7 +3504,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3490
3504
|
emit("add-user", user);
|
|
3491
3505
|
}
|
|
3492
3506
|
searchQuery.value = "";
|
|
3493
|
-
|
|
3507
|
+
setTimeout(() => {
|
|
3508
|
+
showDropdown.value = false;
|
|
3509
|
+
}, 220);
|
|
3510
|
+
nextTick(() => {
|
|
3511
|
+
if (lastInputRef.value) {
|
|
3512
|
+
lastInputRef.value.focus();
|
|
3513
|
+
}
|
|
3514
|
+
});
|
|
3494
3515
|
};
|
|
3495
3516
|
const removeUser = (user) => {
|
|
3496
3517
|
if (!(user == null ? void 0 : user.id)) return;
|
|
@@ -3539,200 +3560,206 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3539
3560
|
});
|
|
3540
3561
|
});
|
|
3541
3562
|
return (_ctx, _cache) => {
|
|
3542
|
-
return
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3563
|
+
return openBlock(), createElementBlock(
|
|
3564
|
+
"div",
|
|
3565
|
+
{
|
|
3566
|
+
ref_key: "containerRef",
|
|
3567
|
+
ref: containerRef,
|
|
3568
|
+
class: "multiple-selector"
|
|
3569
|
+
},
|
|
3570
|
+
[
|
|
3571
|
+
createCommentVNode(" 聚焦状态 - 可编辑模式 "),
|
|
3572
|
+
isFocused.value ? (openBlock(), createElementBlock(
|
|
3573
|
+
"div",
|
|
3574
|
+
{
|
|
3575
|
+
key: 0,
|
|
3576
|
+
ref_key: "tagsContainerRef",
|
|
3577
|
+
ref: tagsContainerRef,
|
|
3578
|
+
class: "tags-container focused",
|
|
3579
|
+
onClick: withModifiers(handleContainerClick, ["stop"])
|
|
3580
|
+
},
|
|
3581
|
+
[
|
|
3582
|
+
createCommentVNode(" 用户标签列表 "),
|
|
3583
|
+
createElementVNode(
|
|
3584
|
+
"div",
|
|
3585
|
+
{
|
|
3586
|
+
ref_key: "sortableContainerRef",
|
|
3587
|
+
ref: sortableContainerRef,
|
|
3588
|
+
class: "tag-list"
|
|
3589
|
+
},
|
|
3590
|
+
[
|
|
3591
|
+
(openBlock(true), createElementBlock(
|
|
3592
|
+
Fragment,
|
|
3593
|
+
null,
|
|
3594
|
+
renderList(_ctx.selectedUsers, (user, index) => {
|
|
3595
|
+
return openBlock(), createElementBlock("div", {
|
|
3596
|
+
class: "tag-wrapper",
|
|
3597
|
+
key: user.id,
|
|
3598
|
+
onClick: withModifiers(($event) => handleTagClick(index), ["stop"])
|
|
3599
|
+
}, [
|
|
3600
|
+
createVNode(UserTag, {
|
|
3601
|
+
active: index === activeTagIndex.value,
|
|
3602
|
+
"current-tenant-id": _ctx.tenantId,
|
|
3603
|
+
draggable: _ctx.draggable,
|
|
3604
|
+
tenants: _ctx.tenants,
|
|
3605
|
+
user,
|
|
3606
|
+
onClick: ($event) => handleTagClick(index),
|
|
3607
|
+
onClose: ($event) => removeUser(user)
|
|
3608
|
+
}, null, 8, ["active", "current-tenant-id", "draggable", "tenants", "user", "onClick", "onClose"]),
|
|
3609
|
+
createCommentVNode(" 在当前激活标签后插入输入框 "),
|
|
3610
|
+
index === activeTagIndex.value && activeTagIndex.value !== _ctx.selectedUsers.length - 1 ? withDirectives((openBlock(), createElementBlock(
|
|
3611
|
+
"input",
|
|
3612
|
+
{
|
|
3613
|
+
key: 0,
|
|
3614
|
+
ref_for: true,
|
|
3615
|
+
ref_key: "inlineInputRef",
|
|
3616
|
+
ref: inlineInputRef,
|
|
3617
|
+
class: "search-input inline",
|
|
3618
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchQuery) ? searchQuery.value = $event : null),
|
|
3619
|
+
onFocus: handleInputFocus,
|
|
3620
|
+
onInput: handleInput,
|
|
3621
|
+
onKeydown: handleKeyDown,
|
|
3622
|
+
onPaste: handlePaste
|
|
3623
|
+
},
|
|
3624
|
+
null,
|
|
3625
|
+
544
|
|
3626
|
+
/* NEED_HYDRATION, NEED_PATCH */
|
|
3627
|
+
)), [
|
|
3628
|
+
[vModelText, unref(searchQuery)]
|
|
3629
|
+
]) : createCommentVNode("v-if", true)
|
|
3630
|
+
], 8, _hoisted_1$2);
|
|
3631
|
+
}),
|
|
3632
|
+
128
|
|
3633
|
+
/* KEYED_FRAGMENT */
|
|
3634
|
+
)),
|
|
3635
|
+
createCommentVNode(" 最后一个输入框 "),
|
|
3636
|
+
activeTagIndex.value === -1 || activeTagIndex.value === _ctx.selectedUsers.length - 1 ? withDirectives((openBlock(), createElementBlock("input", {
|
|
3637
|
+
key: 0,
|
|
3638
|
+
ref_key: "lastInputRef",
|
|
3639
|
+
ref: lastInputRef,
|
|
3640
|
+
class: "search-input last",
|
|
3641
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(searchQuery) ? searchQuery.value = $event : null),
|
|
3642
|
+
placeholder: !_ctx.selectedUsers.length ? _ctx.placeholder : "",
|
|
3643
|
+
onFocus: handleInputFocus,
|
|
3644
|
+
onInput: handleInput,
|
|
3645
|
+
onKeydown: handleKeyDown,
|
|
3646
|
+
onPaste: handlePaste
|
|
3647
|
+
}, null, 40, _hoisted_2$1)), [
|
|
3648
|
+
[vModelText, unref(searchQuery)]
|
|
3649
|
+
]) : createCommentVNode("v-if", true),
|
|
3650
|
+
createCommentVNode(' "我"标签 '),
|
|
3651
|
+
createVNode(MeTag, {
|
|
3652
|
+
"current-user-id": _ctx.currentUserId,
|
|
3653
|
+
"is-disabled": !!_ctx.currentUserId && _ctx.selectedUsers.some((user) => user.id === _ctx.currentUserId),
|
|
3654
|
+
onClick: addCurrentUser
|
|
3655
|
+
}, null, 8, ["current-user-id", "is-disabled"])
|
|
3656
|
+
],
|
|
3657
|
+
512
|
|
3658
|
+
/* NEED_PATCH */
|
|
3659
|
+
)
|
|
3660
|
+
],
|
|
3661
|
+
512
|
|
3662
|
+
/* NEED_PATCH */
|
|
3663
|
+
)) : (openBlock(), createElementBlock(
|
|
3664
|
+
Fragment,
|
|
3665
|
+
{ key: 1 },
|
|
3666
|
+
[
|
|
3667
|
+
createCommentVNode(" 未聚焦状态 - 只读展示模式 "),
|
|
3668
|
+
createElementVNode(
|
|
3669
|
+
"div",
|
|
3670
|
+
{
|
|
3671
|
+
ref_key: "collapsedContainerRef",
|
|
3672
|
+
ref: collapsedContainerRef,
|
|
3673
|
+
class: "tags-container collapsed",
|
|
3674
|
+
onClick: withModifiers(handleFocus, ["stop"])
|
|
3675
|
+
},
|
|
3676
|
+
[
|
|
3677
|
+
(openBlock(true), createElementBlock(
|
|
3678
|
+
Fragment,
|
|
3679
|
+
null,
|
|
3680
|
+
renderList(visibleUsers.value, (user) => {
|
|
3681
|
+
return openBlock(), createBlock(UserTag, {
|
|
3578
3682
|
"current-tenant-id": _ctx.tenantId,
|
|
3579
|
-
|
|
3683
|
+
key: user.id,
|
|
3684
|
+
"show-tenant": true,
|
|
3580
3685
|
tenants: _ctx.tenants,
|
|
3581
3686
|
user,
|
|
3582
|
-
onClick:
|
|
3687
|
+
onClick: handleFocus,
|
|
3583
3688
|
onClose: ($event) => removeUser(user)
|
|
3584
|
-
}, null, 8, ["
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
onFocus: handleInputFocus,
|
|
3620
|
-
onInput: handleInput,
|
|
3621
|
-
onKeydown: handleKeyDown,
|
|
3622
|
-
onPaste: handlePaste
|
|
3623
|
-
}, null, 40, _hoisted_2$1)), [
|
|
3624
|
-
[vModelText, unref(searchQuery)]
|
|
3625
|
-
]) : createCommentVNode("v-if", true),
|
|
3626
|
-
createCommentVNode(' "我"标签 '),
|
|
3627
|
-
createVNode(MeTag, {
|
|
3628
|
-
"current-user-id": _ctx.currentUserId,
|
|
3629
|
-
"is-disabled": !!_ctx.currentUserId && _ctx.selectedUsers.some((user) => user.id === _ctx.currentUserId),
|
|
3630
|
-
onClick: addCurrentUser
|
|
3631
|
-
}, null, 8, ["current-user-id", "is-disabled"])
|
|
3632
|
-
],
|
|
3633
|
-
512
|
|
3634
|
-
/* NEED_PATCH */
|
|
3635
|
-
)
|
|
3636
|
-
],
|
|
3637
|
-
512
|
|
3638
|
-
/* NEED_PATCH */
|
|
3639
|
-
)) : (openBlock(), createElementBlock(
|
|
3640
|
-
Fragment,
|
|
3641
|
-
{ key: 1 },
|
|
3642
|
-
[
|
|
3643
|
-
createCommentVNode(" 未聚焦状态 - 只读展示模式 "),
|
|
3644
|
-
createElementVNode(
|
|
3645
|
-
"div",
|
|
3646
|
-
{
|
|
3647
|
-
ref_key: "collapsedContainerRef",
|
|
3648
|
-
ref: collapsedContainerRef,
|
|
3649
|
-
class: "tags-container collapsed",
|
|
3650
|
-
onClick: withModifiers(handleFocus, ["stop"])
|
|
3651
|
-
},
|
|
3652
|
-
[
|
|
3653
|
-
(openBlock(true), createElementBlock(
|
|
3654
|
-
Fragment,
|
|
3655
|
-
null,
|
|
3656
|
-
renderList(visibleUsers.value, (user) => {
|
|
3657
|
-
return openBlock(), createBlock(UserTag, {
|
|
3658
|
-
"current-tenant-id": _ctx.tenantId,
|
|
3659
|
-
key: user.id,
|
|
3660
|
-
"show-tenant": true,
|
|
3661
|
-
tenants: _ctx.tenants,
|
|
3662
|
-
user,
|
|
3663
|
-
onClick: handleFocus,
|
|
3664
|
-
onClose: ($event) => removeUser(user)
|
|
3665
|
-
}, null, 8, ["current-tenant-id", "tenants", "user", "onClose"]);
|
|
3666
|
-
}),
|
|
3667
|
-
128
|
|
3668
|
-
/* KEYED_FRAGMENT */
|
|
3669
|
-
)),
|
|
3670
|
-
createCommentVNode(" 显示折叠标签数量 "),
|
|
3671
|
-
hiddenCount.value > 0 ? withDirectives((openBlock(), createBlock(unref(Tag), {
|
|
3672
|
-
key: 0,
|
|
3673
|
-
onClick: withModifiers(handleFocus, ["stop"])
|
|
3674
|
-
}, {
|
|
3675
|
-
default: withCtx(() => [
|
|
3676
|
-
createTextVNode(
|
|
3677
|
-
" +" + toDisplayString(hiddenCount.value),
|
|
3678
|
-
1
|
|
3679
|
-
/* TEXT */
|
|
3680
|
-
)
|
|
3689
|
+
}, null, 8, ["current-tenant-id", "tenants", "user", "onClose"]);
|
|
3690
|
+
}),
|
|
3691
|
+
128
|
|
3692
|
+
/* KEYED_FRAGMENT */
|
|
3693
|
+
)),
|
|
3694
|
+
createCommentVNode(" 显示折叠标签数量 "),
|
|
3695
|
+
hiddenCount.value > 0 ? withDirectives((openBlock(), createBlock(unref(Tag), {
|
|
3696
|
+
key: 0,
|
|
3697
|
+
onClick: withModifiers(handleFocus, ["stop"])
|
|
3698
|
+
}, {
|
|
3699
|
+
default: withCtx(() => [
|
|
3700
|
+
createTextVNode(
|
|
3701
|
+
" +" + toDisplayString(hiddenCount.value),
|
|
3702
|
+
1
|
|
3703
|
+
/* TEXT */
|
|
3704
|
+
)
|
|
3705
|
+
]),
|
|
3706
|
+
_: 1
|
|
3707
|
+
/* STABLE */
|
|
3708
|
+
})), [
|
|
3709
|
+
[unref(bkTooltips), {
|
|
3710
|
+
content: _ctx.selectedUsers.slice(visibleUsers.value.length).map((user) => user.display_name).join(","),
|
|
3711
|
+
placement: "top"
|
|
3712
|
+
}]
|
|
3713
|
+
]) : createCommentVNode("v-if", true),
|
|
3714
|
+
createCommentVNode(" 搜索输入框 "),
|
|
3715
|
+
withDirectives(createElementVNode("input", {
|
|
3716
|
+
ref_key: "collapsedInputRef",
|
|
3717
|
+
ref: collapsedInputRef,
|
|
3718
|
+
class: "search-input collapsed",
|
|
3719
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(searchQuery) ? searchQuery.value = $event : null),
|
|
3720
|
+
placeholder: !_ctx.selectedUsers.length ? _ctx.placeholder : "",
|
|
3721
|
+
onFocus: handleFocus
|
|
3722
|
+
}, null, 40, _hoisted_3$1), [
|
|
3723
|
+
[vModelText, unref(searchQuery)]
|
|
3681
3724
|
]),
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
createCommentVNode(" 下拉选项列表 "),
|
|
3716
|
-
createVNode(SelectionPopover, {
|
|
3717
|
-
"container-width": containerRef.value ? containerRef.value.offsetWidth : "auto",
|
|
3718
|
-
"is-show": showDropdown.value,
|
|
3719
|
-
loading: unref(searchLoading),
|
|
3720
|
-
options: options.value,
|
|
3721
|
-
"search-query": unref(searchQuery),
|
|
3722
|
-
"tenant-id": _ctx.tenantId,
|
|
3723
|
-
tenants: _ctx.tenants,
|
|
3724
|
-
"user-group": _ctx.userGroup,
|
|
3725
|
-
"user-group-name": _ctx.userGroupName,
|
|
3726
|
-
onSelectUser: addUser
|
|
3727
|
-
}, null, 8, ["container-width", "is-show", "loading", "options", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
3728
|
-
])), [
|
|
3729
|
-
[unref(clickoutside), handleClickOutside]
|
|
3730
|
-
]);
|
|
3725
|
+
createCommentVNode(' 未聚焦状态下的"我"标签 '),
|
|
3726
|
+
createVNode(MeTag, {
|
|
3727
|
+
"current-user-id": _ctx.currentUserId,
|
|
3728
|
+
"is-disabled": !!_ctx.currentUserId && _ctx.selectedUsers.some((user) => user[props.exactSearchKey] === _ctx.currentUserId),
|
|
3729
|
+
onClick: addCurrentUser
|
|
3730
|
+
}, null, 8, ["current-user-id", "is-disabled"])
|
|
3731
|
+
],
|
|
3732
|
+
512
|
|
3733
|
+
/* NEED_PATCH */
|
|
3734
|
+
)
|
|
3735
|
+
],
|
|
3736
|
+
2112
|
|
3737
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
3738
|
+
)),
|
|
3739
|
+
createCommentVNode(" 下拉选项列表 "),
|
|
3740
|
+
createVNode(SelectionPopover, {
|
|
3741
|
+
"container-width": containerRef.value ? containerRef.value.offsetWidth : "auto",
|
|
3742
|
+
"empty-text": _ctx.emptyText,
|
|
3743
|
+
"is-show": showDropdown.value,
|
|
3744
|
+
loading: unref(searchLoading),
|
|
3745
|
+
options: options.value,
|
|
3746
|
+
"search-query": unref(searchQuery),
|
|
3747
|
+
"tenant-id": _ctx.tenantId,
|
|
3748
|
+
tenants: _ctx.tenants,
|
|
3749
|
+
"user-group": _ctx.userGroup,
|
|
3750
|
+
"user-group-name": _ctx.userGroupName,
|
|
3751
|
+
onClickoutside: handleClickOutside,
|
|
3752
|
+
onSelectUser: addUser
|
|
3753
|
+
}, null, 8, ["container-width", "empty-text", "is-show", "loading", "options", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
3754
|
+
],
|
|
3755
|
+
512
|
|
3756
|
+
/* NEED_PATCH */
|
|
3757
|
+
);
|
|
3731
3758
|
};
|
|
3732
3759
|
}
|
|
3733
3760
|
});
|
|
3734
|
-
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
3735
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
3761
|
+
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-a884849e"]]);
|
|
3762
|
+
const _withScopeId = (n) => (pushScopeId("data-v-ad0d9e2e"), n = n(), popScopeId(), n);
|
|
3736
3763
|
const _hoisted_1$1 = { class: "input-container" };
|
|
3737
3764
|
const _hoisted_2 = {
|
|
3738
3765
|
key: 0,
|
|
@@ -3760,7 +3787,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3760
3787
|
currentUserId: { default: "" },
|
|
3761
3788
|
exactSearchKey: { default: "bk_username" },
|
|
3762
3789
|
userGroup: { default: () => [] },
|
|
3763
|
-
userGroupName: { default: "用户群组" }
|
|
3790
|
+
userGroupName: { default: "用户群组" },
|
|
3791
|
+
emptyText: { default: "无匹配人员" }
|
|
3764
3792
|
},
|
|
3765
3793
|
emits: ["update:modelValue", "change"],
|
|
3766
3794
|
setup(__props, { emit: __emit }) {
|
|
@@ -3903,6 +3931,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3903
3931
|
createCommentVNode(" 使用新的公共下拉选项组件 "),
|
|
3904
3932
|
createVNode(SelectionPopover, {
|
|
3905
3933
|
"container-width": containerRef.value ? containerRef.value.offsetWidth : "auto",
|
|
3934
|
+
"empty-text": _ctx.emptyText,
|
|
3906
3935
|
"is-show": showDropdown.value,
|
|
3907
3936
|
loading: isLoading.value,
|
|
3908
3937
|
options: options.value,
|
|
@@ -3912,14 +3941,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3912
3941
|
"user-group": _ctx.userGroup,
|
|
3913
3942
|
"user-group-name": _ctx.userGroupName,
|
|
3914
3943
|
onSelectUser: addUser
|
|
3915
|
-
}, null, 8, ["container-width", "is-show", "loading", "options", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
3944
|
+
}, null, 8, ["container-width", "empty-text", "is-show", "loading", "options", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
3916
3945
|
])), [
|
|
3917
3946
|
[unref(clickoutside), handleClickOutside]
|
|
3918
3947
|
]);
|
|
3919
3948
|
};
|
|
3920
3949
|
}
|
|
3921
3950
|
});
|
|
3922
|
-
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
3951
|
+
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-ad0d9e2e"]]);
|
|
3923
3952
|
const _hoisted_1 = {
|
|
3924
3953
|
ref: "containerRef",
|
|
3925
3954
|
class: "bk-user-selector"
|
|
@@ -3939,7 +3968,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3939
3968
|
currentUserId: { default: "" },
|
|
3940
3969
|
exactSearchKey: { default: "bk_username" },
|
|
3941
3970
|
userGroup: { default: () => [] },
|
|
3942
|
-
userGroupName: { default: "用户群组" }
|
|
3971
|
+
userGroupName: { default: "用户群组" },
|
|
3972
|
+
emptyText: { default: "无匹配人员" }
|
|
3943
3973
|
},
|
|
3944
3974
|
emits: ["update:modelValue", "change"],
|
|
3945
3975
|
setup(__props, { emit: __emit }) {
|
|
@@ -3997,6 +4027,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3997
4027
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedUser.value = $event),
|
|
3998
4028
|
"api-base-url": _ctx.apiBaseUrl,
|
|
3999
4029
|
"current-user-id": _ctx.currentUserId,
|
|
4030
|
+
"empty-text": _ctx.emptyText,
|
|
4000
4031
|
"exact-search-key": _ctx.exactSearchKey,
|
|
4001
4032
|
placeholder: _ctx.placeholder,
|
|
4002
4033
|
"tenant-id": _ctx.tenantId,
|
|
@@ -4004,7 +4035,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4004
4035
|
"user-group": _ctx.userGroup,
|
|
4005
4036
|
"user-group-name": _ctx.userGroupName,
|
|
4006
4037
|
onChange: handleUpdateUser
|
|
4007
|
-
}, null, 8, ["modelValue", "api-base-url", "current-user-id", "exact-search-key", "placeholder", "tenant-id", "tenants", "user-group", "user-group-name"])) : (openBlock(), createElementBlock(
|
|
4038
|
+
}, null, 8, ["modelValue", "api-base-url", "current-user-id", "empty-text", "exact-search-key", "placeholder", "tenant-id", "tenants", "user-group", "user-group-name"])) : (openBlock(), createElementBlock(
|
|
4008
4039
|
Fragment,
|
|
4009
4040
|
{ key: 1 },
|
|
4010
4041
|
[
|
|
@@ -4015,6 +4046,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4015
4046
|
"api-base-url": _ctx.apiBaseUrl,
|
|
4016
4047
|
"current-user-id": _ctx.currentUserId,
|
|
4017
4048
|
draggable: _ctx.draggable,
|
|
4049
|
+
"empty-text": _ctx.emptyText,
|
|
4018
4050
|
"exact-search-key": _ctx.exactSearchKey,
|
|
4019
4051
|
placeholder: _ctx.placeholder,
|
|
4020
4052
|
"selected-users": selectedUsers.value,
|
|
@@ -4023,7 +4055,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4023
4055
|
"user-group": _ctx.userGroup,
|
|
4024
4056
|
"user-group-name": _ctx.userGroupName,
|
|
4025
4057
|
"onUpdate:selectedUsers": handleUpdateSelectedUsers
|
|
4026
|
-
}, null, 8, ["modelValue", "api-base-url", "current-user-id", "draggable", "exact-search-key", "placeholder", "selected-users", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
4058
|
+
}, null, 8, ["modelValue", "api-base-url", "current-user-id", "draggable", "empty-text", "exact-search-key", "placeholder", "selected-users", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
4027
4059
|
],
|
|
4028
4060
|
2112
|
|
4029
4061
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
@@ -4035,7 +4067,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4035
4067
|
};
|
|
4036
4068
|
}
|
|
4037
4069
|
});
|
|
4038
|
-
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4070
|
+
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6fd92757"]]);
|
|
4039
4071
|
export {
|
|
4040
4072
|
BkUserSelector,
|
|
4041
4073
|
BkUserSelector as default
|