@blueking/bk-user-selector 0.0.21 → 0.0.23-beta.1
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/package.json +1 -1
- package/typings/components/me-tag.vue.d.ts +5 -5
- package/typings/components/multiple-selector.vue.d.ts +4 -47
- package/typings/components/selection-popover.vue.d.ts +23 -6
- package/typings/components/single-selector.vue.d.ts +4 -41
- package/typings/components/user-render.d.ts +24 -8
- package/typings/components/user-selector.vue.d.ts +4 -45
- package/typings/components/user-tag.vue.d.ts +9 -43
- package/typings/hooks/useTenantData.d.ts +2 -2
- package/typings/hooks/useUserSearch.d.ts +3 -3
- package/typings/vue2.d.ts +1 -7
- package/vue2/index.es.min.js +148 -141
- package/vue2/index.iife.min.js +2788 -2263
- package/vue2/index.umd.min.js +148 -141
- package/vue2/vue2.css +40 -52
- package/vue3/index.es.min.js +114 -105
- package/vue3/index.iife.min.js +115 -106
- package/vue3/index.umd.min.js +114 -105
- package/vue3/vue3.css +40 -52
- package/typings/components/render-tag.d.ts +0 -8
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}.bk-user-selector-popover.bk-popover.bk-pop2-content {\n padding: 0;\n}.dropdown-content[data-v-54b68f9a] {\n min-height: 40px;\n max-height: 300px;\n overflow-y: auto;\n padding: 5px 0;\n}\n.dropdown-content .no-data[data-v-54b68f9a] {\n padding: 10px;\n text-align: center;\n color: #979ba5;\n}\n.dropdown-content .user-group .group-header[data-v-54b68f9a] {\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-54b68f9a] {\n margin-left: 4px;\n}\n.dropdown-content .user-option[data-v-54b68f9a] {\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-54b68f9a]:hover {\n background-color: #f5f7fa;\n}.user-tag[data-v-487799ec] {\n margin-right: 4px;\n margin-left: 0;\n}\n.user-tag.draggable[data-v-487799ec] {\n cursor: move;\n}\n.user-tag.active[data-v-487799ec] {\n background-color: #e1ecff;\n border-color: #3a84ff;\n}\n.user-tag .tag-content .user-name[data-v-487799ec] {\n overflow: hidden;\n font-size: 12px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}.multiple-selector[data-v-95b69442] {\n position: relative;\n width: 100%;\n}\n.multiple-selector .tags-container[data-v-95b69442] {\n min-height: 32px;\n padding: 1px 10px 1px 8px;\n background-color: #fff;\n border: 1px solid #c4c6cc;\n border-radius: 2px;\n transition: all 0.2s ease;\n}\n.multiple-selector .tags-container.focused[data-v-95b69442] {\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-95b69442] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n}\n.multiple-selector .tag-list[data-v-95b69442] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n}\n.multiple-selector .tag-wrapper[data-v-95b69442] {\n display: inline-flex;\n align-items: center;\n max-width: 100%;\n}\n.multiple-selector .search-input[data-v-95b69442] {\n min-width: 10px;\n height: 28px;\n background: transparent;\n border: none;\n outline: none;\n}\n.multiple-selector .search-input[data-v-95b69442]::placeholder {\n color: #c4c6cc;\n}\n.multiple-selector .search-input.inline[data-v-95b69442] {\n min-width: 10px;\n}\n.multiple-selector .search-input.last[data-v-95b69442], .multiple-selector .search-input.collapsed[data-v-95b69442] {\n flex: 1;\n min-width: 60px;\n}.single-selector[data-v-4fec9d7c] {\n position: relative;\n width: 100%;\n}\n.input-container[data-v-4fec9d7c] {\n position: relative;\n display: flex;\n align-items: center;\n min-height: 32px;\n padding: 0 8px;\n background-color: #fff;\n border: 1px solid #c4c6cc;\n border-radius: 2px;\n}\n.input-container[data-v-4fec9d7c]: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-4fec9d7c] {\n flex: 1;\n height: 30px;\n background: transparent;\n border: none;\n outline: none;\n}\n.search-input[data-v-4fec9d7c]::placeholder {\n color: #c4c6cc;\n}.bk-user-selector[data-v-78f5783f] {\n position: relative;\n width: 100%;\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) {
|
|
@@ -3021,39 +3021,56 @@
|
|
|
3021
3021
|
const UserRender = vue.defineComponent({
|
|
3022
3022
|
name: "UserRender",
|
|
3023
3023
|
props: {
|
|
3024
|
-
|
|
3025
|
-
type:
|
|
3024
|
+
user: {
|
|
3025
|
+
type: Object,
|
|
3026
3026
|
required: true
|
|
3027
3027
|
},
|
|
3028
|
-
|
|
3028
|
+
tenantId: {
|
|
3029
|
+
type: String,
|
|
3030
|
+
required: true
|
|
3031
|
+
},
|
|
3032
|
+
tenants: {
|
|
3029
3033
|
type: Object,
|
|
3030
3034
|
required: true
|
|
3035
|
+
},
|
|
3036
|
+
render: {
|
|
3037
|
+
type: Function,
|
|
3038
|
+
required: false
|
|
3031
3039
|
}
|
|
3032
3040
|
},
|
|
3033
3041
|
setup(props) {
|
|
3042
|
+
const defaultRender = (h2, props2) => {
|
|
3043
|
+
return h2("div", [
|
|
3044
|
+
h2("span", props2.user.name),
|
|
3045
|
+
props2.user.tenantId !== props2.tenantId && props2.user.tenantId ? h2(
|
|
3046
|
+
"span",
|
|
3047
|
+
{
|
|
3048
|
+
style: {
|
|
3049
|
+
color: "#f59500",
|
|
3050
|
+
marginLeft: "4px"
|
|
3051
|
+
}
|
|
3052
|
+
},
|
|
3053
|
+
`@${props2.tenants[props2.user.tenantId] || props2.user.tenantId}`
|
|
3054
|
+
) : null
|
|
3055
|
+
]);
|
|
3056
|
+
};
|
|
3034
3057
|
return () => {
|
|
3035
3058
|
try {
|
|
3036
|
-
return props.render(vue.h, props.user);
|
|
3059
|
+
return props.render ? props.render(vue.h, props.user) : defaultRender(vue.h, props);
|
|
3037
3060
|
} catch (error) {
|
|
3038
3061
|
console.error("Error rendering tag:", error);
|
|
3039
|
-
return vue.h
|
|
3062
|
+
return defaultRender(vue.h, props);
|
|
3040
3063
|
}
|
|
3041
3064
|
};
|
|
3042
3065
|
}
|
|
3043
3066
|
});
|
|
3044
|
-
const _hoisted_1$
|
|
3067
|
+
const _hoisted_1$3 = {
|
|
3045
3068
|
key: 0,
|
|
3046
3069
|
class: "no-data"
|
|
3047
3070
|
};
|
|
3048
|
-
const _hoisted_2$
|
|
3049
|
-
const _hoisted_3$
|
|
3050
|
-
const _hoisted_4
|
|
3051
|
-
const _hoisted_5 = { key: 0 };
|
|
3052
|
-
const _hoisted_6 = { key: 1 };
|
|
3053
|
-
const _hoisted_7 = {
|
|
3054
|
-
key: 0,
|
|
3055
|
-
class: "tenant-name"
|
|
3056
|
-
};
|
|
3071
|
+
const _hoisted_2$2 = { class: "group-name" };
|
|
3072
|
+
const _hoisted_3$1 = { class: "group-count" };
|
|
3073
|
+
const _hoisted_4 = ["onMousedown"];
|
|
3057
3074
|
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
3058
3075
|
...{
|
|
3059
3076
|
name: "SelectionPopover"
|
|
@@ -3074,6 +3091,13 @@
|
|
|
3074
3091
|
type: [Number, String],
|
|
3075
3092
|
default: "auto"
|
|
3076
3093
|
},
|
|
3094
|
+
/**
|
|
3095
|
+
* popover crossAxis 偏移量
|
|
3096
|
+
*/
|
|
3097
|
+
crossAxisOffset: {
|
|
3098
|
+
type: Number,
|
|
3099
|
+
default: 0
|
|
3100
|
+
},
|
|
3077
3101
|
/**
|
|
3078
3102
|
* 是否加载中
|
|
3079
3103
|
*/
|
|
@@ -3137,7 +3161,7 @@
|
|
|
3137
3161
|
type: Function
|
|
3138
3162
|
}
|
|
3139
3163
|
},
|
|
3140
|
-
emits: ["select-user"],
|
|
3164
|
+
emits: ["select-user", "click-outside"],
|
|
3141
3165
|
setup(__props, { emit: __emit }) {
|
|
3142
3166
|
const props = __props;
|
|
3143
3167
|
const emit = __emit;
|
|
@@ -3162,15 +3186,20 @@
|
|
|
3162
3186
|
const selectUser = (user) => {
|
|
3163
3187
|
emit("select-user", user);
|
|
3164
3188
|
};
|
|
3189
|
+
const handleClickOutside = ({ event }) => {
|
|
3190
|
+
emit("click-outside", event);
|
|
3191
|
+
};
|
|
3165
3192
|
return (_ctx, _cache) => {
|
|
3166
3193
|
return vue.openBlock(), vue.createBlock(vue.unref(bkuiVue.Popover), {
|
|
3167
3194
|
"ext-cls": "bk-user-selector-popover",
|
|
3168
3195
|
arrow: false,
|
|
3169
3196
|
"is-show": __props.isShow,
|
|
3197
|
+
offset: { mainAxis: 4, crossAxis: __props.crossAxisOffset },
|
|
3170
3198
|
width: __props.containerWidth,
|
|
3171
3199
|
placement: "bottom-start",
|
|
3172
3200
|
theme: "light",
|
|
3173
|
-
trigger: "manual"
|
|
3201
|
+
trigger: "manual",
|
|
3202
|
+
onClickoutside: handleClickOutside
|
|
3174
3203
|
}, {
|
|
3175
3204
|
content: vue.withCtx(() => [
|
|
3176
3205
|
vue.createVNode(vue.unref(bkuiVue.Loading), {
|
|
@@ -3180,7 +3209,7 @@
|
|
|
3180
3209
|
mode: "spin"
|
|
3181
3210
|
}, {
|
|
3182
3211
|
default: vue.withCtx(() => [
|
|
3183
|
-
__props.options.length === 0 && __props.userGroup.length === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
3212
|
+
__props.options.length === 0 && __props.userGroup.length === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
|
|
3184
3213
|
vue.createElementVNode(
|
|
3185
3214
|
"span",
|
|
3186
3215
|
null,
|
|
@@ -3207,14 +3236,14 @@
|
|
|
3207
3236
|
[
|
|
3208
3237
|
vue.createElementVNode(
|
|
3209
3238
|
"span",
|
|
3210
|
-
_hoisted_2$
|
|
3239
|
+
_hoisted_2$2,
|
|
3211
3240
|
vue.toDisplayString(groupName),
|
|
3212
3241
|
1
|
|
3213
3242
|
/* TEXT */
|
|
3214
3243
|
),
|
|
3215
3244
|
vue.createElementVNode(
|
|
3216
3245
|
"span",
|
|
3217
|
-
_hoisted_3$
|
|
3246
|
+
_hoisted_3$1,
|
|
3218
3247
|
"(" + vue.toDisplayString(group.length) + ")",
|
|
3219
3248
|
1
|
|
3220
3249
|
/* TEXT */
|
|
@@ -3232,28 +3261,13 @@
|
|
|
3232
3261
|
key: user.id,
|
|
3233
3262
|
onMousedown: vue.withModifiers(($event) => selectUser(user), ["prevent"])
|
|
3234
3263
|
}, [
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
"span",
|
|
3243
|
-
null,
|
|
3244
|
-
vue.toDisplayString(user.name),
|
|
3245
|
-
1
|
|
3246
|
-
/* TEXT */
|
|
3247
|
-
),
|
|
3248
|
-
user.tenantId !== __props.tenantId && user.tenantId && __props.tenants[user.tenantId] ? (vue.openBlock(), vue.createElementBlock(
|
|
3249
|
-
"span",
|
|
3250
|
-
_hoisted_7,
|
|
3251
|
-
"@" + vue.toDisplayString(__props.tenants[user.tenantId]),
|
|
3252
|
-
1
|
|
3253
|
-
/* TEXT */
|
|
3254
|
-
)) : vue.createCommentVNode("v-if", true)
|
|
3255
|
-
]))
|
|
3256
|
-
], 40, _hoisted_4$1);
|
|
3264
|
+
vue.createVNode(vue.unref(UserRender), {
|
|
3265
|
+
render: __props.renderListItem,
|
|
3266
|
+
"tenant-id": __props.tenantId,
|
|
3267
|
+
tenants: __props.tenants,
|
|
3268
|
+
user
|
|
3269
|
+
}, null, 8, ["render", "tenant-id", "tenants", "user"])
|
|
3270
|
+
], 40, _hoisted_4);
|
|
3257
3271
|
}),
|
|
3258
3272
|
128
|
|
3259
3273
|
/* KEYED_FRAGMENT */
|
|
@@ -3270,21 +3284,11 @@
|
|
|
3270
3284
|
]),
|
|
3271
3285
|
_: 1
|
|
3272
3286
|
/* STABLE */
|
|
3273
|
-
}, 8, ["is-show", "width"]);
|
|
3287
|
+
}, 8, ["is-show", "offset", "width"]);
|
|
3274
3288
|
};
|
|
3275
3289
|
}
|
|
3276
3290
|
});
|
|
3277
|
-
const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
3278
|
-
const _hoisted_1$3 = { key: 0 };
|
|
3279
|
-
const _hoisted_2$2 = {
|
|
3280
|
-
key: 1,
|
|
3281
|
-
class: "tag-content"
|
|
3282
|
-
};
|
|
3283
|
-
const _hoisted_3$1 = { class: "user-name" };
|
|
3284
|
-
const _hoisted_4 = {
|
|
3285
|
-
key: 0,
|
|
3286
|
-
class: "tenant-name"
|
|
3287
|
-
};
|
|
3291
|
+
const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-54b68f9a"]]);
|
|
3288
3292
|
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
3289
3293
|
...{
|
|
3290
3294
|
name: "UserTag"
|
|
@@ -3316,27 +3320,12 @@
|
|
|
3316
3320
|
onClose: handleClose
|
|
3317
3321
|
}, {
|
|
3318
3322
|
default: vue.withCtx(() => [
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
vue.createElementVNode(
|
|
3326
|
-
"span",
|
|
3327
|
-
_hoisted_3$1,
|
|
3328
|
-
vue.toDisplayString(_ctx.user.name),
|
|
3329
|
-
1
|
|
3330
|
-
/* TEXT */
|
|
3331
|
-
),
|
|
3332
|
-
_ctx.user.tenantId !== _ctx.currentTenantId && _ctx.user.tenantId ? (vue.openBlock(), vue.createElementBlock(
|
|
3333
|
-
"span",
|
|
3334
|
-
_hoisted_4,
|
|
3335
|
-
" @" + vue.toDisplayString(_ctx.tenants[_ctx.user.tenantId]),
|
|
3336
|
-
1
|
|
3337
|
-
/* TEXT */
|
|
3338
|
-
)) : vue.createCommentVNode("v-if", true)
|
|
3339
|
-
]))
|
|
3323
|
+
vue.createVNode(vue.unref(UserRender), {
|
|
3324
|
+
render: _ctx.renderTag,
|
|
3325
|
+
"tenant-id": _ctx.currentTenantId,
|
|
3326
|
+
tenants: _ctx.tenants,
|
|
3327
|
+
user: _ctx.user
|
|
3328
|
+
}, null, 8, ["render", "tenant-id", "tenants", "user"])
|
|
3340
3329
|
]),
|
|
3341
3330
|
_: 1
|
|
3342
3331
|
/* STABLE */
|
|
@@ -3344,7 +3333,7 @@
|
|
|
3344
3333
|
};
|
|
3345
3334
|
}
|
|
3346
3335
|
});
|
|
3347
|
-
const UserTag = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
3336
|
+
const UserTag = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-487799ec"]]);
|
|
3348
3337
|
const _hoisted_1$2 = ["onClick"];
|
|
3349
3338
|
const _hoisted_2$1 = ["placeholder"];
|
|
3350
3339
|
const _hoisted_3 = ["placeholder"];
|
|
@@ -3448,7 +3437,7 @@
|
|
|
3448
3437
|
}
|
|
3449
3438
|
});
|
|
3450
3439
|
};
|
|
3451
|
-
const handleClickOutside = (
|
|
3440
|
+
const handleClickOutside = (event) => {
|
|
3452
3441
|
event.stopPropagation();
|
|
3453
3442
|
const target = event.target;
|
|
3454
3443
|
const container = containerRef.value;
|
|
@@ -3583,6 +3572,7 @@
|
|
|
3583
3572
|
});
|
|
3584
3573
|
}
|
|
3585
3574
|
};
|
|
3575
|
+
const crossAxisOffset = vue.ref(0);
|
|
3586
3576
|
vue.watch(
|
|
3587
3577
|
() => props.selectedUsers,
|
|
3588
3578
|
() => {
|
|
@@ -3750,25 +3740,42 @@
|
|
|
3750
3740
|
/* KEYED_FRAGMENT */
|
|
3751
3741
|
)),
|
|
3752
3742
|
vue.createCommentVNode(" 显示折叠标签数量 "),
|
|
3753
|
-
hiddenCount.value > 0 ?
|
|
3743
|
+
hiddenCount.value > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(bkuiVue.Popover), {
|
|
3754
3744
|
key: 0,
|
|
3755
|
-
|
|
3745
|
+
placement: "top"
|
|
3756
3746
|
}, {
|
|
3747
|
+
content: vue.withCtx(() => [
|
|
3748
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
3749
|
+
vue.Fragment,
|
|
3750
|
+
null,
|
|
3751
|
+
vue.renderList(_ctx.selectedUsers.slice(visibleUsers.value.length), (user) => {
|
|
3752
|
+
return vue.openBlock(), vue.createBlock(vue.unref(UserRender), {
|
|
3753
|
+
key: user.id,
|
|
3754
|
+
"tenant-id": _ctx.tenantId,
|
|
3755
|
+
tenants: _ctx.tenants,
|
|
3756
|
+
user
|
|
3757
|
+
}, null, 8, ["tenant-id", "tenants", "user"]);
|
|
3758
|
+
}),
|
|
3759
|
+
128
|
|
3760
|
+
/* KEYED_FRAGMENT */
|
|
3761
|
+
))
|
|
3762
|
+
]),
|
|
3757
3763
|
default: vue.withCtx(() => [
|
|
3758
|
-
vue.
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3764
|
+
vue.createVNode(vue.unref(bkuiVue.Tag), null, {
|
|
3765
|
+
default: vue.withCtx(() => [
|
|
3766
|
+
vue.createTextVNode(
|
|
3767
|
+
" +" + vue.toDisplayString(hiddenCount.value),
|
|
3768
|
+
1
|
|
3769
|
+
/* TEXT */
|
|
3770
|
+
)
|
|
3771
|
+
]),
|
|
3772
|
+
_: 1
|
|
3773
|
+
/* STABLE */
|
|
3774
|
+
})
|
|
3763
3775
|
]),
|
|
3764
3776
|
_: 1
|
|
3765
3777
|
/* STABLE */
|
|
3766
|
-
})),
|
|
3767
|
-
[vue.unref(bkuiVue.bkTooltips), {
|
|
3768
|
-
content: _ctx.selectedUsers.slice(visibleUsers.value.length).map((user) => user.display_name).join(","),
|
|
3769
|
-
placement: "top"
|
|
3770
|
-
}]
|
|
3771
|
-
]) : vue.createCommentVNode("v-if", true),
|
|
3778
|
+
})) : vue.createCommentVNode("v-if", true),
|
|
3772
3779
|
vue.createCommentVNode(" 搜索输入框 "),
|
|
3773
3780
|
vue.withDirectives(vue.createElementVNode("input", {
|
|
3774
3781
|
ref_key: "collapsedInputRef",
|
|
@@ -3797,6 +3804,7 @@
|
|
|
3797
3804
|
vue.createCommentVNode(" 下拉选项列表 "),
|
|
3798
3805
|
vue.createVNode(SelectionPopover, {
|
|
3799
3806
|
"container-width": containerRef.value ? containerRef.value.offsetWidth : "auto",
|
|
3807
|
+
"cross-axis-offset": crossAxisOffset.value,
|
|
3800
3808
|
"empty-text": _ctx.emptyText,
|
|
3801
3809
|
"is-show": showDropdown.value,
|
|
3802
3810
|
loading: vue.unref(searchLoading),
|
|
@@ -3807,9 +3815,9 @@
|
|
|
3807
3815
|
tenants: _ctx.tenants,
|
|
3808
3816
|
"user-group": userGroupFilter.value,
|
|
3809
3817
|
"user-group-name": _ctx.userGroupName,
|
|
3810
|
-
|
|
3818
|
+
onClickOutside: handleClickOutside,
|
|
3811
3819
|
onSelectUser: addUser
|
|
3812
|
-
}, null, 8, ["container-width", "empty-text", "is-show", "loading", "options", "render-list-item", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
3820
|
+
}, null, 8, ["container-width", "cross-axis-offset", "empty-text", "is-show", "loading", "options", "render-list-item", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
3813
3821
|
],
|
|
3814
3822
|
512
|
|
3815
3823
|
/* NEED_PATCH */
|
|
@@ -3817,7 +3825,7 @@
|
|
|
3817
3825
|
};
|
|
3818
3826
|
}
|
|
3819
3827
|
});
|
|
3820
|
-
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
3828
|
+
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-95b69442"]]);
|
|
3821
3829
|
const _hoisted_1$1 = { class: "input-container" };
|
|
3822
3830
|
const _hoisted_2 = ["placeholder"];
|
|
3823
3831
|
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -3860,9 +3868,7 @@
|
|
|
3860
3868
|
type: "userGroup"
|
|
3861
3869
|
}));
|
|
3862
3870
|
const list = [...options.value, ...userGroup];
|
|
3863
|
-
|
|
3864
|
-
emit("change", selectedUserInfo2 || null);
|
|
3865
|
-
return selectedUserInfo2;
|
|
3871
|
+
return list.find((user) => user.id === selectedUser.value);
|
|
3866
3872
|
});
|
|
3867
3873
|
vue.onBeforeMount(async () => {
|
|
3868
3874
|
if (typeof props.modelValue === "string" && props.modelValue) {
|
|
@@ -3937,9 +3943,9 @@
|
|
|
3937
3943
|
const handleClickOutside = () => {
|
|
3938
3944
|
showDropdown.value = false;
|
|
3939
3945
|
};
|
|
3940
|
-
vue.watch(
|
|
3941
|
-
emit("
|
|
3942
|
-
});
|
|
3946
|
+
vue.watch(selectedUserInfo, (newVal) => {
|
|
3947
|
+
emit("change", newVal || null);
|
|
3948
|
+
}, { immediate: true });
|
|
3943
3949
|
return (_ctx, _cache) => {
|
|
3944
3950
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
3945
3951
|
ref_key: "containerRef",
|
|
@@ -3954,11 +3960,12 @@
|
|
|
3954
3960
|
onClick: vue.withModifiers(removeSelectedUser, ["stop"])
|
|
3955
3961
|
}, [
|
|
3956
3962
|
vue.createVNode(UserTag, {
|
|
3963
|
+
"current-tenant-id": _ctx.tenantId,
|
|
3957
3964
|
"render-tag": _ctx.renderTag,
|
|
3958
3965
|
tenants: _ctx.tenants,
|
|
3959
3966
|
user: selectedUserInfo.value,
|
|
3960
3967
|
onClose: removeSelectedUser
|
|
3961
|
-
}, null, 8, ["render-tag", "tenants", "user"])
|
|
3968
|
+
}, null, 8, ["current-tenant-id", "render-tag", "tenants", "user"])
|
|
3962
3969
|
])) : vue.createCommentVNode("v-if", true),
|
|
3963
3970
|
vue.withDirectives(vue.createElementVNode("input", {
|
|
3964
3971
|
ref_key: "inputRef",
|
|
@@ -3999,7 +4006,7 @@
|
|
|
3999
4006
|
};
|
|
4000
4007
|
}
|
|
4001
4008
|
});
|
|
4002
|
-
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
4009
|
+
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-4fec9d7c"]]);
|
|
4003
4010
|
const _hoisted_1 = {
|
|
4004
4011
|
ref: "containerRef",
|
|
4005
4012
|
class: "bk-user-selector"
|
|
@@ -4072,13 +4079,15 @@
|
|
|
4072
4079
|
vue.watch(selectedUser, (newVal) => {
|
|
4073
4080
|
if (!props.multiple) {
|
|
4074
4081
|
emit("update:modelValue", newVal);
|
|
4082
|
+
emit("change", newVal);
|
|
4075
4083
|
}
|
|
4076
|
-
});
|
|
4084
|
+
}, { immediate: true });
|
|
4077
4085
|
vue.watch(
|
|
4078
4086
|
() => props.userGroup,
|
|
4079
4087
|
() => {
|
|
4080
4088
|
initSelectedUsers();
|
|
4081
|
-
}
|
|
4089
|
+
},
|
|
4090
|
+
{ immediate: true }
|
|
4082
4091
|
);
|
|
4083
4092
|
vue.onBeforeMount(() => {
|
|
4084
4093
|
initSelectedUsers();
|
|
@@ -4139,7 +4148,7 @@
|
|
|
4139
4148
|
};
|
|
4140
4149
|
}
|
|
4141
4150
|
});
|
|
4142
|
-
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4151
|
+
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-78f5783f"]]);
|
|
4143
4152
|
exports2.BkUserSelector = BkUserSelector;
|
|
4144
4153
|
exports2.default = BkUserSelector;
|
|
4145
4154
|
Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
package/vue3/vue3.css
CHANGED
|
@@ -24,141 +24,129 @@
|
|
|
24
24
|
background-color: #f0f1f5;
|
|
25
25
|
color: #c4c6cc;
|
|
26
26
|
cursor: not-allowed;
|
|
27
|
-
}.
|
|
27
|
+
}.bk-user-selector-popover.bk-popover.bk-pop2-content {
|
|
28
|
+
padding: 0;
|
|
29
|
+
}.dropdown-content[data-v-54b68f9a] {
|
|
28
30
|
min-height: 40px;
|
|
29
31
|
max-height: 300px;
|
|
30
32
|
overflow-y: auto;
|
|
31
33
|
padding: 5px 0;
|
|
32
34
|
}
|
|
33
|
-
.dropdown-content .no-data[data-v-
|
|
35
|
+
.dropdown-content .no-data[data-v-54b68f9a] {
|
|
34
36
|
padding: 10px;
|
|
35
37
|
text-align: center;
|
|
36
38
|
color: #979ba5;
|
|
37
39
|
}
|
|
38
|
-
.dropdown-content .user-group .group-header[data-v-
|
|
40
|
+
.dropdown-content .user-group .group-header[data-v-54b68f9a] {
|
|
39
41
|
padding: 8px 12px;
|
|
40
42
|
color: #979ba5;
|
|
41
43
|
display: flex;
|
|
42
44
|
align-items: center;
|
|
43
45
|
}
|
|
44
|
-
.dropdown-content .user-group .group-header .group-count[data-v-
|
|
46
|
+
.dropdown-content .user-group .group-header .group-count[data-v-54b68f9a] {
|
|
45
47
|
margin-left: 4px;
|
|
46
48
|
}
|
|
47
|
-
.dropdown-content .user-option[data-v-
|
|
49
|
+
.dropdown-content .user-option[data-v-54b68f9a] {
|
|
48
50
|
padding: 8px 12px;
|
|
49
51
|
cursor: pointer;
|
|
50
52
|
display: flex;
|
|
51
53
|
align-items: center;
|
|
52
54
|
height: 32px;
|
|
53
55
|
}
|
|
54
|
-
.dropdown-content .user-option[data-v-
|
|
56
|
+
.dropdown-content .user-option[data-v-54b68f9a]:hover {
|
|
55
57
|
background-color: #f5f7fa;
|
|
56
|
-
}
|
|
57
|
-
.dropdown-content .user-option .tenant-name[data-v-a1278ff6] {
|
|
58
|
-
color: #f59500;
|
|
59
|
-
margin-left: 4px;
|
|
60
|
-
padding: 0 4px;
|
|
61
|
-
}.bk-user-selector-popover.bk-popover.bk-pop2-content {
|
|
62
|
-
padding: 0;
|
|
63
|
-
}.user-tag[data-v-7099192b] {
|
|
58
|
+
}.user-tag[data-v-487799ec] {
|
|
64
59
|
margin-right: 4px;
|
|
65
60
|
margin-left: 0;
|
|
66
61
|
}
|
|
67
|
-
.user-tag.draggable[data-v-
|
|
62
|
+
.user-tag.draggable[data-v-487799ec] {
|
|
68
63
|
cursor: move;
|
|
69
64
|
}
|
|
70
|
-
.user-tag.active[data-v-
|
|
65
|
+
.user-tag.active[data-v-487799ec] {
|
|
71
66
|
background-color: #e1ecff;
|
|
72
67
|
border-color: #3a84ff;
|
|
73
68
|
}
|
|
74
|
-
.user-tag .tag-content .user-name[data-v-
|
|
75
|
-
white-space: nowrap;
|
|
69
|
+
.user-tag .tag-content .user-name[data-v-487799ec] {
|
|
76
70
|
overflow: hidden;
|
|
77
|
-
text-overflow: ellipsis;
|
|
78
71
|
font-size: 12px;
|
|
79
|
-
|
|
80
|
-
.user-tag .tag-content .tenant-name[data-v-7099192b] {
|
|
81
|
-
color: #f59500;
|
|
82
|
-
margin-left: 3px;
|
|
72
|
+
text-overflow: ellipsis;
|
|
83
73
|
white-space: nowrap;
|
|
84
|
-
|
|
85
|
-
border-radius: 2px;
|
|
86
|
-
}.multiple-selector[data-v-d4f489c3] {
|
|
74
|
+
}.multiple-selector[data-v-95b69442] {
|
|
87
75
|
position: relative;
|
|
88
76
|
width: 100%;
|
|
89
77
|
}
|
|
90
|
-
.multiple-selector .tags-container[data-v-
|
|
78
|
+
.multiple-selector .tags-container[data-v-95b69442] {
|
|
91
79
|
min-height: 32px;
|
|
92
|
-
border: 1px solid #dcdee5;
|
|
93
|
-
border-radius: 2px;
|
|
94
80
|
padding: 1px 10px 1px 8px;
|
|
95
|
-
transition: all 0.2s ease;
|
|
96
81
|
background-color: #fff;
|
|
82
|
+
border: 1px solid #c4c6cc;
|
|
83
|
+
border-radius: 2px;
|
|
84
|
+
transition: all 0.2s ease;
|
|
97
85
|
}
|
|
98
|
-
.multiple-selector .tags-container.focused[data-v-
|
|
86
|
+
.multiple-selector .tags-container.focused[data-v-95b69442] {
|
|
99
87
|
border-color: #3a84ff;
|
|
100
88
|
box-shadow: 0 0 0 2px rgba(58, 132, 255, 0.1);
|
|
101
89
|
}
|
|
102
|
-
.multiple-selector .tags-container.collapsed[data-v-
|
|
90
|
+
.multiple-selector .tags-container.collapsed[data-v-95b69442] {
|
|
103
91
|
display: flex;
|
|
104
92
|
flex-wrap: wrap;
|
|
105
93
|
align-items: center;
|
|
106
94
|
}
|
|
107
|
-
.multiple-selector .tag-list[data-v-
|
|
95
|
+
.multiple-selector .tag-list[data-v-95b69442] {
|
|
108
96
|
display: flex;
|
|
109
97
|
flex-wrap: wrap;
|
|
110
98
|
align-items: center;
|
|
111
99
|
}
|
|
112
|
-
.multiple-selector .tag-wrapper[data-v-
|
|
100
|
+
.multiple-selector .tag-wrapper[data-v-95b69442] {
|
|
113
101
|
display: inline-flex;
|
|
114
102
|
align-items: center;
|
|
115
103
|
max-width: 100%;
|
|
116
104
|
}
|
|
117
|
-
.multiple-selector .search-input[data-v-
|
|
118
|
-
outline: none;
|
|
119
|
-
border: none;
|
|
120
|
-
height: 28px;
|
|
105
|
+
.multiple-selector .search-input[data-v-95b69442] {
|
|
121
106
|
min-width: 10px;
|
|
107
|
+
height: 28px;
|
|
122
108
|
background: transparent;
|
|
109
|
+
border: none;
|
|
110
|
+
outline: none;
|
|
123
111
|
}
|
|
124
|
-
.multiple-selector .search-input[data-v-
|
|
112
|
+
.multiple-selector .search-input[data-v-95b69442]::placeholder {
|
|
125
113
|
color: #c4c6cc;
|
|
126
114
|
}
|
|
127
|
-
.multiple-selector .search-input.inline[data-v-
|
|
115
|
+
.multiple-selector .search-input.inline[data-v-95b69442] {
|
|
128
116
|
min-width: 10px;
|
|
129
117
|
}
|
|
130
|
-
.multiple-selector .search-input.last[data-v-
|
|
118
|
+
.multiple-selector .search-input.last[data-v-95b69442], .multiple-selector .search-input.collapsed[data-v-95b69442] {
|
|
131
119
|
flex: 1;
|
|
132
120
|
min-width: 60px;
|
|
133
|
-
}.single-selector[data-v-
|
|
121
|
+
}.single-selector[data-v-4fec9d7c] {
|
|
134
122
|
position: relative;
|
|
135
123
|
width: 100%;
|
|
136
124
|
}
|
|
137
|
-
.input-container[data-v-
|
|
125
|
+
.input-container[data-v-4fec9d7c] {
|
|
138
126
|
position: relative;
|
|
139
127
|
display: flex;
|
|
140
128
|
align-items: center;
|
|
141
129
|
min-height: 32px;
|
|
142
|
-
border: 1px solid #dcdee5;
|
|
143
|
-
border-radius: 2px;
|
|
144
130
|
padding: 0 8px;
|
|
145
131
|
background-color: #fff;
|
|
132
|
+
border: 1px solid #c4c6cc;
|
|
133
|
+
border-radius: 2px;
|
|
146
134
|
}
|
|
147
|
-
.input-container[data-v-
|
|
135
|
+
.input-container[data-v-4fec9d7c]:focus-within {
|
|
148
136
|
border-color: #3a84ff;
|
|
149
137
|
box-shadow: 0 0 0 2px rgba(58, 132, 255, 0.1);
|
|
150
138
|
}
|
|
151
|
-
.search-input[data-v-
|
|
139
|
+
.search-input[data-v-4fec9d7c] {
|
|
152
140
|
flex: 1;
|
|
153
|
-
outline: none;
|
|
154
|
-
border: none;
|
|
155
141
|
height: 30px;
|
|
156
142
|
background: transparent;
|
|
143
|
+
border: none;
|
|
144
|
+
outline: none;
|
|
157
145
|
}
|
|
158
|
-
.search-input[data-v-
|
|
146
|
+
.search-input[data-v-4fec9d7c]::placeholder {
|
|
159
147
|
color: #c4c6cc;
|
|
160
|
-
}.bk-user-selector[data-v-
|
|
161
|
-
width: 100%;
|
|
148
|
+
}.bk-user-selector[data-v-78f5783f] {
|
|
162
149
|
position: relative;
|
|
150
|
+
width: 100%;
|
|
163
151
|
font-size: 12px;
|
|
164
152
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
renderTag: FunctionConstructor;
|
|
3
|
-
userInfo: ObjectConstructor;
|
|
4
|
-
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
5
|
-
renderTag: FunctionConstructor;
|
|
6
|
-
userInfo: ObjectConstructor;
|
|
7
|
-
}>>, {}, {}>;
|
|
8
|
-
export default _default;
|