@blueking/bk-user-selector 0.0.4 → 0.0.6
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 +4 -4
- package/package.json +1 -1
- package/typings/api/user.d.ts +2 -2
- package/typings/components/multiple-selector.vue.d.ts +4 -4
- package/typings/components/user-selector.vue.d.ts +4 -4
- package/typings/types/index.d.ts +7 -3
- package/vue2/index.es.min.js +35 -31
- package/vue2/index.iife.min.js +36 -32
- package/vue2/index.umd.min.js +36 -32
- package/vue2/vue2.css +35 -35
- package/vue3/index.es.min.js +35 -31
- package/vue3/index.iife.min.js +36 -32
- package/vue3/index.umd.min.js +36 -32
- package/vue3/vue3.css +35 -35
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 = ".user-tag[data-v-203c36cb] {\n margin-right: 4px;\n}\n.user-tag.draggable[data-v-203c36cb] {\n cursor: move;\n}\n.user-tag.active[data-v-203c36cb] {\n background-color: #e1ecff;\n border-color: #3a84ff;\n}\n.user-tag .tag-content .user-name[data-v-203c36cb] {\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-203c36cb] {\n color: #f59500;\n margin-left: 3px;\n white-space: nowrap;\n padding: 0 3px;\n border-radius: 2px;\n}.bk-user-selector-popover.bk-popover.bk-pop2-content {\n padding: 0;\n}.multiple-selector[data-v-
|
|
6
|
+
__vite_style__.textContent = ".user-tag[data-v-203c36cb] {\n margin-right: 4px;\n}\n.user-tag.draggable[data-v-203c36cb] {\n cursor: move;\n}\n.user-tag.active[data-v-203c36cb] {\n background-color: #e1ecff;\n border-color: #3a84ff;\n}\n.user-tag .tag-content .user-name[data-v-203c36cb] {\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-203c36cb] {\n color: #f59500;\n margin-left: 3px;\n white-space: nowrap;\n padding: 0 3px;\n border-radius: 2px;\n}.bk-user-selector-popover.bk-popover.bk-pop2-content {\n padding: 0;\n}.multiple-selector[data-v-50540b99] {\n position: relative;\n width: 100%;\n}\n.multiple-selector .tags-container[data-v-50540b99] {\n min-height: 32px;\n border: 1px solid #dcdee5;\n border-radius: 2px;\n padding: 1px 4px;\n transition: all 0.2s ease;\n background-color: #fff;\n}\n.multiple-selector .tags-container.focused[data-v-50540b99] {\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-50540b99] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n}\n.multiple-selector .tag-list[data-v-50540b99] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n}\n.multiple-selector .tag-wrapper[data-v-50540b99] {\n display: inline-flex;\n align-items: center;\n max-width: 100%;\n}\n.multiple-selector .search-input[data-v-50540b99] {\n outline: none;\n border: none;\n height: 28px;\n min-width: 10px;\n background: transparent;\n}\n.multiple-selector .search-input[data-v-50540b99]::placeholder {\n color: #c4c6cc;\n}\n.multiple-selector .search-input.inline[data-v-50540b99] {\n min-width: 10px;\n}\n.multiple-selector .search-input.last[data-v-50540b99], .multiple-selector .search-input.collapsed[data-v-50540b99] {\n flex: 1;\n min-width: 60px;\n}\n.dropdown-content[data-v-50540b99] {\n min-height: 40px;\n max-height: 300px;\n overflow-y: auto;\n padding: 5px 0;\n}\n.dropdown-content .no-data[data-v-50540b99] {\n padding: 10px;\n text-align: center;\n color: #979ba5;\n}\n.dropdown-content .user-option[data-v-50540b99] {\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-50540b99]:hover {\n background-color: #f5f7fa;\n}\n.dropdown-content .user-option .tenant-name[data-v-50540b99] {\n color: #f59500;\n margin-left: 4px;\n padding: 0 4px;\n}\n.me-tag[data-v-50540b99] {\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-50540b99]:hover {\n background-color: #cddffe;\n color: #3a84ff;\n}\n.me-tag.disabled[data-v-50540b99] {\n background-color: #f0f1f5;\n color: #c4c6cc;\n cursor: not-allowed;\n}.single-selector[data-v-308925e9] {\n position: relative;\n width: 100%;\n}\n.input-container[data-v-308925e9] {\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-308925e9]: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-308925e9] {\n flex: 1;\n outline: none;\n border: none;\n height: 30px;\n background: transparent;\n}\n.search-input[data-v-308925e9]::placeholder {\n color: #c4c6cc;\n}\n.selected-user[data-v-308925e9] {\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-308925e9] {\n color: #f59500;\n margin-left: 4px;\n}\n.selected-user .close-icon[data-v-308925e9] {\n margin-left: 4px;\n cursor: pointer;\n font-style: normal;\n}\n.dropdown-content[data-v-308925e9] {\n min-height: 40px;\n max-height: 300px;\n overflow-y: auto;\n padding: 5px 0;\n}\n.dropdown-content .no-data[data-v-308925e9] {\n padding: 10px;\n text-align: center;\n color: #979ba5;\n}\n.dropdown-content .user-option[data-v-308925e9] {\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-308925e9]:hover {\n background-color: #f5f7fa;\n}\n.dropdown-content .user-option .tenant-name[data-v-308925e9] {\n color: #f59500;\n margin-left: 4px;\n padding: 0 4px;\n}\n.me-tag[data-v-308925e9] {\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-308925e9]:hover {\n background-color: #cddffe;\n color: #3a84ff;\n}\n.me-tag.disabled[data-v-308925e9] {\n background-color: #f0f1f5;\n color: #c4c6cc;\n cursor: not-allowed;\n}.bk-user-selector[data-v-fe084750] {\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) {
|
|
@@ -53,13 +53,13 @@
|
|
|
53
53
|
return [];
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
const lookupUsers = async (apiBaseUrl = "", tenantId = "",
|
|
56
|
+
const lookupUsers = async (apiBaseUrl = "", tenantId = "", exactSearchKey = "bk_username", users = []) => {
|
|
57
57
|
if (users.length === 0 || !apiBaseUrl || !tenantId) {
|
|
58
58
|
console.warn("批量查找用户需要提供有效的apiBaseUrl、租户ID和至少一个用户名");
|
|
59
59
|
return [];
|
|
60
60
|
}
|
|
61
61
|
try {
|
|
62
|
-
const url = `${apiBaseUrl}/api/v3/open-web/tenant/users/-/lookup/?lookups=${users.join(",")}&lookup_fields=${
|
|
62
|
+
const url = `${apiBaseUrl}/api/v3/open-web/tenant/users/-/lookup/?lookups=${users.join(",")}&lookup_fields=${exactSearchKey}`;
|
|
63
63
|
const response = await fetch(url, {
|
|
64
64
|
method: "GET",
|
|
65
65
|
headers: {
|
|
@@ -82,7 +82,8 @@
|
|
|
82
82
|
return users.map((user) => ({
|
|
83
83
|
id: user.bk_username,
|
|
84
84
|
name: user.display_name,
|
|
85
|
-
tenantId: user.owner_tenant_id
|
|
85
|
+
tenantId: user.owner_tenant_id,
|
|
86
|
+
...user
|
|
86
87
|
}));
|
|
87
88
|
};
|
|
88
89
|
const useTenantData = (apiBaseUrl, tenantId) => {
|
|
@@ -3108,7 +3109,7 @@
|
|
|
3108
3109
|
/**
|
|
3109
3110
|
* 精确查找key
|
|
3110
3111
|
*/
|
|
3111
|
-
|
|
3112
|
+
exactSearchKey: {
|
|
3112
3113
|
type: String,
|
|
3113
3114
|
default: "bk_username"
|
|
3114
3115
|
}
|
|
@@ -3226,7 +3227,7 @@
|
|
|
3226
3227
|
const addCurrentUser = async () => {
|
|
3227
3228
|
if (!props.currentUserId || props.selectedUsers.some((user) => user.id === props.currentUserId)) return;
|
|
3228
3229
|
try {
|
|
3229
|
-
const result = await lookupUsers(props.apiBaseUrl, props.tenantId, props.
|
|
3230
|
+
const result = await lookupUsers(props.apiBaseUrl, props.tenantId, props.exactSearchKey, [props.currentUserId]);
|
|
3230
3231
|
const formattedUsers = formatUsers(result);
|
|
3231
3232
|
if (formattedUsers.length > 0) {
|
|
3232
3233
|
if (!props.selectedUsers.some((item) => item.id === formattedUsers[0].id)) {
|
|
@@ -3247,7 +3248,7 @@
|
|
|
3247
3248
|
if (pastedText.trim()) {
|
|
3248
3249
|
try {
|
|
3249
3250
|
const users = pastedText.trim().split(/[,,;\n\s]+/).filter(Boolean);
|
|
3250
|
-
const result = await lookupUsers(props.apiBaseUrl, props.tenantId, props.
|
|
3251
|
+
const result = await lookupUsers(props.apiBaseUrl, props.tenantId, props.exactSearchKey, users);
|
|
3251
3252
|
const formattedUsers = formatUsers(result);
|
|
3252
3253
|
if (formattedUsers.length > 0) {
|
|
3253
3254
|
const updatedUsers = [...props.selectedUsers, ...formattedUsers];
|
|
@@ -3424,16 +3425,17 @@
|
|
|
3424
3425
|
[vue.vModelText, vue.unref(searchQuery)]
|
|
3425
3426
|
]) : vue.createCommentVNode("v-if", true),
|
|
3426
3427
|
vue.createCommentVNode(' "我"标签 '),
|
|
3427
|
-
vue.
|
|
3428
|
+
__props.currentUserId ? (vue.openBlock(), vue.createElementBlock(
|
|
3428
3429
|
"div",
|
|
3429
3430
|
{
|
|
3431
|
+
key: 1,
|
|
3430
3432
|
class: vue.normalizeClass(["me-tag", { disabled: __props.currentUserId && __props.selectedUsers.some((user) => user.id === __props.currentUserId) }]),
|
|
3431
3433
|
onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => addCurrentUser(), ["stop"]))
|
|
3432
3434
|
},
|
|
3433
3435
|
" 我 ",
|
|
3434
3436
|
2
|
|
3435
3437
|
/* CLASS */
|
|
3436
|
-
)
|
|
3438
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
3437
3439
|
],
|
|
3438
3440
|
512
|
|
3439
3441
|
/* NEED_PATCH */
|
|
@@ -3499,16 +3501,17 @@
|
|
|
3499
3501
|
[vue.vModelText, vue.unref(searchQuery)]
|
|
3500
3502
|
]),
|
|
3501
3503
|
vue.createCommentVNode(' 未聚焦状态下的"我"标签 '),
|
|
3502
|
-
vue.
|
|
3504
|
+
__props.currentUserId ? (vue.openBlock(), vue.createElementBlock(
|
|
3503
3505
|
"div",
|
|
3504
3506
|
{
|
|
3505
|
-
|
|
3507
|
+
key: 1,
|
|
3508
|
+
class: vue.normalizeClass(["me-tag", { disabled: __props.currentUserId && __props.selectedUsers.some((user) => user[props.exactSearchKey] === __props.currentUserId) }]),
|
|
3506
3509
|
onClick: _cache[4] || (_cache[4] = vue.withModifiers(($event) => addCurrentUser(), ["stop"]))
|
|
3507
3510
|
},
|
|
3508
3511
|
" 我 ",
|
|
3509
3512
|
2
|
|
3510
3513
|
/* CLASS */
|
|
3511
|
-
)
|
|
3514
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
3512
3515
|
],
|
|
3513
3516
|
512
|
|
3514
3517
|
/* NEED_PATCH */
|
|
@@ -3585,8 +3588,8 @@
|
|
|
3585
3588
|
};
|
|
3586
3589
|
}
|
|
3587
3590
|
});
|
|
3588
|
-
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
3589
|
-
const _withScopeId = (n) => (vue.pushScopeId("data-v-
|
|
3591
|
+
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-50540b99"]]);
|
|
3592
|
+
const _withScopeId = (n) => (vue.pushScopeId("data-v-308925e9"), n = n(), vue.popScopeId(), n);
|
|
3590
3593
|
const _hoisted_1$1 = { class: "input-container" };
|
|
3591
3594
|
const _hoisted_2 = {
|
|
3592
3595
|
key: 0,
|
|
@@ -3621,7 +3624,7 @@
|
|
|
3621
3624
|
tenantId: {},
|
|
3622
3625
|
tenants: {},
|
|
3623
3626
|
currentUserId: {},
|
|
3624
|
-
|
|
3627
|
+
exactSearchKey: {}
|
|
3625
3628
|
},
|
|
3626
3629
|
emits: ["update:modelValue", "change"],
|
|
3627
3630
|
setup(__props, { emit: __emit }) {
|
|
@@ -3641,7 +3644,7 @@
|
|
|
3641
3644
|
if (typeof props.modelValue === "string" && props.modelValue) {
|
|
3642
3645
|
try {
|
|
3643
3646
|
isLoading.value = true;
|
|
3644
|
-
const result = await lookupUsers(props.apiBaseUrl || "", props.tenantId || "", props.
|
|
3647
|
+
const result = await lookupUsers(props.apiBaseUrl || "", props.tenantId || "", props.exactSearchKey, [
|
|
3645
3648
|
props.modelValue
|
|
3646
3649
|
]);
|
|
3647
3650
|
options.value = formatUsers(result);
|
|
@@ -3655,7 +3658,7 @@
|
|
|
3655
3658
|
const addCurrentUser = async () => {
|
|
3656
3659
|
if (!props.currentUserId || selectedUser.value === props.currentUserId) return;
|
|
3657
3660
|
try {
|
|
3658
|
-
const result = await lookupUsers(props.apiBaseUrl, props.tenantId, props.
|
|
3661
|
+
const result = await lookupUsers(props.apiBaseUrl, props.tenantId, props.exactSearchKey, [props.currentUserId]);
|
|
3659
3662
|
const formattedResults = formatUsers(result);
|
|
3660
3663
|
if (formattedResults.length > 0) {
|
|
3661
3664
|
options.value = formattedResults;
|
|
@@ -3710,6 +3713,7 @@
|
|
|
3710
3713
|
emit("change", selectedUserInfo2 || null);
|
|
3711
3714
|
});
|
|
3712
3715
|
return (_ctx, _cache) => {
|
|
3716
|
+
var _a;
|
|
3713
3717
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
3714
3718
|
ref_key: "containerRef",
|
|
3715
3719
|
ref: containerRef,
|
|
@@ -3730,7 +3734,7 @@
|
|
|
3730
3734
|
1
|
|
3731
3735
|
/* TEXT */
|
|
3732
3736
|
),
|
|
3733
|
-
selectedUserInfo.value.tenantId !==
|
|
3737
|
+
selectedUserInfo.value.tenantId !== _ctx.tenantId && selectedUserInfo.value.tenantId && _ctx.tenants[selectedUserInfo.value.tenantId] ? (vue.openBlock(), vue.createElementBlock(
|
|
3734
3738
|
"span",
|
|
3735
3739
|
_hoisted_2,
|
|
3736
3740
|
"@" + vue.toDisplayString(_ctx.tenants[selectedUserInfo.value.tenantId]),
|
|
@@ -3744,18 +3748,18 @@
|
|
|
3744
3748
|
ref: inputRef,
|
|
3745
3749
|
class: "search-input",
|
|
3746
3750
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchQuery.value = $event),
|
|
3747
|
-
placeholder: selectedUserInfo.value ? "" :
|
|
3751
|
+
placeholder: selectedUserInfo.value ? "" : _ctx.placeholder,
|
|
3748
3752
|
onFocus: handleInputFocus,
|
|
3749
3753
|
onInput: handleInput
|
|
3750
3754
|
}, null, 40, _hoisted_4), [
|
|
3751
3755
|
[vue.vModelText, searchQuery.value]
|
|
3752
3756
|
]),
|
|
3753
3757
|
vue.createCommentVNode(' "我"标签 '),
|
|
3754
|
-
|
|
3758
|
+
_ctx.currentUserId ? (vue.openBlock(), vue.createElementBlock(
|
|
3755
3759
|
"div",
|
|
3756
3760
|
{
|
|
3757
3761
|
key: 1,
|
|
3758
|
-
class: vue.normalizeClass(["me-tag", { disabled:
|
|
3762
|
+
class: vue.normalizeClass(["me-tag", { disabled: _ctx.currentUserId && ((_a = selectedUserInfo.value) == null ? void 0 : _a[_ctx.exactSearchKey]) === _ctx.currentUserId }]),
|
|
3759
3763
|
onClick: _cache[1] || (_cache[1] = ($event) => addCurrentUser())
|
|
3760
3764
|
},
|
|
3761
3765
|
" 我 ",
|
|
@@ -3805,10 +3809,10 @@
|
|
|
3805
3809
|
1
|
|
3806
3810
|
/* TEXT */
|
|
3807
3811
|
),
|
|
3808
|
-
user.tenantId !==
|
|
3812
|
+
user.tenantId !== _ctx.tenantId && user.tenantId && _ctx.tenants[user.tenantId] ? (vue.openBlock(), vue.createElementBlock(
|
|
3809
3813
|
"span",
|
|
3810
3814
|
_hoisted_7,
|
|
3811
|
-
"@" + vue.toDisplayString(
|
|
3815
|
+
"@" + vue.toDisplayString(_ctx.tenants[user.tenantId]),
|
|
3812
3816
|
1
|
|
3813
3817
|
/* TEXT */
|
|
3814
3818
|
)) : vue.createCommentVNode("v-if", true)
|
|
@@ -3831,7 +3835,7 @@
|
|
|
3831
3835
|
};
|
|
3832
3836
|
}
|
|
3833
3837
|
});
|
|
3834
|
-
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
3838
|
+
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-308925e9"]]);
|
|
3835
3839
|
const _hoisted_1 = { class: "bk-user-selector" };
|
|
3836
3840
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
3837
3841
|
...{
|
|
@@ -3846,7 +3850,7 @@
|
|
|
3846
3850
|
draggable: { type: Boolean, default: false },
|
|
3847
3851
|
multiple: { type: Boolean, default: false },
|
|
3848
3852
|
currentUserId: { default: "" },
|
|
3849
|
-
|
|
3853
|
+
exactSearchKey: { default: "" }
|
|
3850
3854
|
},
|
|
3851
3855
|
emits: ["update:modelValue", "change"],
|
|
3852
3856
|
setup(__props, { emit: __emit }) {
|
|
@@ -3863,8 +3867,8 @@
|
|
|
3863
3867
|
const ids = Array.isArray(props.modelValue) ? props.modelValue : [];
|
|
3864
3868
|
if (ids.length > 0) {
|
|
3865
3869
|
try {
|
|
3866
|
-
console.log(props.
|
|
3867
|
-
const result = await lookupUsers(props.apiBaseUrl, props.tenantId, props.
|
|
3870
|
+
console.log(props.exactSearchKey);
|
|
3871
|
+
const result = await lookupUsers(props.apiBaseUrl, props.tenantId, props.exactSearchKey, ids);
|
|
3868
3872
|
selectedUsers.value = formatUsers(result);
|
|
3869
3873
|
} catch (error) {
|
|
3870
3874
|
console.error("获取选中用户信息失败:", error);
|
|
@@ -3902,12 +3906,12 @@
|
|
|
3902
3906
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedUser.value = $event),
|
|
3903
3907
|
"api-base-url": _ctx.apiBaseUrl,
|
|
3904
3908
|
"current-user-id": _ctx.currentUserId,
|
|
3905
|
-
"exact-key": _ctx.
|
|
3909
|
+
"exact-search-key": _ctx.exactSearchKey,
|
|
3906
3910
|
placeholder: _ctx.placeholder,
|
|
3907
3911
|
"tenant-id": _ctx.tenantId,
|
|
3908
3912
|
tenants: vue.unref(tenants),
|
|
3909
3913
|
onChange: handleUpdateUser
|
|
3910
|
-
}, null, 8, ["modelValue", "api-base-url", "current-user-id", "exact-key", "placeholder", "tenant-id", "tenants"])) : (vue.openBlock(), vue.createElementBlock(
|
|
3914
|
+
}, null, 8, ["modelValue", "api-base-url", "current-user-id", "exact-search-key", "placeholder", "tenant-id", "tenants"])) : (vue.openBlock(), vue.createElementBlock(
|
|
3911
3915
|
vue.Fragment,
|
|
3912
3916
|
{ key: 1 },
|
|
3913
3917
|
[
|
|
@@ -3918,13 +3922,13 @@
|
|
|
3918
3922
|
"api-base-url": _ctx.apiBaseUrl,
|
|
3919
3923
|
"current-user-id": _ctx.currentUserId,
|
|
3920
3924
|
draggable: _ctx.draggable,
|
|
3921
|
-
"exact-key": _ctx.
|
|
3925
|
+
"exact-search-key": _ctx.exactSearchKey,
|
|
3922
3926
|
placeholder: _ctx.placeholder,
|
|
3923
3927
|
"selected-users": selectedUsers.value,
|
|
3924
3928
|
"tenant-id": _ctx.tenantId,
|
|
3925
3929
|
tenants: vue.unref(tenants),
|
|
3926
3930
|
"onUpdate:selectedUsers": handleUpdateSelectedUsers
|
|
3927
|
-
}, null, 8, ["modelValue", "api-base-url", "current-user-id", "draggable", "exact-key", "placeholder", "selected-users", "tenant-id", "tenants"])
|
|
3931
|
+
}, null, 8, ["modelValue", "api-base-url", "current-user-id", "draggable", "exact-search-key", "placeholder", "selected-users", "tenant-id", "tenants"])
|
|
3928
3932
|
],
|
|
3929
3933
|
2112
|
|
3930
3934
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
@@ -3933,7 +3937,7 @@
|
|
|
3933
3937
|
};
|
|
3934
3938
|
}
|
|
3935
3939
|
});
|
|
3936
|
-
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
3940
|
+
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fe084750"]]);
|
|
3937
3941
|
exports2.BkUserSelector = BkUserSelector;
|
|
3938
3942
|
exports2.default = BkUserSelector;
|
|
3939
3943
|
Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
package/vue3/vue3.css
CHANGED
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
border-radius: 2px;
|
|
23
23
|
}.bk-user-selector-popover.bk-popover.bk-pop2-content {
|
|
24
24
|
padding: 0;
|
|
25
|
-
}.multiple-selector[data-v-
|
|
25
|
+
}.multiple-selector[data-v-50540b99] {
|
|
26
26
|
position: relative;
|
|
27
27
|
width: 100%;
|
|
28
28
|
}
|
|
29
|
-
.multiple-selector .tags-container[data-v-
|
|
29
|
+
.multiple-selector .tags-container[data-v-50540b99] {
|
|
30
30
|
min-height: 32px;
|
|
31
31
|
border: 1px solid #dcdee5;
|
|
32
32
|
border-radius: 2px;
|
|
@@ -34,69 +34,69 @@
|
|
|
34
34
|
transition: all 0.2s ease;
|
|
35
35
|
background-color: #fff;
|
|
36
36
|
}
|
|
37
|
-
.multiple-selector .tags-container.focused[data-v-
|
|
37
|
+
.multiple-selector .tags-container.focused[data-v-50540b99] {
|
|
38
38
|
border-color: #3a84ff;
|
|
39
39
|
box-shadow: 0 0 0 2px rgba(58, 132, 255, 0.1);
|
|
40
40
|
}
|
|
41
|
-
.multiple-selector .tags-container.collapsed[data-v-
|
|
41
|
+
.multiple-selector .tags-container.collapsed[data-v-50540b99] {
|
|
42
42
|
display: flex;
|
|
43
43
|
flex-wrap: wrap;
|
|
44
44
|
align-items: center;
|
|
45
45
|
}
|
|
46
|
-
.multiple-selector .tag-list[data-v-
|
|
46
|
+
.multiple-selector .tag-list[data-v-50540b99] {
|
|
47
47
|
display: flex;
|
|
48
48
|
flex-wrap: wrap;
|
|
49
49
|
align-items: center;
|
|
50
50
|
}
|
|
51
|
-
.multiple-selector .tag-wrapper[data-v-
|
|
51
|
+
.multiple-selector .tag-wrapper[data-v-50540b99] {
|
|
52
52
|
display: inline-flex;
|
|
53
53
|
align-items: center;
|
|
54
54
|
max-width: 100%;
|
|
55
55
|
}
|
|
56
|
-
.multiple-selector .search-input[data-v-
|
|
56
|
+
.multiple-selector .search-input[data-v-50540b99] {
|
|
57
57
|
outline: none;
|
|
58
58
|
border: none;
|
|
59
59
|
height: 28px;
|
|
60
60
|
min-width: 10px;
|
|
61
61
|
background: transparent;
|
|
62
62
|
}
|
|
63
|
-
.multiple-selector .search-input[data-v-
|
|
63
|
+
.multiple-selector .search-input[data-v-50540b99]::placeholder {
|
|
64
64
|
color: #c4c6cc;
|
|
65
65
|
}
|
|
66
|
-
.multiple-selector .search-input.inline[data-v-
|
|
66
|
+
.multiple-selector .search-input.inline[data-v-50540b99] {
|
|
67
67
|
min-width: 10px;
|
|
68
68
|
}
|
|
69
|
-
.multiple-selector .search-input.last[data-v-
|
|
69
|
+
.multiple-selector .search-input.last[data-v-50540b99], .multiple-selector .search-input.collapsed[data-v-50540b99] {
|
|
70
70
|
flex: 1;
|
|
71
71
|
min-width: 60px;
|
|
72
72
|
}
|
|
73
|
-
.dropdown-content[data-v-
|
|
73
|
+
.dropdown-content[data-v-50540b99] {
|
|
74
74
|
min-height: 40px;
|
|
75
75
|
max-height: 300px;
|
|
76
76
|
overflow-y: auto;
|
|
77
77
|
padding: 5px 0;
|
|
78
78
|
}
|
|
79
|
-
.dropdown-content .no-data[data-v-
|
|
79
|
+
.dropdown-content .no-data[data-v-50540b99] {
|
|
80
80
|
padding: 10px;
|
|
81
81
|
text-align: center;
|
|
82
82
|
color: #979ba5;
|
|
83
83
|
}
|
|
84
|
-
.dropdown-content .user-option[data-v-
|
|
84
|
+
.dropdown-content .user-option[data-v-50540b99] {
|
|
85
85
|
padding: 8px 12px;
|
|
86
86
|
cursor: pointer;
|
|
87
87
|
display: flex;
|
|
88
88
|
align-items: center;
|
|
89
89
|
height: 32px;
|
|
90
90
|
}
|
|
91
|
-
.dropdown-content .user-option[data-v-
|
|
91
|
+
.dropdown-content .user-option[data-v-50540b99]:hover {
|
|
92
92
|
background-color: #f5f7fa;
|
|
93
93
|
}
|
|
94
|
-
.dropdown-content .user-option .tenant-name[data-v-
|
|
94
|
+
.dropdown-content .user-option .tenant-name[data-v-50540b99] {
|
|
95
95
|
color: #f59500;
|
|
96
96
|
margin-left: 4px;
|
|
97
97
|
padding: 0 4px;
|
|
98
98
|
}
|
|
99
|
-
.me-tag[data-v-
|
|
99
|
+
.me-tag[data-v-50540b99] {
|
|
100
100
|
display: inline-flex;
|
|
101
101
|
align-items: center;
|
|
102
102
|
justify-content: center;
|
|
@@ -114,19 +114,19 @@
|
|
|
114
114
|
transform: translateY(-50%);
|
|
115
115
|
z-index: 1;
|
|
116
116
|
}
|
|
117
|
-
.me-tag[data-v-
|
|
117
|
+
.me-tag[data-v-50540b99]:hover {
|
|
118
118
|
background-color: #cddffe;
|
|
119
119
|
color: #3a84ff;
|
|
120
120
|
}
|
|
121
|
-
.me-tag.disabled[data-v-
|
|
121
|
+
.me-tag.disabled[data-v-50540b99] {
|
|
122
122
|
background-color: #f0f1f5;
|
|
123
123
|
color: #c4c6cc;
|
|
124
124
|
cursor: not-allowed;
|
|
125
|
-
}.single-selector[data-v-
|
|
125
|
+
}.single-selector[data-v-308925e9] {
|
|
126
126
|
position: relative;
|
|
127
127
|
width: 100%;
|
|
128
128
|
}
|
|
129
|
-
.input-container[data-v-
|
|
129
|
+
.input-container[data-v-308925e9] {
|
|
130
130
|
position: relative;
|
|
131
131
|
display: flex;
|
|
132
132
|
align-items: center;
|
|
@@ -136,21 +136,21 @@
|
|
|
136
136
|
padding: 0 8px;
|
|
137
137
|
background-color: #fff;
|
|
138
138
|
}
|
|
139
|
-
.input-container[data-v-
|
|
139
|
+
.input-container[data-v-308925e9]:focus-within {
|
|
140
140
|
border-color: #3a84ff;
|
|
141
141
|
box-shadow: 0 0 0 2px rgba(58, 132, 255, 0.1);
|
|
142
142
|
}
|
|
143
|
-
.search-input[data-v-
|
|
143
|
+
.search-input[data-v-308925e9] {
|
|
144
144
|
flex: 1;
|
|
145
145
|
outline: none;
|
|
146
146
|
border: none;
|
|
147
147
|
height: 30px;
|
|
148
148
|
background: transparent;
|
|
149
149
|
}
|
|
150
|
-
.search-input[data-v-
|
|
150
|
+
.search-input[data-v-308925e9]::placeholder {
|
|
151
151
|
color: #c4c6cc;
|
|
152
152
|
}
|
|
153
|
-
.selected-user[data-v-
|
|
153
|
+
.selected-user[data-v-308925e9] {
|
|
154
154
|
display: inline-flex;
|
|
155
155
|
align-items: center;
|
|
156
156
|
background-color: #f0f1f5;
|
|
@@ -160,42 +160,42 @@
|
|
|
160
160
|
height: 24px;
|
|
161
161
|
max-width: calc(100% - 32px);
|
|
162
162
|
}
|
|
163
|
-
.selected-user .tenant-name[data-v-
|
|
163
|
+
.selected-user .tenant-name[data-v-308925e9] {
|
|
164
164
|
color: #f59500;
|
|
165
165
|
margin-left: 4px;
|
|
166
166
|
}
|
|
167
|
-
.selected-user .close-icon[data-v-
|
|
167
|
+
.selected-user .close-icon[data-v-308925e9] {
|
|
168
168
|
margin-left: 4px;
|
|
169
169
|
cursor: pointer;
|
|
170
170
|
font-style: normal;
|
|
171
171
|
}
|
|
172
|
-
.dropdown-content[data-v-
|
|
172
|
+
.dropdown-content[data-v-308925e9] {
|
|
173
173
|
min-height: 40px;
|
|
174
174
|
max-height: 300px;
|
|
175
175
|
overflow-y: auto;
|
|
176
176
|
padding: 5px 0;
|
|
177
177
|
}
|
|
178
|
-
.dropdown-content .no-data[data-v-
|
|
178
|
+
.dropdown-content .no-data[data-v-308925e9] {
|
|
179
179
|
padding: 10px;
|
|
180
180
|
text-align: center;
|
|
181
181
|
color: #979ba5;
|
|
182
182
|
}
|
|
183
|
-
.dropdown-content .user-option[data-v-
|
|
183
|
+
.dropdown-content .user-option[data-v-308925e9] {
|
|
184
184
|
padding: 8px 12px;
|
|
185
185
|
cursor: pointer;
|
|
186
186
|
display: flex;
|
|
187
187
|
align-items: center;
|
|
188
188
|
height: 32px;
|
|
189
189
|
}
|
|
190
|
-
.dropdown-content .user-option[data-v-
|
|
190
|
+
.dropdown-content .user-option[data-v-308925e9]:hover {
|
|
191
191
|
background-color: #f5f7fa;
|
|
192
192
|
}
|
|
193
|
-
.dropdown-content .user-option .tenant-name[data-v-
|
|
193
|
+
.dropdown-content .user-option .tenant-name[data-v-308925e9] {
|
|
194
194
|
color: #f59500;
|
|
195
195
|
margin-left: 4px;
|
|
196
196
|
padding: 0 4px;
|
|
197
197
|
}
|
|
198
|
-
.me-tag[data-v-
|
|
198
|
+
.me-tag[data-v-308925e9] {
|
|
199
199
|
display: inline-flex;
|
|
200
200
|
align-items: center;
|
|
201
201
|
justify-content: center;
|
|
@@ -213,15 +213,15 @@
|
|
|
213
213
|
transform: translateY(-50%);
|
|
214
214
|
z-index: 1;
|
|
215
215
|
}
|
|
216
|
-
.me-tag[data-v-
|
|
216
|
+
.me-tag[data-v-308925e9]:hover {
|
|
217
217
|
background-color: #cddffe;
|
|
218
218
|
color: #3a84ff;
|
|
219
219
|
}
|
|
220
|
-
.me-tag.disabled[data-v-
|
|
220
|
+
.me-tag.disabled[data-v-308925e9] {
|
|
221
221
|
background-color: #f0f1f5;
|
|
222
222
|
color: #c4c6cc;
|
|
223
223
|
cursor: not-allowed;
|
|
224
|
-
}.bk-user-selector[data-v-
|
|
224
|
+
}.bk-user-selector[data-v-fe084750] {
|
|
225
225
|
width: 100%;
|
|
226
226
|
position: relative;
|
|
227
227
|
font-size: 12px;
|