@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/vue2/vue2.css
CHANGED
|
@@ -1340,37 +1340,37 @@ optgroup {
|
|
|
1340
1340
|
background-color: #f0f1f5;
|
|
1341
1341
|
color: #c4c6cc;
|
|
1342
1342
|
cursor: not-allowed;
|
|
1343
|
-
}.dropdown-content[data-v-
|
|
1343
|
+
}.dropdown-content[data-v-13504557] {
|
|
1344
1344
|
min-height: 40px;
|
|
1345
1345
|
max-height: 300px;
|
|
1346
1346
|
overflow-y: auto;
|
|
1347
1347
|
padding: 5px 0;
|
|
1348
1348
|
}
|
|
1349
|
-
.dropdown-content .no-data[data-v-
|
|
1349
|
+
.dropdown-content .no-data[data-v-13504557] {
|
|
1350
1350
|
padding: 10px;
|
|
1351
1351
|
text-align: center;
|
|
1352
1352
|
color: #979ba5;
|
|
1353
1353
|
}
|
|
1354
|
-
.dropdown-content .user-group .group-header[data-v-
|
|
1354
|
+
.dropdown-content .user-group .group-header[data-v-13504557] {
|
|
1355
1355
|
padding: 8px 12px;
|
|
1356
1356
|
color: #979ba5;
|
|
1357
1357
|
display: flex;
|
|
1358
1358
|
align-items: center;
|
|
1359
1359
|
}
|
|
1360
|
-
.dropdown-content .user-group .group-header .group-count[data-v-
|
|
1360
|
+
.dropdown-content .user-group .group-header .group-count[data-v-13504557] {
|
|
1361
1361
|
margin-left: 4px;
|
|
1362
1362
|
}
|
|
1363
|
-
.dropdown-content .user-option[data-v-
|
|
1363
|
+
.dropdown-content .user-option[data-v-13504557] {
|
|
1364
1364
|
padding: 8px 12px;
|
|
1365
1365
|
cursor: pointer;
|
|
1366
1366
|
display: flex;
|
|
1367
1367
|
align-items: center;
|
|
1368
1368
|
height: 32px;
|
|
1369
1369
|
}
|
|
1370
|
-
.dropdown-content .user-option[data-v-
|
|
1370
|
+
.dropdown-content .user-option[data-v-13504557]:hover {
|
|
1371
1371
|
background-color: #f5f7fa;
|
|
1372
1372
|
}
|
|
1373
|
-
.dropdown-content .user-option .tenant-name[data-v-
|
|
1373
|
+
.dropdown-content .user-option .tenant-name[data-v-13504557] {
|
|
1374
1374
|
color: #f59500;
|
|
1375
1375
|
margin-left: 4px;
|
|
1376
1376
|
padding: 0 4px;
|
|
@@ -1398,58 +1398,58 @@ optgroup {
|
|
|
1398
1398
|
white-space: nowrap;
|
|
1399
1399
|
padding: 0 3px;
|
|
1400
1400
|
border-radius: 2px;
|
|
1401
|
-
}.multiple-selector[data-v-
|
|
1401
|
+
}.multiple-selector[data-v-1a376d26] {
|
|
1402
1402
|
position: relative;
|
|
1403
1403
|
width: 100%;
|
|
1404
1404
|
}
|
|
1405
|
-
.multiple-selector .tags-container[data-v-
|
|
1405
|
+
.multiple-selector .tags-container[data-v-1a376d26] {
|
|
1406
1406
|
min-height: 32px;
|
|
1407
1407
|
border: 1px solid #dcdee5;
|
|
1408
1408
|
border-radius: 2px;
|
|
1409
|
-
padding: 1px
|
|
1409
|
+
padding: 1px 10px 1px 8px;
|
|
1410
1410
|
transition: all 0.2s ease;
|
|
1411
1411
|
background-color: #fff;
|
|
1412
1412
|
}
|
|
1413
|
-
.multiple-selector .tags-container.focused[data-v-
|
|
1413
|
+
.multiple-selector .tags-container.focused[data-v-1a376d26] {
|
|
1414
1414
|
border-color: #3a84ff;
|
|
1415
1415
|
box-shadow: 0 0 0 2px rgba(58, 132, 255, 0.1);
|
|
1416
1416
|
}
|
|
1417
|
-
.multiple-selector .tags-container.collapsed[data-v-
|
|
1417
|
+
.multiple-selector .tags-container.collapsed[data-v-1a376d26] {
|
|
1418
1418
|
display: flex;
|
|
1419
1419
|
flex-wrap: wrap;
|
|
1420
1420
|
align-items: center;
|
|
1421
1421
|
}
|
|
1422
|
-
.multiple-selector .tag-list[data-v-
|
|
1422
|
+
.multiple-selector .tag-list[data-v-1a376d26] {
|
|
1423
1423
|
display: flex;
|
|
1424
1424
|
flex-wrap: wrap;
|
|
1425
1425
|
align-items: center;
|
|
1426
1426
|
}
|
|
1427
|
-
.multiple-selector .tag-wrapper[data-v-
|
|
1427
|
+
.multiple-selector .tag-wrapper[data-v-1a376d26] {
|
|
1428
1428
|
display: inline-flex;
|
|
1429
1429
|
align-items: center;
|
|
1430
1430
|
max-width: 100%;
|
|
1431
1431
|
}
|
|
1432
|
-
.multiple-selector .search-input[data-v-
|
|
1432
|
+
.multiple-selector .search-input[data-v-1a376d26] {
|
|
1433
1433
|
outline: none;
|
|
1434
1434
|
border: none;
|
|
1435
1435
|
height: 28px;
|
|
1436
1436
|
min-width: 10px;
|
|
1437
1437
|
background: transparent;
|
|
1438
1438
|
}
|
|
1439
|
-
.multiple-selector .search-input[data-v-
|
|
1439
|
+
.multiple-selector .search-input[data-v-1a376d26]::placeholder {
|
|
1440
1440
|
color: #c4c6cc;
|
|
1441
1441
|
}
|
|
1442
|
-
.multiple-selector .search-input.inline[data-v-
|
|
1442
|
+
.multiple-selector .search-input.inline[data-v-1a376d26] {
|
|
1443
1443
|
min-width: 10px;
|
|
1444
1444
|
}
|
|
1445
|
-
.multiple-selector .search-input.last[data-v-
|
|
1445
|
+
.multiple-selector .search-input.last[data-v-1a376d26], .multiple-selector .search-input.collapsed[data-v-1a376d26] {
|
|
1446
1446
|
flex: 1;
|
|
1447
1447
|
min-width: 60px;
|
|
1448
|
-
}.single-selector[data-v-
|
|
1448
|
+
}.single-selector[data-v-3926de45] {
|
|
1449
1449
|
position: relative;
|
|
1450
1450
|
width: 100%;
|
|
1451
1451
|
}
|
|
1452
|
-
.input-container[data-v-
|
|
1452
|
+
.input-container[data-v-3926de45] {
|
|
1453
1453
|
position: relative;
|
|
1454
1454
|
display: flex;
|
|
1455
1455
|
align-items: center;
|
|
@@ -1459,21 +1459,21 @@ optgroup {
|
|
|
1459
1459
|
padding: 0 8px;
|
|
1460
1460
|
background-color: #fff;
|
|
1461
1461
|
}
|
|
1462
|
-
.input-container[data-v-
|
|
1462
|
+
.input-container[data-v-3926de45]:focus-within {
|
|
1463
1463
|
border-color: #3a84ff;
|
|
1464
1464
|
box-shadow: 0 0 0 2px rgba(58, 132, 255, 0.1);
|
|
1465
1465
|
}
|
|
1466
|
-
.search-input[data-v-
|
|
1466
|
+
.search-input[data-v-3926de45] {
|
|
1467
1467
|
flex: 1;
|
|
1468
1468
|
outline: none;
|
|
1469
1469
|
border: none;
|
|
1470
1470
|
height: 30px;
|
|
1471
1471
|
background: transparent;
|
|
1472
1472
|
}
|
|
1473
|
-
.search-input[data-v-
|
|
1473
|
+
.search-input[data-v-3926de45]::placeholder {
|
|
1474
1474
|
color: #c4c6cc;
|
|
1475
1475
|
}
|
|
1476
|
-
.selected-user[data-v-
|
|
1476
|
+
.selected-user[data-v-3926de45] {
|
|
1477
1477
|
display: inline-flex;
|
|
1478
1478
|
align-items: center;
|
|
1479
1479
|
background-color: #f0f1f5;
|
|
@@ -1483,11 +1483,11 @@ optgroup {
|
|
|
1483
1483
|
height: 24px;
|
|
1484
1484
|
max-width: calc(100% - 32px);
|
|
1485
1485
|
}
|
|
1486
|
-
.selected-user .tenant-name[data-v-
|
|
1486
|
+
.selected-user .tenant-name[data-v-3926de45] {
|
|
1487
1487
|
color: #f59500;
|
|
1488
1488
|
margin-left: 4px;
|
|
1489
1489
|
}
|
|
1490
|
-
.selected-user .close-icon[data-v-
|
|
1490
|
+
.selected-user .close-icon[data-v-3926de45] {
|
|
1491
1491
|
margin-left: 4px;
|
|
1492
1492
|
cursor: pointer;
|
|
1493
1493
|
font-style: normal;
|
package/vue3/index.es.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, onBeforeMount, defineComponent, createElementBlock, createCommentVNode, openBlock, withModifiers, normalizeClass, computed, createBlock, unref, withCtx, createVNode, createElementVNode, toDisplayString, Fragment, renderList, watch, nextTick, onMounted, withDirectives, isRef, vModelText, createTextVNode, pushScopeId, popScopeId } from "vue";
|
|
2
|
-
import { Popover, Loading, Tag, clickoutside } from "bkui-vue";
|
|
2
|
+
import { Popover, Loading, Tag, bkTooltips, clickoutside } from "bkui-vue";
|
|
3
3
|
const getTenants = async (apiBaseUrl, tenantId) => {
|
|
4
4
|
if (!apiBaseUrl || !tenantId) {
|
|
5
5
|
console.warn("获取租户信息需要提供有效的apiBaseUrl和租户ID");
|
|
@@ -3153,9 +3153,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3153
3153
|
class: "user-group",
|
|
3154
3154
|
key: groupName
|
|
3155
3155
|
}, [
|
|
3156
|
-
|
|
3156
|
+
Object.keys(groupedUsers.value).length > 1 ? (openBlock(), createElementBlock(
|
|
3157
3157
|
"div",
|
|
3158
3158
|
{
|
|
3159
|
+
key: 0,
|
|
3159
3160
|
class: "group-header",
|
|
3160
3161
|
onMousedown: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
3161
3162
|
}, ["prevent"]))
|
|
@@ -3178,7 +3179,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3178
3179
|
],
|
|
3179
3180
|
32
|
|
3180
3181
|
/* NEED_HYDRATION */
|
|
3181
|
-
),
|
|
3182
|
+
)) : createCommentVNode("v-if", true),
|
|
3182
3183
|
(openBlock(true), createElementBlock(
|
|
3183
3184
|
Fragment,
|
|
3184
3185
|
null,
|
|
@@ -3223,7 +3224,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3223
3224
|
};
|
|
3224
3225
|
}
|
|
3225
3226
|
});
|
|
3226
|
-
const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
3227
|
+
const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-13504557"]]);
|
|
3227
3228
|
const _hoisted_1$3 = { class: "tag-content" };
|
|
3228
3229
|
const _hoisted_2$2 = { class: "user-name" };
|
|
3229
3230
|
const _hoisted_3$2 = {
|
|
@@ -3293,83 +3294,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3293
3294
|
},
|
|
3294
3295
|
__name: "multiple-selector",
|
|
3295
3296
|
props: {
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
},
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
type: String,
|
|
3308
|
-
default: "请输入人员名称搜索"
|
|
3309
|
-
},
|
|
3310
|
-
/**
|
|
3311
|
-
* 是否可拖拽
|
|
3312
|
-
*/
|
|
3313
|
-
draggable: {
|
|
3314
|
-
type: Boolean,
|
|
3315
|
-
default: false
|
|
3316
|
-
},
|
|
3317
|
-
/**
|
|
3318
|
-
* API 基础 URL
|
|
3319
|
-
*/
|
|
3320
|
-
apiBaseUrl: {
|
|
3321
|
-
type: String,
|
|
3322
|
-
default: ""
|
|
3323
|
-
},
|
|
3324
|
-
/**
|
|
3325
|
-
* 租户 ID
|
|
3326
|
-
*/
|
|
3327
|
-
tenantId: {
|
|
3328
|
-
type: String,
|
|
3329
|
-
default: ""
|
|
3330
|
-
},
|
|
3331
|
-
/**
|
|
3332
|
-
* 已选用户
|
|
3333
|
-
*/
|
|
3334
|
-
selectedUsers: {
|
|
3335
|
-
type: Array,
|
|
3336
|
-
default: () => []
|
|
3337
|
-
},
|
|
3338
|
-
/**
|
|
3339
|
-
* 租户信息映射
|
|
3340
|
-
*/
|
|
3341
|
-
tenants: {
|
|
3342
|
-
type: Object,
|
|
3343
|
-
default: () => ({})
|
|
3344
|
-
},
|
|
3345
|
-
/**
|
|
3346
|
-
* 当前用户ID
|
|
3347
|
-
*/
|
|
3348
|
-
currentUserId: {
|
|
3349
|
-
type: String,
|
|
3350
|
-
default: ""
|
|
3351
|
-
},
|
|
3352
|
-
/**
|
|
3353
|
-
* 精确查找key
|
|
3354
|
-
*/
|
|
3355
|
-
exactSearchKey: {
|
|
3356
|
-
type: String,
|
|
3357
|
-
default: "bk_username"
|
|
3358
|
-
},
|
|
3359
|
-
/**
|
|
3360
|
-
* 用户组
|
|
3361
|
-
*/
|
|
3362
|
-
userGroup: {
|
|
3363
|
-
type: Array,
|
|
3364
|
-
default: () => []
|
|
3365
|
-
},
|
|
3366
|
-
/**
|
|
3367
|
-
* 用户组名称
|
|
3368
|
-
*/
|
|
3369
|
-
userGroupName: {
|
|
3370
|
-
type: String,
|
|
3371
|
-
default: "用户群组"
|
|
3372
|
-
}
|
|
3297
|
+
modelValue: { default: () => [] },
|
|
3298
|
+
draggable: { type: Boolean, default: false },
|
|
3299
|
+
selectedUsers: { default: () => [] },
|
|
3300
|
+
tenants: { default: () => ({}) },
|
|
3301
|
+
apiBaseUrl: { default: "" },
|
|
3302
|
+
tenantId: { default: "" },
|
|
3303
|
+
placeholder: { default: "请输入人员名称搜索" },
|
|
3304
|
+
currentUserId: { default: "" },
|
|
3305
|
+
exactSearchKey: { default: "bk_username" },
|
|
3306
|
+
userGroup: { default: () => [] },
|
|
3307
|
+
userGroupName: { default: "用户群组" }
|
|
3373
3308
|
},
|
|
3374
3309
|
emits: ["update:selectedUsers", "add-user", "remove-user"],
|
|
3375
3310
|
setup(__props, { emit: __emit }) {
|
|
@@ -3632,7 +3567,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3632
3567
|
(openBlock(true), createElementBlock(
|
|
3633
3568
|
Fragment,
|
|
3634
3569
|
null,
|
|
3635
|
-
renderList(
|
|
3570
|
+
renderList(_ctx.selectedUsers, (user, index) => {
|
|
3636
3571
|
return openBlock(), createElementBlock("div", {
|
|
3637
3572
|
class: "tag-wrapper",
|
|
3638
3573
|
key: user.id,
|
|
@@ -3640,15 +3575,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3640
3575
|
}, [
|
|
3641
3576
|
createVNode(UserTag, {
|
|
3642
3577
|
active: index === activeTagIndex.value,
|
|
3643
|
-
"current-tenant-id":
|
|
3644
|
-
draggable:
|
|
3645
|
-
tenants:
|
|
3578
|
+
"current-tenant-id": _ctx.tenantId,
|
|
3579
|
+
draggable: _ctx.draggable,
|
|
3580
|
+
tenants: _ctx.tenants,
|
|
3646
3581
|
user,
|
|
3647
3582
|
onClick: ($event) => handleTagClick(index),
|
|
3648
3583
|
onClose: ($event) => removeUser(user)
|
|
3649
3584
|
}, null, 8, ["active", "current-tenant-id", "draggable", "tenants", "user", "onClick", "onClose"]),
|
|
3650
3585
|
createCommentVNode(" 在当前激活标签后插入输入框 "),
|
|
3651
|
-
index === activeTagIndex.value && activeTagIndex.value !==
|
|
3586
|
+
index === activeTagIndex.value && activeTagIndex.value !== _ctx.selectedUsers.length - 1 ? withDirectives((openBlock(), createElementBlock(
|
|
3652
3587
|
"input",
|
|
3653
3588
|
{
|
|
3654
3589
|
key: 0,
|
|
@@ -3674,13 +3609,13 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3674
3609
|
/* KEYED_FRAGMENT */
|
|
3675
3610
|
)),
|
|
3676
3611
|
createCommentVNode(" 最后一个输入框 "),
|
|
3677
|
-
activeTagIndex.value === -1 || activeTagIndex.value ===
|
|
3612
|
+
activeTagIndex.value === -1 || activeTagIndex.value === _ctx.selectedUsers.length - 1 ? withDirectives((openBlock(), createElementBlock("input", {
|
|
3678
3613
|
key: 0,
|
|
3679
3614
|
ref_key: "lastInputRef",
|
|
3680
3615
|
ref: lastInputRef,
|
|
3681
3616
|
class: "search-input last",
|
|
3682
3617
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(searchQuery) ? searchQuery.value = $event : null),
|
|
3683
|
-
placeholder: !
|
|
3618
|
+
placeholder: !_ctx.selectedUsers.length ? _ctx.placeholder : "",
|
|
3684
3619
|
onFocus: handleInputFocus,
|
|
3685
3620
|
onInput: handleInput,
|
|
3686
3621
|
onKeydown: handleKeyDown,
|
|
@@ -3690,8 +3625,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3690
3625
|
]) : createCommentVNode("v-if", true),
|
|
3691
3626
|
createCommentVNode(' "我"标签 '),
|
|
3692
3627
|
createVNode(MeTag, {
|
|
3693
|
-
"current-user-id":
|
|
3694
|
-
"is-disabled": !!
|
|
3628
|
+
"current-user-id": _ctx.currentUserId,
|
|
3629
|
+
"is-disabled": !!_ctx.currentUserId && _ctx.selectedUsers.some((user) => user.id === _ctx.currentUserId),
|
|
3695
3630
|
onClick: addCurrentUser
|
|
3696
3631
|
}, null, 8, ["current-user-id", "is-disabled"])
|
|
3697
3632
|
],
|
|
@@ -3720,10 +3655,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3720
3655
|
null,
|
|
3721
3656
|
renderList(visibleUsers.value, (user) => {
|
|
3722
3657
|
return openBlock(), createBlock(UserTag, {
|
|
3723
|
-
"current-tenant-id":
|
|
3658
|
+
"current-tenant-id": _ctx.tenantId,
|
|
3724
3659
|
key: user.id,
|
|
3725
3660
|
"show-tenant": true,
|
|
3726
|
-
tenants:
|
|
3661
|
+
tenants: _ctx.tenants,
|
|
3727
3662
|
user,
|
|
3728
3663
|
onClick: handleFocus,
|
|
3729
3664
|
onClose: ($event) => removeUser(user)
|
|
@@ -3733,7 +3668,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3733
3668
|
/* KEYED_FRAGMENT */
|
|
3734
3669
|
)),
|
|
3735
3670
|
createCommentVNode(" 显示折叠标签数量 "),
|
|
3736
|
-
hiddenCount.value > 0 ? (openBlock(), createBlock(unref(Tag), {
|
|
3671
|
+
hiddenCount.value > 0 ? withDirectives((openBlock(), createBlock(unref(Tag), {
|
|
3737
3672
|
key: 0,
|
|
3738
3673
|
onClick: withModifiers(handleFocus, ["stop"])
|
|
3739
3674
|
}, {
|
|
@@ -3746,22 +3681,27 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3746
3681
|
]),
|
|
3747
3682
|
_: 1
|
|
3748
3683
|
/* STABLE */
|
|
3749
|
-
}))
|
|
3684
|
+
})), [
|
|
3685
|
+
[unref(bkTooltips), {
|
|
3686
|
+
content: _ctx.selectedUsers.slice(visibleUsers.value.length).map((user) => user.display_name).join(","),
|
|
3687
|
+
placement: "top"
|
|
3688
|
+
}]
|
|
3689
|
+
]) : createCommentVNode("v-if", true),
|
|
3750
3690
|
createCommentVNode(" 搜索输入框 "),
|
|
3751
3691
|
withDirectives(createElementVNode("input", {
|
|
3752
3692
|
ref_key: "collapsedInputRef",
|
|
3753
3693
|
ref: collapsedInputRef,
|
|
3754
3694
|
class: "search-input collapsed",
|
|
3755
3695
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(searchQuery) ? searchQuery.value = $event : null),
|
|
3756
|
-
placeholder: !
|
|
3696
|
+
placeholder: !_ctx.selectedUsers.length ? _ctx.placeholder : "",
|
|
3757
3697
|
onFocus: handleFocus
|
|
3758
3698
|
}, null, 40, _hoisted_3$1), [
|
|
3759
3699
|
[vModelText, unref(searchQuery)]
|
|
3760
3700
|
]),
|
|
3761
3701
|
createCommentVNode(' 未聚焦状态下的"我"标签 '),
|
|
3762
3702
|
createVNode(MeTag, {
|
|
3763
|
-
"current-user-id":
|
|
3764
|
-
"is-disabled": !!
|
|
3703
|
+
"current-user-id": _ctx.currentUserId,
|
|
3704
|
+
"is-disabled": !!_ctx.currentUserId && _ctx.selectedUsers.some((user) => user[props.exactSearchKey] === _ctx.currentUserId),
|
|
3765
3705
|
onClick: addCurrentUser
|
|
3766
3706
|
}, null, 8, ["current-user-id", "is-disabled"])
|
|
3767
3707
|
],
|
|
@@ -3779,10 +3719,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3779
3719
|
loading: unref(searchLoading),
|
|
3780
3720
|
options: options.value,
|
|
3781
3721
|
"search-query": unref(searchQuery),
|
|
3782
|
-
"tenant-id":
|
|
3783
|
-
tenants:
|
|
3784
|
-
"user-group":
|
|
3785
|
-
"user-group-name":
|
|
3722
|
+
"tenant-id": _ctx.tenantId,
|
|
3723
|
+
tenants: _ctx.tenants,
|
|
3724
|
+
"user-group": _ctx.userGroup,
|
|
3725
|
+
"user-group-name": _ctx.userGroupName,
|
|
3786
3726
|
onSelectUser: addUser
|
|
3787
3727
|
}, null, 8, ["container-width", "is-show", "loading", "options", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
3788
3728
|
])), [
|
|
@@ -3791,8 +3731,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3791
3731
|
};
|
|
3792
3732
|
}
|
|
3793
3733
|
});
|
|
3794
|
-
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
3795
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
3734
|
+
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-1a376d26"]]);
|
|
3735
|
+
const _withScopeId = (n) => (pushScopeId("data-v-3926de45"), n = n(), popScopeId(), n);
|
|
3796
3736
|
const _hoisted_1$1 = { class: "input-container" };
|
|
3797
3737
|
const _hoisted_2 = {
|
|
3798
3738
|
key: 0,
|
|
@@ -3812,15 +3752,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3812
3752
|
},
|
|
3813
3753
|
__name: "single-selector",
|
|
3814
3754
|
props: {
|
|
3815
|
-
modelValue: {},
|
|
3755
|
+
modelValue: { default: "" },
|
|
3816
3756
|
tenants: {},
|
|
3817
|
-
apiBaseUrl: {},
|
|
3818
|
-
tenantId: {},
|
|
3819
|
-
placeholder: {},
|
|
3820
|
-
currentUserId: {},
|
|
3821
|
-
exactSearchKey: {},
|
|
3822
|
-
userGroup: {},
|
|
3823
|
-
userGroupName: {}
|
|
3757
|
+
apiBaseUrl: { default: "" },
|
|
3758
|
+
tenantId: { default: "" },
|
|
3759
|
+
placeholder: { default: "请输入人员名称搜索" },
|
|
3760
|
+
currentUserId: { default: "" },
|
|
3761
|
+
exactSearchKey: { default: "bk_username" },
|
|
3762
|
+
userGroup: { default: () => [] },
|
|
3763
|
+
userGroupName: { default: "用户群组" }
|
|
3824
3764
|
},
|
|
3825
3765
|
emits: ["update:modelValue", "change"],
|
|
3826
3766
|
setup(__props, { emit: __emit }) {
|
|
@@ -3959,10 +3899,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3959
3899
|
]),
|
|
3960
3900
|
createCommentVNode(' "我"标签 '),
|
|
3961
3901
|
createVNode(MeTag, {
|
|
3962
|
-
"is-disabled": !!_ctx.currentUserId && !!selectedUserInfo.value && selectedUserInfo.value[_ctx.exactSearchKey || "bk_username"] === _ctx.currentUserId,
|
|
3963
3902
|
"current-user-id": _ctx.currentUserId,
|
|
3903
|
+
"is-disabled": !!_ctx.currentUserId && !!selectedUserInfo.value && selectedUserInfo.value[_ctx.exactSearchKey] === _ctx.currentUserId,
|
|
3964
3904
|
onClick: addCurrentUser
|
|
3965
|
-
}, null, 8, ["
|
|
3905
|
+
}, null, 8, ["current-user-id", "is-disabled"])
|
|
3966
3906
|
]),
|
|
3967
3907
|
createCommentVNode(" 使用新的公共下拉选项组件 "),
|
|
3968
3908
|
createVNode(SelectionPopover, {
|
|
@@ -3983,7 +3923,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3983
3923
|
};
|
|
3984
3924
|
}
|
|
3985
3925
|
});
|
|
3986
|
-
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
3926
|
+
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-3926de45"]]);
|
|
3987
3927
|
const _hoisted_1 = { class: "bk-user-selector" };
|
|
3988
3928
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3989
3929
|
...{
|