@blueking/bk-user-selector 0.0.7 → 0.0.9
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 +15 -0
- package/package.json +1 -1
- package/typings/components/multiple-selector.vue.d.ts +47 -168
- package/typings/components/single-selector.vue.d.ts +41 -3
- package/typings/components/user-selector.vue.d.ts +1 -1
- package/typings/types/index.d.ts +21 -0
- package/vue2/index.es.min.js +55 -114
- package/vue2/index.iife.min.js +56 -115
- package/vue2/index.umd.min.js +56 -115
- package/vue2/vue2.css +26 -26
- package/vue3/index.es.min.js +54 -114
- package/vue3/index.iife.min.js +55 -115
- package/vue3/index.umd.min.js +54 -114
- 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-13504557] {\n min-height: 40px;\n max-height: 300px;\n overflow-y: auto;\n padding: 5px 0;\n}\n.dropdown-content .no-data[data-v-13504557] {\n padding: 10px;\n text-align: center;\n color: #979ba5;\n}\n.dropdown-content .user-group .group-header[data-v-13504557] {\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-13504557] {\n margin-left: 4px;\n}\n.dropdown-content .user-option[data-v-13504557] {\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-13504557]:hover {\n background-color: #f5f7fa;\n}\n.dropdown-content .user-option .tenant-name[data-v-13504557] {\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-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}.multiple-selector[data-v-1a376d26] {\n position: relative;\n width: 100%;\n}\n.multiple-selector .tags-container[data-v-1a376d26] {\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-1a376d26] {\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-1a376d26] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n}\n.multiple-selector .tag-list[data-v-1a376d26] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n}\n.multiple-selector .tag-wrapper[data-v-1a376d26] {\n display: inline-flex;\n align-items: center;\n max-width: 100%;\n}\n.multiple-selector .search-input[data-v-1a376d26] {\n outline: none;\n border: none;\n height: 28px;\n min-width: 10px;\n background: transparent;\n}\n.multiple-selector .search-input[data-v-1a376d26]::placeholder {\n color: #c4c6cc;\n}\n.multiple-selector .search-input.inline[data-v-1a376d26] {\n min-width: 10px;\n}\n.multiple-selector .search-input.last[data-v-1a376d26], .multiple-selector .search-input.collapsed[data-v-1a376d26] {\n flex: 1;\n min-width: 60px;\n}.single-selector[data-v-3926de45] {\n position: relative;\n width: 100%;\n}\n.input-container[data-v-3926de45] {\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-3926de45]: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-3926de45] {\n flex: 1;\n outline: none;\n border: none;\n height: 30px;\n background: transparent;\n}\n.search-input[data-v-3926de45]::placeholder {\n color: #c4c6cc;\n}\n.selected-user[data-v-3926de45] {\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-3926de45] {\n color: #f59500;\n margin-left: 4px;\n}\n.selected-user .close-icon[data-v-3926de45] {\n margin-left: 4px;\n cursor: pointer;\n font-style: normal;\n}.bk-user-selector[data-v-bc7b4ccd] {\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) {
|
|
@@ -3158,9 +3158,10 @@
|
|
|
3158
3158
|
class: "user-group",
|
|
3159
3159
|
key: groupName
|
|
3160
3160
|
}, [
|
|
3161
|
-
vue.
|
|
3161
|
+
Object.keys(groupedUsers.value).length > 1 ? (vue.openBlock(), vue.createElementBlock(
|
|
3162
3162
|
"div",
|
|
3163
3163
|
{
|
|
3164
|
+
key: 0,
|
|
3164
3165
|
class: "group-header",
|
|
3165
3166
|
onMousedown: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
3166
3167
|
}, ["prevent"]))
|
|
@@ -3183,7 +3184,7 @@
|
|
|
3183
3184
|
],
|
|
3184
3185
|
32
|
|
3185
3186
|
/* NEED_HYDRATION */
|
|
3186
|
-
),
|
|
3187
|
+
)) : vue.createCommentVNode("v-if", true),
|
|
3187
3188
|
(vue.openBlock(true), vue.createElementBlock(
|
|
3188
3189
|
vue.Fragment,
|
|
3189
3190
|
null,
|
|
@@ -3228,7 +3229,7 @@
|
|
|
3228
3229
|
};
|
|
3229
3230
|
}
|
|
3230
3231
|
});
|
|
3231
|
-
const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
3232
|
+
const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-13504557"]]);
|
|
3232
3233
|
const _hoisted_1$3 = { class: "tag-content" };
|
|
3233
3234
|
const _hoisted_2$2 = { class: "user-name" };
|
|
3234
3235
|
const _hoisted_3$2 = {
|
|
@@ -3298,83 +3299,17 @@
|
|
|
3298
3299
|
},
|
|
3299
3300
|
__name: "multiple-selector",
|
|
3300
3301
|
props: {
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
},
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
type: String,
|
|
3313
|
-
default: "请输入人员名称搜索"
|
|
3314
|
-
},
|
|
3315
|
-
/**
|
|
3316
|
-
* 是否可拖拽
|
|
3317
|
-
*/
|
|
3318
|
-
draggable: {
|
|
3319
|
-
type: Boolean,
|
|
3320
|
-
default: false
|
|
3321
|
-
},
|
|
3322
|
-
/**
|
|
3323
|
-
* API 基础 URL
|
|
3324
|
-
*/
|
|
3325
|
-
apiBaseUrl: {
|
|
3326
|
-
type: String,
|
|
3327
|
-
default: ""
|
|
3328
|
-
},
|
|
3329
|
-
/**
|
|
3330
|
-
* 租户 ID
|
|
3331
|
-
*/
|
|
3332
|
-
tenantId: {
|
|
3333
|
-
type: String,
|
|
3334
|
-
default: ""
|
|
3335
|
-
},
|
|
3336
|
-
/**
|
|
3337
|
-
* 已选用户
|
|
3338
|
-
*/
|
|
3339
|
-
selectedUsers: {
|
|
3340
|
-
type: Array,
|
|
3341
|
-
default: () => []
|
|
3342
|
-
},
|
|
3343
|
-
/**
|
|
3344
|
-
* 租户信息映射
|
|
3345
|
-
*/
|
|
3346
|
-
tenants: {
|
|
3347
|
-
type: Object,
|
|
3348
|
-
default: () => ({})
|
|
3349
|
-
},
|
|
3350
|
-
/**
|
|
3351
|
-
* 当前用户ID
|
|
3352
|
-
*/
|
|
3353
|
-
currentUserId: {
|
|
3354
|
-
type: String,
|
|
3355
|
-
default: ""
|
|
3356
|
-
},
|
|
3357
|
-
/**
|
|
3358
|
-
* 精确查找key
|
|
3359
|
-
*/
|
|
3360
|
-
exactSearchKey: {
|
|
3361
|
-
type: String,
|
|
3362
|
-
default: "bk_username"
|
|
3363
|
-
},
|
|
3364
|
-
/**
|
|
3365
|
-
* 用户组
|
|
3366
|
-
*/
|
|
3367
|
-
userGroup: {
|
|
3368
|
-
type: Array,
|
|
3369
|
-
default: () => []
|
|
3370
|
-
},
|
|
3371
|
-
/**
|
|
3372
|
-
* 用户组名称
|
|
3373
|
-
*/
|
|
3374
|
-
userGroupName: {
|
|
3375
|
-
type: String,
|
|
3376
|
-
default: "用户群组"
|
|
3377
|
-
}
|
|
3302
|
+
modelValue: { default: () => [] },
|
|
3303
|
+
draggable: { type: Boolean, default: false },
|
|
3304
|
+
selectedUsers: { default: () => [] },
|
|
3305
|
+
tenants: { default: () => ({}) },
|
|
3306
|
+
apiBaseUrl: { default: "" },
|
|
3307
|
+
tenantId: { default: "" },
|
|
3308
|
+
placeholder: { default: "请输入人员名称搜索" },
|
|
3309
|
+
currentUserId: { default: "" },
|
|
3310
|
+
exactSearchKey: { default: "bk_username" },
|
|
3311
|
+
userGroup: { default: () => [] },
|
|
3312
|
+
userGroupName: { default: "用户群组" }
|
|
3378
3313
|
},
|
|
3379
3314
|
emits: ["update:selectedUsers", "add-user", "remove-user"],
|
|
3380
3315
|
setup(__props, { emit: __emit }) {
|
|
@@ -3637,7 +3572,7 @@
|
|
|
3637
3572
|
(vue.openBlock(true), vue.createElementBlock(
|
|
3638
3573
|
vue.Fragment,
|
|
3639
3574
|
null,
|
|
3640
|
-
vue.renderList(
|
|
3575
|
+
vue.renderList(_ctx.selectedUsers, (user, index) => {
|
|
3641
3576
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
3642
3577
|
class: "tag-wrapper",
|
|
3643
3578
|
key: user.id,
|
|
@@ -3645,15 +3580,15 @@
|
|
|
3645
3580
|
}, [
|
|
3646
3581
|
vue.createVNode(UserTag, {
|
|
3647
3582
|
active: index === activeTagIndex.value,
|
|
3648
|
-
"current-tenant-id":
|
|
3649
|
-
draggable:
|
|
3650
|
-
tenants:
|
|
3583
|
+
"current-tenant-id": _ctx.tenantId,
|
|
3584
|
+
draggable: _ctx.draggable,
|
|
3585
|
+
tenants: _ctx.tenants,
|
|
3651
3586
|
user,
|
|
3652
3587
|
onClick: ($event) => handleTagClick(index),
|
|
3653
3588
|
onClose: ($event) => removeUser(user)
|
|
3654
3589
|
}, null, 8, ["active", "current-tenant-id", "draggable", "tenants", "user", "onClick", "onClose"]),
|
|
3655
3590
|
vue.createCommentVNode(" 在当前激活标签后插入输入框 "),
|
|
3656
|
-
index === activeTagIndex.value && activeTagIndex.value !==
|
|
3591
|
+
index === activeTagIndex.value && activeTagIndex.value !== _ctx.selectedUsers.length - 1 ? vue.withDirectives((vue.openBlock(), vue.createElementBlock(
|
|
3657
3592
|
"input",
|
|
3658
3593
|
{
|
|
3659
3594
|
key: 0,
|
|
@@ -3679,13 +3614,13 @@
|
|
|
3679
3614
|
/* KEYED_FRAGMENT */
|
|
3680
3615
|
)),
|
|
3681
3616
|
vue.createCommentVNode(" 最后一个输入框 "),
|
|
3682
|
-
activeTagIndex.value === -1 || activeTagIndex.value ===
|
|
3617
|
+
activeTagIndex.value === -1 || activeTagIndex.value === _ctx.selectedUsers.length - 1 ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
3683
3618
|
key: 0,
|
|
3684
3619
|
ref_key: "lastInputRef",
|
|
3685
3620
|
ref: lastInputRef,
|
|
3686
3621
|
class: "search-input last",
|
|
3687
3622
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(searchQuery) ? searchQuery.value = $event : null),
|
|
3688
|
-
placeholder: !
|
|
3623
|
+
placeholder: !_ctx.selectedUsers.length ? _ctx.placeholder : "",
|
|
3689
3624
|
onFocus: handleInputFocus,
|
|
3690
3625
|
onInput: handleInput,
|
|
3691
3626
|
onKeydown: handleKeyDown,
|
|
@@ -3695,8 +3630,8 @@
|
|
|
3695
3630
|
]) : vue.createCommentVNode("v-if", true),
|
|
3696
3631
|
vue.createCommentVNode(' "我"标签 '),
|
|
3697
3632
|
vue.createVNode(MeTag, {
|
|
3698
|
-
"current-user-id":
|
|
3699
|
-
"is-disabled": !!
|
|
3633
|
+
"current-user-id": _ctx.currentUserId,
|
|
3634
|
+
"is-disabled": !!_ctx.currentUserId && _ctx.selectedUsers.some((user) => user.id === _ctx.currentUserId),
|
|
3700
3635
|
onClick: addCurrentUser
|
|
3701
3636
|
}, null, 8, ["current-user-id", "is-disabled"])
|
|
3702
3637
|
],
|
|
@@ -3725,10 +3660,10 @@
|
|
|
3725
3660
|
null,
|
|
3726
3661
|
vue.renderList(visibleUsers.value, (user) => {
|
|
3727
3662
|
return vue.openBlock(), vue.createBlock(UserTag, {
|
|
3728
|
-
"current-tenant-id":
|
|
3663
|
+
"current-tenant-id": _ctx.tenantId,
|
|
3729
3664
|
key: user.id,
|
|
3730
3665
|
"show-tenant": true,
|
|
3731
|
-
tenants:
|
|
3666
|
+
tenants: _ctx.tenants,
|
|
3732
3667
|
user,
|
|
3733
3668
|
onClick: handleFocus,
|
|
3734
3669
|
onClose: ($event) => removeUser(user)
|
|
@@ -3738,7 +3673,7 @@
|
|
|
3738
3673
|
/* KEYED_FRAGMENT */
|
|
3739
3674
|
)),
|
|
3740
3675
|
vue.createCommentVNode(" 显示折叠标签数量 "),
|
|
3741
|
-
hiddenCount.value > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(bkuiVue.Tag), {
|
|
3676
|
+
hiddenCount.value > 0 ? vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(bkuiVue.Tag), {
|
|
3742
3677
|
key: 0,
|
|
3743
3678
|
onClick: vue.withModifiers(handleFocus, ["stop"])
|
|
3744
3679
|
}, {
|
|
@@ -3751,22 +3686,27 @@
|
|
|
3751
3686
|
]),
|
|
3752
3687
|
_: 1
|
|
3753
3688
|
/* STABLE */
|
|
3754
|
-
}))
|
|
3689
|
+
})), [
|
|
3690
|
+
[vue.unref(bkuiVue.bkTooltips), {
|
|
3691
|
+
content: _ctx.selectedUsers.slice(visibleUsers.value.length).map((user) => user.display_name).join(","),
|
|
3692
|
+
placement: "top"
|
|
3693
|
+
}]
|
|
3694
|
+
]) : vue.createCommentVNode("v-if", true),
|
|
3755
3695
|
vue.createCommentVNode(" 搜索输入框 "),
|
|
3756
3696
|
vue.withDirectives(vue.createElementVNode("input", {
|
|
3757
3697
|
ref_key: "collapsedInputRef",
|
|
3758
3698
|
ref: collapsedInputRef,
|
|
3759
3699
|
class: "search-input collapsed",
|
|
3760
3700
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(searchQuery) ? searchQuery.value = $event : null),
|
|
3761
|
-
placeholder: !
|
|
3701
|
+
placeholder: !_ctx.selectedUsers.length ? _ctx.placeholder : "",
|
|
3762
3702
|
onFocus: handleFocus
|
|
3763
3703
|
}, null, 40, _hoisted_3$1), [
|
|
3764
3704
|
[vue.vModelText, vue.unref(searchQuery)]
|
|
3765
3705
|
]),
|
|
3766
3706
|
vue.createCommentVNode(' 未聚焦状态下的"我"标签 '),
|
|
3767
3707
|
vue.createVNode(MeTag, {
|
|
3768
|
-
"current-user-id":
|
|
3769
|
-
"is-disabled": !!
|
|
3708
|
+
"current-user-id": _ctx.currentUserId,
|
|
3709
|
+
"is-disabled": !!_ctx.currentUserId && _ctx.selectedUsers.some((user) => user[props.exactSearchKey] === _ctx.currentUserId),
|
|
3770
3710
|
onClick: addCurrentUser
|
|
3771
3711
|
}, null, 8, ["current-user-id", "is-disabled"])
|
|
3772
3712
|
],
|
|
@@ -3784,10 +3724,10 @@
|
|
|
3784
3724
|
loading: vue.unref(searchLoading),
|
|
3785
3725
|
options: options.value,
|
|
3786
3726
|
"search-query": vue.unref(searchQuery),
|
|
3787
|
-
"tenant-id":
|
|
3788
|
-
tenants:
|
|
3789
|
-
"user-group":
|
|
3790
|
-
"user-group-name":
|
|
3727
|
+
"tenant-id": _ctx.tenantId,
|
|
3728
|
+
tenants: _ctx.tenants,
|
|
3729
|
+
"user-group": _ctx.userGroup,
|
|
3730
|
+
"user-group-name": _ctx.userGroupName,
|
|
3791
3731
|
onSelectUser: addUser
|
|
3792
3732
|
}, null, 8, ["container-width", "is-show", "loading", "options", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
3793
3733
|
])), [
|
|
@@ -3796,8 +3736,8 @@
|
|
|
3796
3736
|
};
|
|
3797
3737
|
}
|
|
3798
3738
|
});
|
|
3799
|
-
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
3800
|
-
const _withScopeId = (n) => (vue.pushScopeId("data-v-
|
|
3739
|
+
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-1a376d26"]]);
|
|
3740
|
+
const _withScopeId = (n) => (vue.pushScopeId("data-v-3926de45"), n = n(), vue.popScopeId(), n);
|
|
3801
3741
|
const _hoisted_1$1 = { class: "input-container" };
|
|
3802
3742
|
const _hoisted_2 = {
|
|
3803
3743
|
key: 0,
|
|
@@ -3817,15 +3757,15 @@
|
|
|
3817
3757
|
},
|
|
3818
3758
|
__name: "single-selector",
|
|
3819
3759
|
props: {
|
|
3820
|
-
modelValue: {},
|
|
3760
|
+
modelValue: { default: "" },
|
|
3821
3761
|
tenants: {},
|
|
3822
|
-
apiBaseUrl: {},
|
|
3823
|
-
tenantId: {},
|
|
3824
|
-
placeholder: {},
|
|
3825
|
-
currentUserId: {},
|
|
3826
|
-
exactSearchKey: {},
|
|
3827
|
-
userGroup: {},
|
|
3828
|
-
userGroupName: {}
|
|
3762
|
+
apiBaseUrl: { default: "" },
|
|
3763
|
+
tenantId: { default: "" },
|
|
3764
|
+
placeholder: { default: "请输入人员名称搜索" },
|
|
3765
|
+
currentUserId: { default: "" },
|
|
3766
|
+
exactSearchKey: { default: "bk_username" },
|
|
3767
|
+
userGroup: { default: () => [] },
|
|
3768
|
+
userGroupName: { default: "用户群组" }
|
|
3829
3769
|
},
|
|
3830
3770
|
emits: ["update:modelValue", "change"],
|
|
3831
3771
|
setup(__props, { emit: __emit }) {
|
|
@@ -3964,10 +3904,10 @@
|
|
|
3964
3904
|
]),
|
|
3965
3905
|
vue.createCommentVNode(' "我"标签 '),
|
|
3966
3906
|
vue.createVNode(MeTag, {
|
|
3967
|
-
"is-disabled": !!_ctx.currentUserId && !!selectedUserInfo.value && selectedUserInfo.value[_ctx.exactSearchKey || "bk_username"] === _ctx.currentUserId,
|
|
3968
3907
|
"current-user-id": _ctx.currentUserId,
|
|
3908
|
+
"is-disabled": !!_ctx.currentUserId && !!selectedUserInfo.value && selectedUserInfo.value[_ctx.exactSearchKey] === _ctx.currentUserId,
|
|
3969
3909
|
onClick: addCurrentUser
|
|
3970
|
-
}, null, 8, ["
|
|
3910
|
+
}, null, 8, ["current-user-id", "is-disabled"])
|
|
3971
3911
|
]),
|
|
3972
3912
|
vue.createCommentVNode(" 使用新的公共下拉选项组件 "),
|
|
3973
3913
|
vue.createVNode(SelectionPopover, {
|
|
@@ -3988,7 +3928,7 @@
|
|
|
3988
3928
|
};
|
|
3989
3929
|
}
|
|
3990
3930
|
});
|
|
3991
|
-
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
3931
|
+
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-3926de45"]]);
|
|
3992
3932
|
const _hoisted_1 = { class: "bk-user-selector" };
|
|
3993
3933
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
3994
3934
|
...{
|
package/vue3/vue3.css
CHANGED
|
@@ -24,37 +24,37 @@
|
|
|
24
24
|
background-color: #f0f1f5;
|
|
25
25
|
color: #c4c6cc;
|
|
26
26
|
cursor: not-allowed;
|
|
27
|
-
}.dropdown-content[data-v-
|
|
27
|
+
}.dropdown-content[data-v-13504557] {
|
|
28
28
|
min-height: 40px;
|
|
29
29
|
max-height: 300px;
|
|
30
30
|
overflow-y: auto;
|
|
31
31
|
padding: 5px 0;
|
|
32
32
|
}
|
|
33
|
-
.dropdown-content .no-data[data-v-
|
|
33
|
+
.dropdown-content .no-data[data-v-13504557] {
|
|
34
34
|
padding: 10px;
|
|
35
35
|
text-align: center;
|
|
36
36
|
color: #979ba5;
|
|
37
37
|
}
|
|
38
|
-
.dropdown-content .user-group .group-header[data-v-
|
|
38
|
+
.dropdown-content .user-group .group-header[data-v-13504557] {
|
|
39
39
|
padding: 8px 12px;
|
|
40
40
|
color: #979ba5;
|
|
41
41
|
display: flex;
|
|
42
42
|
align-items: center;
|
|
43
43
|
}
|
|
44
|
-
.dropdown-content .user-group .group-header .group-count[data-v-
|
|
44
|
+
.dropdown-content .user-group .group-header .group-count[data-v-13504557] {
|
|
45
45
|
margin-left: 4px;
|
|
46
46
|
}
|
|
47
|
-
.dropdown-content .user-option[data-v-
|
|
47
|
+
.dropdown-content .user-option[data-v-13504557] {
|
|
48
48
|
padding: 8px 12px;
|
|
49
49
|
cursor: pointer;
|
|
50
50
|
display: flex;
|
|
51
51
|
align-items: center;
|
|
52
52
|
height: 32px;
|
|
53
53
|
}
|
|
54
|
-
.dropdown-content .user-option[data-v-
|
|
54
|
+
.dropdown-content .user-option[data-v-13504557]:hover {
|
|
55
55
|
background-color: #f5f7fa;
|
|
56
56
|
}
|
|
57
|
-
.dropdown-content .user-option .tenant-name[data-v-
|
|
57
|
+
.dropdown-content .user-option .tenant-name[data-v-13504557] {
|
|
58
58
|
color: #f59500;
|
|
59
59
|
margin-left: 4px;
|
|
60
60
|
padding: 0 4px;
|
|
@@ -82,58 +82,58 @@
|
|
|
82
82
|
white-space: nowrap;
|
|
83
83
|
padding: 0 3px;
|
|
84
84
|
border-radius: 2px;
|
|
85
|
-
}.multiple-selector[data-v-
|
|
85
|
+
}.multiple-selector[data-v-1a376d26] {
|
|
86
86
|
position: relative;
|
|
87
87
|
width: 100%;
|
|
88
88
|
}
|
|
89
|
-
.multiple-selector .tags-container[data-v-
|
|
89
|
+
.multiple-selector .tags-container[data-v-1a376d26] {
|
|
90
90
|
min-height: 32px;
|
|
91
91
|
border: 1px solid #dcdee5;
|
|
92
92
|
border-radius: 2px;
|
|
93
|
-
padding: 1px
|
|
93
|
+
padding: 1px 10px 1px 8px;
|
|
94
94
|
transition: all 0.2s ease;
|
|
95
95
|
background-color: #fff;
|
|
96
96
|
}
|
|
97
|
-
.multiple-selector .tags-container.focused[data-v-
|
|
97
|
+
.multiple-selector .tags-container.focused[data-v-1a376d26] {
|
|
98
98
|
border-color: #3a84ff;
|
|
99
99
|
box-shadow: 0 0 0 2px rgba(58, 132, 255, 0.1);
|
|
100
100
|
}
|
|
101
|
-
.multiple-selector .tags-container.collapsed[data-v-
|
|
101
|
+
.multiple-selector .tags-container.collapsed[data-v-1a376d26] {
|
|
102
102
|
display: flex;
|
|
103
103
|
flex-wrap: wrap;
|
|
104
104
|
align-items: center;
|
|
105
105
|
}
|
|
106
|
-
.multiple-selector .tag-list[data-v-
|
|
106
|
+
.multiple-selector .tag-list[data-v-1a376d26] {
|
|
107
107
|
display: flex;
|
|
108
108
|
flex-wrap: wrap;
|
|
109
109
|
align-items: center;
|
|
110
110
|
}
|
|
111
|
-
.multiple-selector .tag-wrapper[data-v-
|
|
111
|
+
.multiple-selector .tag-wrapper[data-v-1a376d26] {
|
|
112
112
|
display: inline-flex;
|
|
113
113
|
align-items: center;
|
|
114
114
|
max-width: 100%;
|
|
115
115
|
}
|
|
116
|
-
.multiple-selector .search-input[data-v-
|
|
116
|
+
.multiple-selector .search-input[data-v-1a376d26] {
|
|
117
117
|
outline: none;
|
|
118
118
|
border: none;
|
|
119
119
|
height: 28px;
|
|
120
120
|
min-width: 10px;
|
|
121
121
|
background: transparent;
|
|
122
122
|
}
|
|
123
|
-
.multiple-selector .search-input[data-v-
|
|
123
|
+
.multiple-selector .search-input[data-v-1a376d26]::placeholder {
|
|
124
124
|
color: #c4c6cc;
|
|
125
125
|
}
|
|
126
|
-
.multiple-selector .search-input.inline[data-v-
|
|
126
|
+
.multiple-selector .search-input.inline[data-v-1a376d26] {
|
|
127
127
|
min-width: 10px;
|
|
128
128
|
}
|
|
129
|
-
.multiple-selector .search-input.last[data-v-
|
|
129
|
+
.multiple-selector .search-input.last[data-v-1a376d26], .multiple-selector .search-input.collapsed[data-v-1a376d26] {
|
|
130
130
|
flex: 1;
|
|
131
131
|
min-width: 60px;
|
|
132
|
-
}.single-selector[data-v-
|
|
132
|
+
}.single-selector[data-v-3926de45] {
|
|
133
133
|
position: relative;
|
|
134
134
|
width: 100%;
|
|
135
135
|
}
|
|
136
|
-
.input-container[data-v-
|
|
136
|
+
.input-container[data-v-3926de45] {
|
|
137
137
|
position: relative;
|
|
138
138
|
display: flex;
|
|
139
139
|
align-items: center;
|
|
@@ -143,21 +143,21 @@
|
|
|
143
143
|
padding: 0 8px;
|
|
144
144
|
background-color: #fff;
|
|
145
145
|
}
|
|
146
|
-
.input-container[data-v-
|
|
146
|
+
.input-container[data-v-3926de45]:focus-within {
|
|
147
147
|
border-color: #3a84ff;
|
|
148
148
|
box-shadow: 0 0 0 2px rgba(58, 132, 255, 0.1);
|
|
149
149
|
}
|
|
150
|
-
.search-input[data-v-
|
|
150
|
+
.search-input[data-v-3926de45] {
|
|
151
151
|
flex: 1;
|
|
152
152
|
outline: none;
|
|
153
153
|
border: none;
|
|
154
154
|
height: 30px;
|
|
155
155
|
background: transparent;
|
|
156
156
|
}
|
|
157
|
-
.search-input[data-v-
|
|
157
|
+
.search-input[data-v-3926de45]::placeholder {
|
|
158
158
|
color: #c4c6cc;
|
|
159
159
|
}
|
|
160
|
-
.selected-user[data-v-
|
|
160
|
+
.selected-user[data-v-3926de45] {
|
|
161
161
|
display: inline-flex;
|
|
162
162
|
align-items: center;
|
|
163
163
|
background-color: #f0f1f5;
|
|
@@ -167,11 +167,11 @@
|
|
|
167
167
|
height: 24px;
|
|
168
168
|
max-width: calc(100% - 32px);
|
|
169
169
|
}
|
|
170
|
-
.selected-user .tenant-name[data-v-
|
|
170
|
+
.selected-user .tenant-name[data-v-3926de45] {
|
|
171
171
|
color: #f59500;
|
|
172
172
|
margin-left: 4px;
|
|
173
173
|
}
|
|
174
|
-
.selected-user .close-icon[data-v-
|
|
174
|
+
.selected-user .close-icon[data-v-3926de45] {
|
|
175
175
|
margin-left: 4px;
|
|
176
176
|
cursor: pointer;
|
|
177
177
|
font-style: normal;
|