@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.umd.min.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
})(this, function(exports2, vue, bkuiVue) {
|
|
4
4
|
"use strict";
|
|
5
5
|
var __vite_style__ = document.createElement("style");
|
|
6
|
-
__vite_style__.textContent = ".me-tag[data-v-887b7c44] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background-color: #e1ecff;\n color: #4d4f56;\n border-radius: 50%;\n padding: 0 8px;\n height: 24px;\n width: 24px;\n cursor: pointer;\n font-size: 12px;\n position: absolute;\n right: 8px;\n top: 50%;\n transform: translateY(-50%);\n z-index: 1;\n}\n.me-tag[data-v-887b7c44]:hover {\n background-color: #cddffe;\n color: #3a84ff;\n}\n.me-tag.disabled[data-v-887b7c44] {\n background-color: #f0f1f5;\n color: #c4c6cc;\n cursor: not-allowed;\n}.dropdown-content[data-v-
|
|
6
|
+
__vite_style__.textContent = ".me-tag[data-v-887b7c44] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background-color: #e1ecff;\n color: #4d4f56;\n border-radius: 50%;\n padding: 0 8px;\n height: 24px;\n width: 24px;\n cursor: pointer;\n font-size: 12px;\n position: absolute;\n right: 8px;\n top: 50%;\n transform: translateY(-50%);\n z-index: 1;\n}\n.me-tag[data-v-887b7c44]:hover {\n background-color: #cddffe;\n color: #3a84ff;\n}\n.me-tag.disabled[data-v-887b7c44] {\n background-color: #f0f1f5;\n color: #c4c6cc;\n cursor: not-allowed;\n}.dropdown-content[data-v-05b232a4] {\n min-height: 40px;\n max-height: 300px;\n overflow-y: auto;\n padding: 5px 0;\n}\n.dropdown-content .no-data[data-v-05b232a4] {\n padding: 10px;\n text-align: center;\n color: #979ba5;\n}\n.dropdown-content .user-group .group-header[data-v-05b232a4] {\n padding: 8px 12px;\n color: #979ba5;\n display: flex;\n align-items: center;\n}\n.dropdown-content .user-group .group-header .group-count[data-v-05b232a4] {\n margin-left: 4px;\n}\n.dropdown-content .user-option[data-v-05b232a4] {\n padding: 8px 12px;\n cursor: pointer;\n display: flex;\n align-items: center;\n height: 32px;\n}\n.dropdown-content .user-option[data-v-05b232a4]:hover {\n background-color: #f5f7fa;\n}\n.dropdown-content .user-option .tenant-name[data-v-05b232a4] {\n color: #f59500;\n margin-left: 4px;\n padding: 0 4px;\n}.bk-user-selector-popover.bk-popover.bk-pop2-content {\n padding: 0;\n}.user-tag[data-v-87c12feb] {\n margin-right: 4px;\n margin-left: 0;\n}\n.user-tag.draggable[data-v-87c12feb] {\n cursor: move;\n}\n.user-tag.active[data-v-87c12feb] {\n background-color: #e1ecff;\n border-color: #3a84ff;\n}\n.user-tag .tag-content .user-name[data-v-87c12feb] {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: 12px;\n}\n.user-tag .tag-content .tenant-name[data-v-87c12feb] {\n color: #f59500;\n margin-left: 3px;\n white-space: nowrap;\n padding: 0 3px;\n border-radius: 2px;\n}.multiple-selector[data-v-a884849e] {\n position: relative;\n width: 100%;\n}\n.multiple-selector .tags-container[data-v-a884849e] {\n min-height: 32px;\n border: 1px solid #dcdee5;\n border-radius: 2px;\n padding: 1px 10px 1px 8px;\n transition: all 0.2s ease;\n background-color: #fff;\n}\n.multiple-selector .tags-container.focused[data-v-a884849e] {\n border-color: #3a84ff;\n box-shadow: 0 0 0 2px rgba(58, 132, 255, 0.1);\n}\n.multiple-selector .tags-container.collapsed[data-v-a884849e] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n}\n.multiple-selector .tag-list[data-v-a884849e] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n}\n.multiple-selector .tag-wrapper[data-v-a884849e] {\n display: inline-flex;\n align-items: center;\n max-width: 100%;\n}\n.multiple-selector .search-input[data-v-a884849e] {\n outline: none;\n border: none;\n height: 28px;\n min-width: 10px;\n background: transparent;\n}\n.multiple-selector .search-input[data-v-a884849e]::placeholder {\n color: #c4c6cc;\n}\n.multiple-selector .search-input.inline[data-v-a884849e] {\n min-width: 10px;\n}\n.multiple-selector .search-input.last[data-v-a884849e], .multiple-selector .search-input.collapsed[data-v-a884849e] {\n flex: 1;\n min-width: 60px;\n}.single-selector[data-v-ad0d9e2e] {\n position: relative;\n width: 100%;\n}\n.input-container[data-v-ad0d9e2e] {\n position: relative;\n display: flex;\n align-items: center;\n min-height: 32px;\n border: 1px solid #dcdee5;\n border-radius: 2px;\n padding: 0 8px;\n background-color: #fff;\n}\n.input-container[data-v-ad0d9e2e]:focus-within {\n border-color: #3a84ff;\n box-shadow: 0 0 0 2px rgba(58, 132, 255, 0.1);\n}\n.search-input[data-v-ad0d9e2e] {\n flex: 1;\n outline: none;\n border: none;\n height: 30px;\n background: transparent;\n}\n.search-input[data-v-ad0d9e2e]::placeholder {\n color: #c4c6cc;\n}\n.selected-user[data-v-ad0d9e2e] {\n display: inline-flex;\n align-items: center;\n background-color: #f0f1f5;\n border-radius: 2px;\n padding: 0 8px;\n margin-right: 8px;\n height: 24px;\n max-width: calc(100% - 32px);\n}\n.selected-user .tenant-name[data-v-ad0d9e2e] {\n color: #f59500;\n margin-left: 4px;\n}\n.selected-user .close-icon[data-v-ad0d9e2e] {\n margin-left: 4px;\n cursor: pointer;\n font-style: normal;\n}.bk-user-selector[data-v-6fd92757] {\n width: 100%;\n position: relative;\n font-size: 12px;\n}/*$vite$:1*/";
|
|
7
7
|
document.head.appendChild(__vite_style__);
|
|
8
8
|
const getTenants = async (apiBaseUrl, tenantId) => {
|
|
9
9
|
if (!apiBaseUrl || !tenantId) {
|
|
@@ -3097,6 +3097,13 @@
|
|
|
3097
3097
|
userGroupName: {
|
|
3098
3098
|
type: String,
|
|
3099
3099
|
default: "用户群组"
|
|
3100
|
+
},
|
|
3101
|
+
/**
|
|
3102
|
+
* 无匹配人员时的提示文本
|
|
3103
|
+
*/
|
|
3104
|
+
emptyText: {
|
|
3105
|
+
type: String,
|
|
3106
|
+
default: "无匹配人员"
|
|
3100
3107
|
}
|
|
3101
3108
|
},
|
|
3102
3109
|
emits: ["select-user"],
|
|
@@ -3146,7 +3153,7 @@
|
|
|
3146
3153
|
vue.createElementVNode(
|
|
3147
3154
|
"span",
|
|
3148
3155
|
null,
|
|
3149
|
-
vue.toDisplayString(__props.searchQuery.length > 1 ?
|
|
3156
|
+
vue.toDisplayString(__props.searchQuery.length > 1 ? __props.emptyText : "请至少输入2个字符搜索"),
|
|
3150
3157
|
1
|
|
3151
3158
|
/* TEXT */
|
|
3152
3159
|
)
|
|
@@ -3229,7 +3236,7 @@
|
|
|
3229
3236
|
};
|
|
3230
3237
|
}
|
|
3231
3238
|
});
|
|
3232
|
-
const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
3239
|
+
const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-05b232a4"]]);
|
|
3233
3240
|
const _hoisted_1$3 = { class: "tag-content" };
|
|
3234
3241
|
const _hoisted_2$2 = { class: "user-name" };
|
|
3235
3242
|
const _hoisted_3$2 = {
|
|
@@ -3309,7 +3316,8 @@
|
|
|
3309
3316
|
currentUserId: { default: "" },
|
|
3310
3317
|
exactSearchKey: { default: "bk_username" },
|
|
3311
3318
|
userGroup: { default: () => [] },
|
|
3312
|
-
userGroupName: { default: "用户群组" }
|
|
3319
|
+
userGroupName: { default: "用户群组" },
|
|
3320
|
+
emptyText: { default: "无匹配人员" }
|
|
3313
3321
|
},
|
|
3314
3322
|
emits: ["update:selectedUsers", "add-user", "remove-user"],
|
|
3315
3323
|
setup(__props, { emit: __emit }) {
|
|
@@ -3386,7 +3394,13 @@
|
|
|
3386
3394
|
}
|
|
3387
3395
|
});
|
|
3388
3396
|
};
|
|
3389
|
-
const handleClickOutside = () => {
|
|
3397
|
+
const handleClickOutside = ({ event }) => {
|
|
3398
|
+
event.stopPropagation();
|
|
3399
|
+
const target = event.target;
|
|
3400
|
+
const container = containerRef.value;
|
|
3401
|
+
if ((container == null ? void 0 : container.contains(target)) || container === target) {
|
|
3402
|
+
return;
|
|
3403
|
+
}
|
|
3390
3404
|
isFocused.value = false;
|
|
3391
3405
|
showDropdown.value = false;
|
|
3392
3406
|
activeTagIndex.value = -1;
|
|
@@ -3495,7 +3509,14 @@
|
|
|
3495
3509
|
emit("add-user", user);
|
|
3496
3510
|
}
|
|
3497
3511
|
searchQuery.value = "";
|
|
3498
|
-
|
|
3512
|
+
setTimeout(() => {
|
|
3513
|
+
showDropdown.value = false;
|
|
3514
|
+
}, 220);
|
|
3515
|
+
vue.nextTick(() => {
|
|
3516
|
+
if (lastInputRef.value) {
|
|
3517
|
+
lastInputRef.value.focus();
|
|
3518
|
+
}
|
|
3519
|
+
});
|
|
3499
3520
|
};
|
|
3500
3521
|
const removeUser = (user) => {
|
|
3501
3522
|
if (!(user == null ? void 0 : user.id)) return;
|
|
@@ -3544,200 +3565,206 @@
|
|
|
3544
3565
|
});
|
|
3545
3566
|
});
|
|
3546
3567
|
return (_ctx, _cache) => {
|
|
3547
|
-
return vue.
|
|
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
|
-
vue.
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3568
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
3569
|
+
"div",
|
|
3570
|
+
{
|
|
3571
|
+
ref_key: "containerRef",
|
|
3572
|
+
ref: containerRef,
|
|
3573
|
+
class: "multiple-selector"
|
|
3574
|
+
},
|
|
3575
|
+
[
|
|
3576
|
+
vue.createCommentVNode(" 聚焦状态 - 可编辑模式 "),
|
|
3577
|
+
isFocused.value ? (vue.openBlock(), vue.createElementBlock(
|
|
3578
|
+
"div",
|
|
3579
|
+
{
|
|
3580
|
+
key: 0,
|
|
3581
|
+
ref_key: "tagsContainerRef",
|
|
3582
|
+
ref: tagsContainerRef,
|
|
3583
|
+
class: "tags-container focused",
|
|
3584
|
+
onClick: vue.withModifiers(handleContainerClick, ["stop"])
|
|
3585
|
+
},
|
|
3586
|
+
[
|
|
3587
|
+
vue.createCommentVNode(" 用户标签列表 "),
|
|
3588
|
+
vue.createElementVNode(
|
|
3589
|
+
"div",
|
|
3590
|
+
{
|
|
3591
|
+
ref_key: "sortableContainerRef",
|
|
3592
|
+
ref: sortableContainerRef,
|
|
3593
|
+
class: "tag-list"
|
|
3594
|
+
},
|
|
3595
|
+
[
|
|
3596
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
3597
|
+
vue.Fragment,
|
|
3598
|
+
null,
|
|
3599
|
+
vue.renderList(_ctx.selectedUsers, (user, index) => {
|
|
3600
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
3601
|
+
class: "tag-wrapper",
|
|
3602
|
+
key: user.id,
|
|
3603
|
+
onClick: vue.withModifiers(($event) => handleTagClick(index), ["stop"])
|
|
3604
|
+
}, [
|
|
3605
|
+
vue.createVNode(UserTag, {
|
|
3606
|
+
active: index === activeTagIndex.value,
|
|
3607
|
+
"current-tenant-id": _ctx.tenantId,
|
|
3608
|
+
draggable: _ctx.draggable,
|
|
3609
|
+
tenants: _ctx.tenants,
|
|
3610
|
+
user,
|
|
3611
|
+
onClick: ($event) => handleTagClick(index),
|
|
3612
|
+
onClose: ($event) => removeUser(user)
|
|
3613
|
+
}, null, 8, ["active", "current-tenant-id", "draggable", "tenants", "user", "onClick", "onClose"]),
|
|
3614
|
+
vue.createCommentVNode(" 在当前激活标签后插入输入框 "),
|
|
3615
|
+
index === activeTagIndex.value && activeTagIndex.value !== _ctx.selectedUsers.length - 1 ? vue.withDirectives((vue.openBlock(), vue.createElementBlock(
|
|
3616
|
+
"input",
|
|
3617
|
+
{
|
|
3618
|
+
key: 0,
|
|
3619
|
+
ref_for: true,
|
|
3620
|
+
ref_key: "inlineInputRef",
|
|
3621
|
+
ref: inlineInputRef,
|
|
3622
|
+
class: "search-input inline",
|
|
3623
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(searchQuery) ? searchQuery.value = $event : null),
|
|
3624
|
+
onFocus: handleInputFocus,
|
|
3625
|
+
onInput: handleInput,
|
|
3626
|
+
onKeydown: handleKeyDown,
|
|
3627
|
+
onPaste: handlePaste
|
|
3628
|
+
},
|
|
3629
|
+
null,
|
|
3630
|
+
544
|
|
3631
|
+
/* NEED_HYDRATION, NEED_PATCH */
|
|
3632
|
+
)), [
|
|
3633
|
+
[vue.vModelText, vue.unref(searchQuery)]
|
|
3634
|
+
]) : vue.createCommentVNode("v-if", true)
|
|
3635
|
+
], 8, _hoisted_1$2);
|
|
3636
|
+
}),
|
|
3637
|
+
128
|
|
3638
|
+
/* KEYED_FRAGMENT */
|
|
3639
|
+
)),
|
|
3640
|
+
vue.createCommentVNode(" 最后一个输入框 "),
|
|
3641
|
+
activeTagIndex.value === -1 || activeTagIndex.value === _ctx.selectedUsers.length - 1 ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
3642
|
+
key: 0,
|
|
3643
|
+
ref_key: "lastInputRef",
|
|
3644
|
+
ref: lastInputRef,
|
|
3645
|
+
class: "search-input last",
|
|
3646
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(searchQuery) ? searchQuery.value = $event : null),
|
|
3647
|
+
placeholder: !_ctx.selectedUsers.length ? _ctx.placeholder : "",
|
|
3648
|
+
onFocus: handleInputFocus,
|
|
3649
|
+
onInput: handleInput,
|
|
3650
|
+
onKeydown: handleKeyDown,
|
|
3651
|
+
onPaste: handlePaste
|
|
3652
|
+
}, null, 40, _hoisted_2$1)), [
|
|
3653
|
+
[vue.vModelText, vue.unref(searchQuery)]
|
|
3654
|
+
]) : vue.createCommentVNode("v-if", true),
|
|
3655
|
+
vue.createCommentVNode(' "我"标签 '),
|
|
3656
|
+
vue.createVNode(MeTag, {
|
|
3657
|
+
"current-user-id": _ctx.currentUserId,
|
|
3658
|
+
"is-disabled": !!_ctx.currentUserId && _ctx.selectedUsers.some((user) => user.id === _ctx.currentUserId),
|
|
3659
|
+
onClick: addCurrentUser
|
|
3660
|
+
}, null, 8, ["current-user-id", "is-disabled"])
|
|
3661
|
+
],
|
|
3662
|
+
512
|
|
3663
|
+
/* NEED_PATCH */
|
|
3664
|
+
)
|
|
3665
|
+
],
|
|
3666
|
+
512
|
|
3667
|
+
/* NEED_PATCH */
|
|
3668
|
+
)) : (vue.openBlock(), vue.createElementBlock(
|
|
3669
|
+
vue.Fragment,
|
|
3670
|
+
{ key: 1 },
|
|
3671
|
+
[
|
|
3672
|
+
vue.createCommentVNode(" 未聚焦状态 - 只读展示模式 "),
|
|
3673
|
+
vue.createElementVNode(
|
|
3674
|
+
"div",
|
|
3675
|
+
{
|
|
3676
|
+
ref_key: "collapsedContainerRef",
|
|
3677
|
+
ref: collapsedContainerRef,
|
|
3678
|
+
class: "tags-container collapsed",
|
|
3679
|
+
onClick: vue.withModifiers(handleFocus, ["stop"])
|
|
3680
|
+
},
|
|
3681
|
+
[
|
|
3682
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
3683
|
+
vue.Fragment,
|
|
3684
|
+
null,
|
|
3685
|
+
vue.renderList(visibleUsers.value, (user) => {
|
|
3686
|
+
return vue.openBlock(), vue.createBlock(UserTag, {
|
|
3583
3687
|
"current-tenant-id": _ctx.tenantId,
|
|
3584
|
-
|
|
3688
|
+
key: user.id,
|
|
3689
|
+
"show-tenant": true,
|
|
3585
3690
|
tenants: _ctx.tenants,
|
|
3586
3691
|
user,
|
|
3587
|
-
onClick:
|
|
3692
|
+
onClick: handleFocus,
|
|
3588
3693
|
onClose: ($event) => removeUser(user)
|
|
3589
|
-
}, null, 8, ["
|
|
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
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
onFocus: handleInputFocus,
|
|
3625
|
-
onInput: handleInput,
|
|
3626
|
-
onKeydown: handleKeyDown,
|
|
3627
|
-
onPaste: handlePaste
|
|
3628
|
-
}, null, 40, _hoisted_2$1)), [
|
|
3629
|
-
[vue.vModelText, vue.unref(searchQuery)]
|
|
3630
|
-
]) : vue.createCommentVNode("v-if", true),
|
|
3631
|
-
vue.createCommentVNode(' "我"标签 '),
|
|
3632
|
-
vue.createVNode(MeTag, {
|
|
3633
|
-
"current-user-id": _ctx.currentUserId,
|
|
3634
|
-
"is-disabled": !!_ctx.currentUserId && _ctx.selectedUsers.some((user) => user.id === _ctx.currentUserId),
|
|
3635
|
-
onClick: addCurrentUser
|
|
3636
|
-
}, null, 8, ["current-user-id", "is-disabled"])
|
|
3637
|
-
],
|
|
3638
|
-
512
|
|
3639
|
-
/* NEED_PATCH */
|
|
3640
|
-
)
|
|
3641
|
-
],
|
|
3642
|
-
512
|
|
3643
|
-
/* NEED_PATCH */
|
|
3644
|
-
)) : (vue.openBlock(), vue.createElementBlock(
|
|
3645
|
-
vue.Fragment,
|
|
3646
|
-
{ key: 1 },
|
|
3647
|
-
[
|
|
3648
|
-
vue.createCommentVNode(" 未聚焦状态 - 只读展示模式 "),
|
|
3649
|
-
vue.createElementVNode(
|
|
3650
|
-
"div",
|
|
3651
|
-
{
|
|
3652
|
-
ref_key: "collapsedContainerRef",
|
|
3653
|
-
ref: collapsedContainerRef,
|
|
3654
|
-
class: "tags-container collapsed",
|
|
3655
|
-
onClick: vue.withModifiers(handleFocus, ["stop"])
|
|
3656
|
-
},
|
|
3657
|
-
[
|
|
3658
|
-
(vue.openBlock(true), vue.createElementBlock(
|
|
3659
|
-
vue.Fragment,
|
|
3660
|
-
null,
|
|
3661
|
-
vue.renderList(visibleUsers.value, (user) => {
|
|
3662
|
-
return vue.openBlock(), vue.createBlock(UserTag, {
|
|
3663
|
-
"current-tenant-id": _ctx.tenantId,
|
|
3664
|
-
key: user.id,
|
|
3665
|
-
"show-tenant": true,
|
|
3666
|
-
tenants: _ctx.tenants,
|
|
3667
|
-
user,
|
|
3668
|
-
onClick: handleFocus,
|
|
3669
|
-
onClose: ($event) => removeUser(user)
|
|
3670
|
-
}, null, 8, ["current-tenant-id", "tenants", "user", "onClose"]);
|
|
3671
|
-
}),
|
|
3672
|
-
128
|
|
3673
|
-
/* KEYED_FRAGMENT */
|
|
3674
|
-
)),
|
|
3675
|
-
vue.createCommentVNode(" 显示折叠标签数量 "),
|
|
3676
|
-
hiddenCount.value > 0 ? vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(bkuiVue.Tag), {
|
|
3677
|
-
key: 0,
|
|
3678
|
-
onClick: vue.withModifiers(handleFocus, ["stop"])
|
|
3679
|
-
}, {
|
|
3680
|
-
default: vue.withCtx(() => [
|
|
3681
|
-
vue.createTextVNode(
|
|
3682
|
-
" +" + vue.toDisplayString(hiddenCount.value),
|
|
3683
|
-
1
|
|
3684
|
-
/* TEXT */
|
|
3685
|
-
)
|
|
3694
|
+
}, null, 8, ["current-tenant-id", "tenants", "user", "onClose"]);
|
|
3695
|
+
}),
|
|
3696
|
+
128
|
|
3697
|
+
/* KEYED_FRAGMENT */
|
|
3698
|
+
)),
|
|
3699
|
+
vue.createCommentVNode(" 显示折叠标签数量 "),
|
|
3700
|
+
hiddenCount.value > 0 ? vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(bkuiVue.Tag), {
|
|
3701
|
+
key: 0,
|
|
3702
|
+
onClick: vue.withModifiers(handleFocus, ["stop"])
|
|
3703
|
+
}, {
|
|
3704
|
+
default: vue.withCtx(() => [
|
|
3705
|
+
vue.createTextVNode(
|
|
3706
|
+
" +" + vue.toDisplayString(hiddenCount.value),
|
|
3707
|
+
1
|
|
3708
|
+
/* TEXT */
|
|
3709
|
+
)
|
|
3710
|
+
]),
|
|
3711
|
+
_: 1
|
|
3712
|
+
/* STABLE */
|
|
3713
|
+
})), [
|
|
3714
|
+
[vue.unref(bkuiVue.bkTooltips), {
|
|
3715
|
+
content: _ctx.selectedUsers.slice(visibleUsers.value.length).map((user) => user.display_name).join(","),
|
|
3716
|
+
placement: "top"
|
|
3717
|
+
}]
|
|
3718
|
+
]) : vue.createCommentVNode("v-if", true),
|
|
3719
|
+
vue.createCommentVNode(" 搜索输入框 "),
|
|
3720
|
+
vue.withDirectives(vue.createElementVNode("input", {
|
|
3721
|
+
ref_key: "collapsedInputRef",
|
|
3722
|
+
ref: collapsedInputRef,
|
|
3723
|
+
class: "search-input collapsed",
|
|
3724
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(searchQuery) ? searchQuery.value = $event : null),
|
|
3725
|
+
placeholder: !_ctx.selectedUsers.length ? _ctx.placeholder : "",
|
|
3726
|
+
onFocus: handleFocus
|
|
3727
|
+
}, null, 40, _hoisted_3$1), [
|
|
3728
|
+
[vue.vModelText, vue.unref(searchQuery)]
|
|
3686
3729
|
]),
|
|
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
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
vue.createCommentVNode(" 下拉选项列表 "),
|
|
3721
|
-
vue.createVNode(SelectionPopover, {
|
|
3722
|
-
"container-width": containerRef.value ? containerRef.value.offsetWidth : "auto",
|
|
3723
|
-
"is-show": showDropdown.value,
|
|
3724
|
-
loading: vue.unref(searchLoading),
|
|
3725
|
-
options: options.value,
|
|
3726
|
-
"search-query": vue.unref(searchQuery),
|
|
3727
|
-
"tenant-id": _ctx.tenantId,
|
|
3728
|
-
tenants: _ctx.tenants,
|
|
3729
|
-
"user-group": _ctx.userGroup,
|
|
3730
|
-
"user-group-name": _ctx.userGroupName,
|
|
3731
|
-
onSelectUser: addUser
|
|
3732
|
-
}, null, 8, ["container-width", "is-show", "loading", "options", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
3733
|
-
])), [
|
|
3734
|
-
[vue.unref(bkuiVue.clickoutside), handleClickOutside]
|
|
3735
|
-
]);
|
|
3730
|
+
vue.createCommentVNode(' 未聚焦状态下的"我"标签 '),
|
|
3731
|
+
vue.createVNode(MeTag, {
|
|
3732
|
+
"current-user-id": _ctx.currentUserId,
|
|
3733
|
+
"is-disabled": !!_ctx.currentUserId && _ctx.selectedUsers.some((user) => user[props.exactSearchKey] === _ctx.currentUserId),
|
|
3734
|
+
onClick: addCurrentUser
|
|
3735
|
+
}, null, 8, ["current-user-id", "is-disabled"])
|
|
3736
|
+
],
|
|
3737
|
+
512
|
|
3738
|
+
/* NEED_PATCH */
|
|
3739
|
+
)
|
|
3740
|
+
],
|
|
3741
|
+
2112
|
|
3742
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
3743
|
+
)),
|
|
3744
|
+
vue.createCommentVNode(" 下拉选项列表 "),
|
|
3745
|
+
vue.createVNode(SelectionPopover, {
|
|
3746
|
+
"container-width": containerRef.value ? containerRef.value.offsetWidth : "auto",
|
|
3747
|
+
"empty-text": _ctx.emptyText,
|
|
3748
|
+
"is-show": showDropdown.value,
|
|
3749
|
+
loading: vue.unref(searchLoading),
|
|
3750
|
+
options: options.value,
|
|
3751
|
+
"search-query": vue.unref(searchQuery),
|
|
3752
|
+
"tenant-id": _ctx.tenantId,
|
|
3753
|
+
tenants: _ctx.tenants,
|
|
3754
|
+
"user-group": _ctx.userGroup,
|
|
3755
|
+
"user-group-name": _ctx.userGroupName,
|
|
3756
|
+
onClickoutside: handleClickOutside,
|
|
3757
|
+
onSelectUser: addUser
|
|
3758
|
+
}, null, 8, ["container-width", "empty-text", "is-show", "loading", "options", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
3759
|
+
],
|
|
3760
|
+
512
|
|
3761
|
+
/* NEED_PATCH */
|
|
3762
|
+
);
|
|
3736
3763
|
};
|
|
3737
3764
|
}
|
|
3738
3765
|
});
|
|
3739
|
-
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
3740
|
-
const _withScopeId = (n) => (vue.pushScopeId("data-v-
|
|
3766
|
+
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-a884849e"]]);
|
|
3767
|
+
const _withScopeId = (n) => (vue.pushScopeId("data-v-ad0d9e2e"), n = n(), vue.popScopeId(), n);
|
|
3741
3768
|
const _hoisted_1$1 = { class: "input-container" };
|
|
3742
3769
|
const _hoisted_2 = {
|
|
3743
3770
|
key: 0,
|
|
@@ -3765,7 +3792,8 @@
|
|
|
3765
3792
|
currentUserId: { default: "" },
|
|
3766
3793
|
exactSearchKey: { default: "bk_username" },
|
|
3767
3794
|
userGroup: { default: () => [] },
|
|
3768
|
-
userGroupName: { default: "用户群组" }
|
|
3795
|
+
userGroupName: { default: "用户群组" },
|
|
3796
|
+
emptyText: { default: "无匹配人员" }
|
|
3769
3797
|
},
|
|
3770
3798
|
emits: ["update:modelValue", "change"],
|
|
3771
3799
|
setup(__props, { emit: __emit }) {
|
|
@@ -3908,6 +3936,7 @@
|
|
|
3908
3936
|
vue.createCommentVNode(" 使用新的公共下拉选项组件 "),
|
|
3909
3937
|
vue.createVNode(SelectionPopover, {
|
|
3910
3938
|
"container-width": containerRef.value ? containerRef.value.offsetWidth : "auto",
|
|
3939
|
+
"empty-text": _ctx.emptyText,
|
|
3911
3940
|
"is-show": showDropdown.value,
|
|
3912
3941
|
loading: isLoading.value,
|
|
3913
3942
|
options: options.value,
|
|
@@ -3917,14 +3946,14 @@
|
|
|
3917
3946
|
"user-group": _ctx.userGroup,
|
|
3918
3947
|
"user-group-name": _ctx.userGroupName,
|
|
3919
3948
|
onSelectUser: addUser
|
|
3920
|
-
}, null, 8, ["container-width", "is-show", "loading", "options", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
3949
|
+
}, null, 8, ["container-width", "empty-text", "is-show", "loading", "options", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
3921
3950
|
])), [
|
|
3922
3951
|
[vue.unref(bkuiVue.clickoutside), handleClickOutside]
|
|
3923
3952
|
]);
|
|
3924
3953
|
};
|
|
3925
3954
|
}
|
|
3926
3955
|
});
|
|
3927
|
-
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
3956
|
+
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-ad0d9e2e"]]);
|
|
3928
3957
|
const _hoisted_1 = {
|
|
3929
3958
|
ref: "containerRef",
|
|
3930
3959
|
class: "bk-user-selector"
|
|
@@ -3944,7 +3973,8 @@
|
|
|
3944
3973
|
currentUserId: { default: "" },
|
|
3945
3974
|
exactSearchKey: { default: "bk_username" },
|
|
3946
3975
|
userGroup: { default: () => [] },
|
|
3947
|
-
userGroupName: { default: "用户群组" }
|
|
3976
|
+
userGroupName: { default: "用户群组" },
|
|
3977
|
+
emptyText: { default: "无匹配人员" }
|
|
3948
3978
|
},
|
|
3949
3979
|
emits: ["update:modelValue", "change"],
|
|
3950
3980
|
setup(__props, { emit: __emit }) {
|
|
@@ -4002,6 +4032,7 @@
|
|
|
4002
4032
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedUser.value = $event),
|
|
4003
4033
|
"api-base-url": _ctx.apiBaseUrl,
|
|
4004
4034
|
"current-user-id": _ctx.currentUserId,
|
|
4035
|
+
"empty-text": _ctx.emptyText,
|
|
4005
4036
|
"exact-search-key": _ctx.exactSearchKey,
|
|
4006
4037
|
placeholder: _ctx.placeholder,
|
|
4007
4038
|
"tenant-id": _ctx.tenantId,
|
|
@@ -4009,7 +4040,7 @@
|
|
|
4009
4040
|
"user-group": _ctx.userGroup,
|
|
4010
4041
|
"user-group-name": _ctx.userGroupName,
|
|
4011
4042
|
onChange: handleUpdateUser
|
|
4012
|
-
}, null, 8, ["modelValue", "api-base-url", "current-user-id", "exact-search-key", "placeholder", "tenant-id", "tenants", "user-group", "user-group-name"])) : (vue.openBlock(), vue.createElementBlock(
|
|
4043
|
+
}, null, 8, ["modelValue", "api-base-url", "current-user-id", "empty-text", "exact-search-key", "placeholder", "tenant-id", "tenants", "user-group", "user-group-name"])) : (vue.openBlock(), vue.createElementBlock(
|
|
4013
4044
|
vue.Fragment,
|
|
4014
4045
|
{ key: 1 },
|
|
4015
4046
|
[
|
|
@@ -4020,6 +4051,7 @@
|
|
|
4020
4051
|
"api-base-url": _ctx.apiBaseUrl,
|
|
4021
4052
|
"current-user-id": _ctx.currentUserId,
|
|
4022
4053
|
draggable: _ctx.draggable,
|
|
4054
|
+
"empty-text": _ctx.emptyText,
|
|
4023
4055
|
"exact-search-key": _ctx.exactSearchKey,
|
|
4024
4056
|
placeholder: _ctx.placeholder,
|
|
4025
4057
|
"selected-users": selectedUsers.value,
|
|
@@ -4028,7 +4060,7 @@
|
|
|
4028
4060
|
"user-group": _ctx.userGroup,
|
|
4029
4061
|
"user-group-name": _ctx.userGroupName,
|
|
4030
4062
|
"onUpdate:selectedUsers": handleUpdateSelectedUsers
|
|
4031
|
-
}, null, 8, ["modelValue", "api-base-url", "current-user-id", "draggable", "exact-search-key", "placeholder", "selected-users", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
4063
|
+
}, 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"])
|
|
4032
4064
|
],
|
|
4033
4065
|
2112
|
|
4034
4066
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
@@ -4040,7 +4072,7 @@
|
|
|
4040
4072
|
};
|
|
4041
4073
|
}
|
|
4042
4074
|
});
|
|
4043
|
-
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4075
|
+
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6fd92757"]]);
|
|
4044
4076
|
exports2.BkUserSelector = BkUserSelector;
|
|
4045
4077
|
exports2.default = BkUserSelector;
|
|
4046
4078
|
Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|