@blueking/bk-user-selector 0.0.23 → 0.0.25
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 +14 -12
- package/package.json +1 -1
- package/typings/components/multiple-selector.vue.d.ts +3 -0
- package/typings/components/single-selector.vue.d.ts +3 -0
- package/typings/components/user-selector.vue.d.ts +3 -0
- package/typings/types/index.d.ts +4 -0
- package/vue2/index.es.min.js +4630 -6887
- package/vue2/index.iife.min.js +4636 -6893
- package/vue2/index.umd.min.js +4618 -6875
- package/vue2/vue2.css +188 -705
- package/vue3/index.es.min.js +21 -13
- package/vue3/index.iife.min.js +4618 -6875
- package/vue3/index.umd.min.js +21 -13
- package/vue3/vue3.css +16 -16
package/README.md
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 蓝鲸多租户人员选择器组件
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://badge.fury.io/js/%40blueking%2Fbk-user-selector)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
蓝鲸多租户人员选择器(BkUserSelector)是一个用于在蓝鲸系统中选择用户的组件,支持单选和多选模式,具备搜索、跨租户查询等功能。
|
|
4
7
|
|
|
5
8
|
## 特性
|
|
6
9
|
|
|
10
|
+
- 支持 Vue2 和 Vue3 双版本
|
|
7
11
|
- 支持单选和多选模式
|
|
8
12
|
- 支持用户搜索功能
|
|
9
13
|
- 支持跨租户显示
|
|
@@ -22,21 +26,12 @@ npm install @blueking/bk-user-selector
|
|
|
22
26
|
### 在 Vue3 中使用
|
|
23
27
|
|
|
24
28
|
```javascript
|
|
25
|
-
// 全局注册
|
|
26
|
-
import { createApp } from 'vue';
|
|
27
29
|
import BkUserSelector from '@blueking/bk-user-selector';
|
|
28
30
|
import '@blueking/bk-user-selector/vue3/vue3.css';
|
|
29
31
|
|
|
30
|
-
const app = createApp(App);
|
|
31
|
-
app.use(BkUserSelector);
|
|
32
|
-
app.mount('#app');
|
|
33
|
-
|
|
34
|
-
// 或者局部注册
|
|
35
|
-
import { UserSelector } from '@blueking/bk-user-selector';
|
|
36
|
-
|
|
37
32
|
export default {
|
|
38
33
|
components: {
|
|
39
|
-
BkUserSelector
|
|
34
|
+
BkUserSelector,
|
|
40
35
|
},
|
|
41
36
|
};
|
|
42
37
|
```
|
|
@@ -46,6 +41,12 @@ export default {
|
|
|
46
41
|
```javascript
|
|
47
42
|
import BkUserSelector from '@blueking/bk-user-selector/vue2';
|
|
48
43
|
import '@blueking/bk-user-selector/vue2/vue2.css';
|
|
44
|
+
|
|
45
|
+
export default {
|
|
46
|
+
components: {
|
|
47
|
+
BkUserSelector,
|
|
48
|
+
},
|
|
49
|
+
};
|
|
49
50
|
```
|
|
50
51
|
|
|
51
52
|
### 基本用法
|
|
@@ -140,6 +141,7 @@ import '@blueking/bk-user-selector/vue2/vue2.css';
|
|
|
140
141
|
| emptyText | 无匹配人员时的提示文本 | String | 无匹配人员 |
|
|
141
142
|
| renderTag | 渲染标签 | Function(h, userInfo) => VNode | - |
|
|
142
143
|
| renderListItem | 渲染列表项 | Function(h, userInfo) => VNode | - |
|
|
144
|
+
| excludeUserIds | 排除的用户ID列表 | Array | [] |
|
|
143
145
|
|
|
144
146
|
### 事件
|
|
145
147
|
|
package/package.json
CHANGED
|
@@ -12,6 +12,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
12
12
|
userGroup: () => never[];
|
|
13
13
|
userGroupName: string;
|
|
14
14
|
emptyText: string;
|
|
15
|
+
excludeUserIds: () => never[];
|
|
15
16
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
17
|
"update:selectedUsers": (...args: any[]) => void;
|
|
17
18
|
"add-user": (...args: any[]) => void;
|
|
@@ -29,6 +30,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
29
30
|
userGroup: () => never[];
|
|
30
31
|
userGroupName: string;
|
|
31
32
|
emptyText: string;
|
|
33
|
+
excludeUserIds: () => never[];
|
|
32
34
|
}>>> & {
|
|
33
35
|
"onUpdate:selectedUsers"?: ((...args: any[]) => any) | undefined;
|
|
34
36
|
"onAdd-user"?: ((...args: any[]) => any) | undefined;
|
|
@@ -54,6 +56,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
54
56
|
apiBaseUrl: string;
|
|
55
57
|
placeholder: string;
|
|
56
58
|
exactSearchKey: string;
|
|
59
|
+
excludeUserIds: string[];
|
|
57
60
|
}, {}>;
|
|
58
61
|
export default _default;
|
|
59
62
|
type __VLS_WithDefaults<P, D> = {
|
|
@@ -9,6 +9,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
9
9
|
userGroup: () => never[];
|
|
10
10
|
userGroupName: string;
|
|
11
11
|
emptyText: string;
|
|
12
|
+
excludeUserIds: () => never[];
|
|
12
13
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
14
|
change: (...args: any[]) => void;
|
|
14
15
|
"update:modelValue": (...args: any[]) => void;
|
|
@@ -22,6 +23,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
22
23
|
userGroup: () => never[];
|
|
23
24
|
userGroupName: string;
|
|
24
25
|
emptyText: string;
|
|
26
|
+
excludeUserIds: () => never[];
|
|
25
27
|
}>>> & {
|
|
26
28
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
27
29
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -43,6 +45,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
43
45
|
apiBaseUrl: string;
|
|
44
46
|
placeholder: string;
|
|
45
47
|
exactSearchKey: string;
|
|
48
|
+
excludeUserIds: string[];
|
|
46
49
|
}, {}>;
|
|
47
50
|
export default _default;
|
|
48
51
|
type __VLS_WithDefaults<P, D> = {
|
|
@@ -11,6 +11,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
11
11
|
userGroup: () => never[];
|
|
12
12
|
userGroupName: string;
|
|
13
13
|
emptyText: string;
|
|
14
|
+
excludeUserIds: () => never[];
|
|
14
15
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
16
|
change: (...args: any[]) => void;
|
|
16
17
|
"update:modelValue": (...args: any[]) => void;
|
|
@@ -26,6 +27,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
26
27
|
userGroup: () => never[];
|
|
27
28
|
userGroupName: string;
|
|
28
29
|
emptyText: string;
|
|
30
|
+
excludeUserIds: () => never[];
|
|
29
31
|
}>>> & {
|
|
30
32
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
31
33
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -49,6 +51,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
49
51
|
apiBaseUrl: string;
|
|
50
52
|
placeholder: string;
|
|
51
53
|
exactSearchKey: string;
|
|
54
|
+
excludeUserIds: string[];
|
|
52
55
|
multiple: boolean;
|
|
53
56
|
}, {}>;
|
|
54
57
|
export default _default;
|
package/typings/types/index.d.ts
CHANGED