@blueking/bk-user-selector 0.0.22 → 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 +5 -5
- package/typings/components/single-selector.vue.d.ts +4 -41
- package/typings/components/user-render.d.ts +3 -3
- package/typings/components/user-selector.vue.d.ts +4 -45
- package/typings/components/user-tag.vue.d.ts +8 -42
- 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 +46 -48
- package/vue2/index.iife.min.js +2691 -2175
- package/vue2/index.umd.min.js +46 -48
- package/vue2/vue2.css +34 -34
- package/vue3/index.es.min.js +12 -12
- package/vue3/index.iife.min.js +13 -13
- package/vue3/index.umd.min.js +13 -13
- package/vue3/vue3.css +34 -34
- package/typings/components/render-tag.d.ts +0 -8
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
2
|
/**
|
|
3
3
|
* 当前用户ID
|
|
4
4
|
*/
|
|
@@ -13,7 +13,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
13
|
type: BooleanConstructor;
|
|
14
14
|
default: boolean;
|
|
15
15
|
};
|
|
16
|
-
}
|
|
16
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
17
|
click: (...args: any[]) => void;
|
|
18
18
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
19
|
/**
|
|
@@ -30,10 +30,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
30
|
type: BooleanConstructor;
|
|
31
31
|
default: boolean;
|
|
32
32
|
};
|
|
33
|
-
}>> & {
|
|
33
|
+
}>> & Readonly<{
|
|
34
34
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
35
|
-
}
|
|
35
|
+
}>, {
|
|
36
36
|
currentUserId: string;
|
|
37
37
|
isDisabled: boolean;
|
|
38
|
-
}, {}>;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
39
39
|
export default _default;
|
|
@@ -1,39 +1,13 @@
|
|
|
1
1
|
import { FormattedUser, MultipleSelectorProps } from '../types';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<
|
|
3
|
-
modelValue: () => never[];
|
|
4
|
-
placeholder: string;
|
|
5
|
-
draggable: boolean;
|
|
6
|
-
apiBaseUrl: string;
|
|
7
|
-
tenantId: string;
|
|
8
|
-
selectedUsers: () => never[];
|
|
9
|
-
tenants: () => {};
|
|
10
|
-
currentUserId: string;
|
|
11
|
-
exactSearchKey: string;
|
|
12
|
-
userGroup: () => never[];
|
|
13
|
-
userGroupName: string;
|
|
14
|
-
emptyText: string;
|
|
15
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
+
declare const _default: import("vue").DefineComponent<MultipleSelectorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
3
|
"update:selectedUsers": (...args: any[]) => void;
|
|
17
4
|
"add-user": (...args: any[]) => void;
|
|
18
5
|
"remove-user": (...args: any[]) => void;
|
|
19
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
20
|
-
modelValue: () => never[];
|
|
21
|
-
placeholder: string;
|
|
22
|
-
draggable: boolean;
|
|
23
|
-
apiBaseUrl: string;
|
|
24
|
-
tenantId: string;
|
|
25
|
-
selectedUsers: () => never[];
|
|
26
|
-
tenants: () => {};
|
|
27
|
-
currentUserId: string;
|
|
28
|
-
exactSearchKey: string;
|
|
29
|
-
userGroup: () => never[];
|
|
30
|
-
userGroupName: string;
|
|
31
|
-
emptyText: string;
|
|
32
|
-
}>>> & {
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<MultipleSelectorProps> & Readonly<{
|
|
33
7
|
"onUpdate:selectedUsers"?: ((...args: any[]) => any) | undefined;
|
|
34
8
|
"onAdd-user"?: ((...args: any[]) => any) | undefined;
|
|
35
9
|
"onRemove-user"?: ((...args: any[]) => any) | undefined;
|
|
36
|
-
}
|
|
10
|
+
}>, {
|
|
37
11
|
tenantId: string;
|
|
38
12
|
currentUserId: string;
|
|
39
13
|
tenants: Record<string, string>;
|
|
@@ -54,22 +28,5 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
54
28
|
apiBaseUrl: string;
|
|
55
29
|
placeholder: string;
|
|
56
30
|
exactSearchKey: string;
|
|
57
|
-
}, {}>;
|
|
31
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
58
32
|
export default _default;
|
|
59
|
-
type __VLS_WithDefaults<P, D> = {
|
|
60
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
61
|
-
default: D[K];
|
|
62
|
-
}> : P[K];
|
|
63
|
-
};
|
|
64
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
65
|
-
type __VLS_TypePropsToOption<T> = {
|
|
66
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
67
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
68
|
-
} : {
|
|
69
|
-
type: import('vue').PropType<T[K]>;
|
|
70
|
-
required: true;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
type __VLS_PrettifyLocal<T> = {
|
|
74
|
-
[K in keyof T]: T[K];
|
|
75
|
-
} & {};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { createVNode, VNode } from 'vue';
|
|
5
5
|
import { FormattedUser } from '../types';
|
|
6
|
-
declare const _default: import("vue").DefineComponent<{
|
|
6
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
7
7
|
/**
|
|
8
8
|
* 是否显示下拉菜单
|
|
9
9
|
*/
|
|
@@ -91,7 +91,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
91
91
|
renderListItem: {
|
|
92
92
|
type: () => (h: typeof createVNode, item: FormattedUser) => VNode;
|
|
93
93
|
};
|
|
94
|
-
}
|
|
94
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
95
95
|
"select-user": (...args: any[]) => void;
|
|
96
96
|
"click-outside": (...args: any[]) => void;
|
|
97
97
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -182,10 +182,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
182
182
|
renderListItem: {
|
|
183
183
|
type: () => (h: typeof createVNode, item: FormattedUser) => VNode;
|
|
184
184
|
};
|
|
185
|
-
}>> & {
|
|
185
|
+
}>> & Readonly<{
|
|
186
186
|
"onSelect-user"?: ((...args: any[]) => any) | undefined;
|
|
187
187
|
"onClick-outside"?: ((...args: any[]) => any) | undefined;
|
|
188
|
-
}
|
|
188
|
+
}>, {
|
|
189
189
|
tenantId: string;
|
|
190
190
|
tenants: Record<string, string>;
|
|
191
191
|
isShow: boolean;
|
|
@@ -201,5 +201,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
201
201
|
}[];
|
|
202
202
|
userGroupName: string;
|
|
203
203
|
emptyText: string;
|
|
204
|
-
}, {}>;
|
|
204
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
205
205
|
export default _default;
|
|
@@ -1,31 +1,11 @@
|
|
|
1
1
|
import { SingleSelectorProps } from '../types';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<
|
|
3
|
-
apiBaseUrl: string;
|
|
4
|
-
tenantId: string;
|
|
5
|
-
placeholder: string;
|
|
6
|
-
modelValue: string;
|
|
7
|
-
currentUserId: string;
|
|
8
|
-
exactSearchKey: string;
|
|
9
|
-
userGroup: () => never[];
|
|
10
|
-
userGroupName: string;
|
|
11
|
-
emptyText: string;
|
|
12
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
+
declare const _default: import("vue").DefineComponent<SingleSelectorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
3
|
change: (...args: any[]) => void;
|
|
14
4
|
"update:modelValue": (...args: any[]) => void;
|
|
15
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
16
|
-
apiBaseUrl: string;
|
|
17
|
-
tenantId: string;
|
|
18
|
-
placeholder: string;
|
|
19
|
-
modelValue: string;
|
|
20
|
-
currentUserId: string;
|
|
21
|
-
exactSearchKey: string;
|
|
22
|
-
userGroup: () => never[];
|
|
23
|
-
userGroupName: string;
|
|
24
|
-
emptyText: string;
|
|
25
|
-
}>>> & {
|
|
5
|
+
}, string, import("vue").PublicProps, Readonly<SingleSelectorProps> & Readonly<{
|
|
26
6
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
27
7
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
28
|
-
}
|
|
8
|
+
}>, {
|
|
29
9
|
tenantId: string;
|
|
30
10
|
currentUserId: string;
|
|
31
11
|
userGroup: {
|
|
@@ -43,22 +23,5 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
43
23
|
apiBaseUrl: string;
|
|
44
24
|
placeholder: string;
|
|
45
25
|
exactSearchKey: string;
|
|
46
|
-
}, {}>;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
47
27
|
export default _default;
|
|
48
|
-
type __VLS_WithDefaults<P, D> = {
|
|
49
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
50
|
-
default: D[K];
|
|
51
|
-
}> : P[K];
|
|
52
|
-
};
|
|
53
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
54
|
-
type __VLS_TypePropsToOption<T> = {
|
|
55
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
56
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
57
|
-
} : {
|
|
58
|
-
type: import('vue').PropType<T[K]>;
|
|
59
|
-
required: true;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
type __VLS_PrettifyLocal<T> = {
|
|
63
|
-
[K in keyof T]: T[K];
|
|
64
|
-
} & {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FormattedUser } from '../types';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
3
|
user: {
|
|
4
4
|
type: () => FormattedUser;
|
|
5
5
|
required: true;
|
|
@@ -16,7 +16,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
16
16
|
type: FunctionConstructor;
|
|
17
17
|
required: false;
|
|
18
18
|
};
|
|
19
|
-
}
|
|
19
|
+
}>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
20
|
user: {
|
|
21
21
|
type: () => FormattedUser;
|
|
22
22
|
required: true;
|
|
@@ -33,5 +33,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
33
33
|
type: FunctionConstructor;
|
|
34
34
|
required: false;
|
|
35
35
|
};
|
|
36
|
-
}
|
|
36
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
37
37
|
export default _default;
|
|
@@ -1,35 +1,11 @@
|
|
|
1
1
|
import { UserSelectorProps } from '../types';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<
|
|
3
|
-
apiBaseUrl: string;
|
|
4
|
-
tenantId: string;
|
|
5
|
-
placeholder: string;
|
|
6
|
-
modelValue: string;
|
|
7
|
-
draggable: boolean;
|
|
8
|
-
multiple: boolean;
|
|
9
|
-
currentUserId: string;
|
|
10
|
-
exactSearchKey: string;
|
|
11
|
-
userGroup: () => never[];
|
|
12
|
-
userGroupName: string;
|
|
13
|
-
emptyText: string;
|
|
14
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
+
declare const _default: import("vue").DefineComponent<UserSelectorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
3
|
change: (...args: any[]) => void;
|
|
16
4
|
"update:modelValue": (...args: any[]) => void;
|
|
17
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
18
|
-
apiBaseUrl: string;
|
|
19
|
-
tenantId: string;
|
|
20
|
-
placeholder: string;
|
|
21
|
-
modelValue: string;
|
|
22
|
-
draggable: boolean;
|
|
23
|
-
multiple: boolean;
|
|
24
|
-
currentUserId: string;
|
|
25
|
-
exactSearchKey: string;
|
|
26
|
-
userGroup: () => never[];
|
|
27
|
-
userGroupName: string;
|
|
28
|
-
emptyText: string;
|
|
29
|
-
}>>> & {
|
|
5
|
+
}, string, import("vue").PublicProps, Readonly<UserSelectorProps> & Readonly<{
|
|
30
6
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
31
7
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
32
|
-
}
|
|
8
|
+
}>, {
|
|
33
9
|
tenantId: string;
|
|
34
10
|
currentUserId: string;
|
|
35
11
|
userGroup: {
|
|
@@ -50,22 +26,5 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
50
26
|
placeholder: string;
|
|
51
27
|
exactSearchKey: string;
|
|
52
28
|
multiple: boolean;
|
|
53
|
-
}, {}>;
|
|
29
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
54
30
|
export default _default;
|
|
55
|
-
type __VLS_WithDefaults<P, D> = {
|
|
56
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
57
|
-
default: D[K];
|
|
58
|
-
}> : P[K];
|
|
59
|
-
};
|
|
60
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
61
|
-
type __VLS_TypePropsToOption<T> = {
|
|
62
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
63
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
64
|
-
} : {
|
|
65
|
-
type: import('vue').PropType<T[K]>;
|
|
66
|
-
required: true;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
type __VLS_PrettifyLocal<T> = {
|
|
70
|
-
[K in keyof T]: T[K];
|
|
71
|
-
} & {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { createVNode, VNode } from 'vue';
|
|
2
2
|
import { FormattedUser } from '../types';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* 组件属性
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
4
7
|
/**
|
|
5
8
|
* 用户信息
|
|
6
9
|
*/
|
|
@@ -29,49 +32,12 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
|
29
32
|
* 渲染标签
|
|
30
33
|
*/
|
|
31
34
|
renderTag?: (h: typeof createVNode, userInfo: FormattedUser) => VNode;
|
|
32
|
-
}
|
|
35
|
+
};
|
|
36
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
37
|
click: (...args: any[]) => void;
|
|
34
38
|
close: (...args: any[]) => void;
|
|
35
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
36
|
-
/**
|
|
37
|
-
* 用户信息
|
|
38
|
-
*/
|
|
39
|
-
user: FormattedUser;
|
|
40
|
-
/**
|
|
41
|
-
* 租户数据映射
|
|
42
|
-
*/
|
|
43
|
-
tenants: Record<string, string>;
|
|
44
|
-
/**
|
|
45
|
-
* 当前租户ID
|
|
46
|
-
*/
|
|
47
|
-
currentTenantId: string;
|
|
48
|
-
/**
|
|
49
|
-
* 是否可拖拽
|
|
50
|
-
*/
|
|
51
|
-
draggable?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* 是否激活状态
|
|
54
|
-
*/
|
|
55
|
-
active?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* 是否显示租户信息
|
|
58
|
-
*/
|
|
59
|
-
showTenant?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* 渲染标签
|
|
62
|
-
*/
|
|
63
|
-
renderTag?: (h: typeof createVNode, userInfo: FormattedUser) => VNode;
|
|
64
|
-
}>>> & {
|
|
39
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
65
40
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
66
41
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
67
|
-
}, {}, {}>;
|
|
42
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
68
43
|
export default _default;
|
|
69
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
70
|
-
type __VLS_TypePropsToOption<T> = {
|
|
71
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
72
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
73
|
-
} : {
|
|
74
|
-
type: import('vue').PropType<T[K]>;
|
|
75
|
-
required: true;
|
|
76
|
-
};
|
|
77
|
-
};
|
|
@@ -10,7 +10,7 @@ import { type Ref } from 'vue';
|
|
|
10
10
|
* @returns 租户数据和加载状态
|
|
11
11
|
*/
|
|
12
12
|
export declare const useTenantData: (apiBaseUrl: string, tenantId: string) => {
|
|
13
|
-
tenants: Ref<Record<string, string>>;
|
|
14
|
-
loading: Ref<boolean>;
|
|
13
|
+
tenants: Ref<Record<string, string>, Record<string, string>>;
|
|
14
|
+
loading: Ref<boolean, boolean>;
|
|
15
15
|
fetchTenants: () => Promise<void>;
|
|
16
16
|
};
|
|
@@ -11,9 +11,9 @@ import { type FormattedUser } from '../types';
|
|
|
11
11
|
* @returns 用户搜索相关状态和方法
|
|
12
12
|
*/
|
|
13
13
|
export declare const useUserSearch: (apiBaseUrl: string, tenantId: string) => {
|
|
14
|
-
searchResults: Ref<FormattedUser[]>;
|
|
15
|
-
loading: Ref<boolean>;
|
|
16
|
-
searchQuery: Ref<string>;
|
|
14
|
+
searchResults: Ref<FormattedUser[], FormattedUser[]>;
|
|
15
|
+
loading: Ref<boolean, boolean>;
|
|
16
|
+
searchQuery: Ref<string, string>;
|
|
17
17
|
performSearch: (keyword: string) => Promise<void>;
|
|
18
18
|
handleSearchInput: (value: string) => void;
|
|
19
19
|
clearSearch: () => void;
|
package/typings/vue2.d.ts
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import BkUserSelector from './components/user-selector.vue';
|
|
2
2
|
declare const _default: {
|
|
3
|
+
created(): void;
|
|
3
4
|
model: {
|
|
4
5
|
prop: string;
|
|
5
6
|
event: string;
|
|
6
7
|
};
|
|
7
|
-
beforeDestroy(): void;
|
|
8
|
-
created(): void;
|
|
9
|
-
data(): {
|
|
10
|
-
app: null;
|
|
11
|
-
unWatchStack: never[];
|
|
12
|
-
};
|
|
13
|
-
mounted(): void;
|
|
14
8
|
name: string;
|
|
15
9
|
props: any;
|
|
16
10
|
render(createElement: any): any;
|
package/vue2/index.es.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "@blueking/bkui-library";
|
|
2
|
-
import { ref, onBeforeMount, defineComponent, createElementBlock, createCommentVNode, openBlock, withModifiers, normalizeClass, h as h$1, computed, createBlock, unref, withCtx, createVNode, createElementVNode, toDisplayString, Fragment, renderList, watch, nextTick, onMounted, withDirectives, isRef, vModelText, createTextVNode, createApp } from "@blueking/bkui-library";
|
|
2
|
+
import { ref, onBeforeMount, defineComponent, createElementBlock, createCommentVNode, openBlock, withModifiers, normalizeClass, h as h$1, computed, createBlock, unref, withCtx, createVNode, createElementVNode, toDisplayString, Fragment, renderList, watch, nextTick, onMounted, withDirectives, isRef, vModelText, createTextVNode, createApp, getCurrentInstance, onBeforeUnmount } from "@blueking/bkui-library";
|
|
3
3
|
const getTenants = async (apiBaseUrl, tenantId) => {
|
|
4
4
|
if (!apiBaseUrl || !tenantId) {
|
|
5
5
|
console.warn("获取租户信息需要提供有效的apiBaseUrl和租户ID");
|
|
@@ -17005,7 +17005,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
17005
17005
|
};
|
|
17006
17006
|
}
|
|
17007
17007
|
});
|
|
17008
|
-
const UserTag = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
17008
|
+
const UserTag = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-487799ec"]]);
|
|
17009
17009
|
const _hoisted_1$2 = ["onClick"];
|
|
17010
17010
|
const _hoisted_2$1 = ["placeholder"];
|
|
17011
17011
|
const _hoisted_3 = ["placeholder"];
|
|
@@ -17497,7 +17497,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
17497
17497
|
};
|
|
17498
17498
|
}
|
|
17499
17499
|
});
|
|
17500
|
-
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
17500
|
+
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-95b69442"]]);
|
|
17501
17501
|
const _hoisted_1$1 = { class: "input-container" };
|
|
17502
17502
|
const _hoisted_2 = ["placeholder"];
|
|
17503
17503
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
@@ -17540,9 +17540,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
17540
17540
|
type: "userGroup"
|
|
17541
17541
|
}));
|
|
17542
17542
|
const list = [...options.value, ...userGroup];
|
|
17543
|
-
|
|
17544
|
-
emit("change", selectedUserInfo2 || null);
|
|
17545
|
-
return selectedUserInfo2;
|
|
17543
|
+
return list.find((user) => user.id === selectedUser.value);
|
|
17546
17544
|
});
|
|
17547
17545
|
onBeforeMount(async () => {
|
|
17548
17546
|
if (typeof props2.modelValue === "string" && props2.modelValue) {
|
|
@@ -17617,9 +17615,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
17617
17615
|
const handleClickOutside = () => {
|
|
17618
17616
|
showDropdown.value = false;
|
|
17619
17617
|
};
|
|
17620
|
-
watch(
|
|
17621
|
-
emit("
|
|
17622
|
-
});
|
|
17618
|
+
watch(selectedUserInfo, (newVal) => {
|
|
17619
|
+
emit("change", newVal || null);
|
|
17620
|
+
}, { immediate: true });
|
|
17623
17621
|
return (_ctx, _cache) => {
|
|
17624
17622
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
17625
17623
|
ref_key: "containerRef",
|
|
@@ -17680,7 +17678,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
17680
17678
|
};
|
|
17681
17679
|
}
|
|
17682
17680
|
});
|
|
17683
|
-
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
17681
|
+
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-4fec9d7c"]]);
|
|
17684
17682
|
const _hoisted_1 = {
|
|
17685
17683
|
ref: "containerRef",
|
|
17686
17684
|
class: "bk-user-selector"
|
|
@@ -17753,13 +17751,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17753
17751
|
watch(selectedUser, (newVal) => {
|
|
17754
17752
|
if (!props2.multiple) {
|
|
17755
17753
|
emit("update:modelValue", newVal);
|
|
17754
|
+
emit("change", newVal);
|
|
17756
17755
|
}
|
|
17757
|
-
});
|
|
17756
|
+
}, { immediate: true });
|
|
17758
17757
|
watch(
|
|
17759
17758
|
() => props2.userGroup,
|
|
17760
17759
|
() => {
|
|
17761
17760
|
initSelectedUsers();
|
|
17762
|
-
}
|
|
17761
|
+
},
|
|
17762
|
+
{ immediate: true }
|
|
17763
17763
|
);
|
|
17764
17764
|
onBeforeMount(() => {
|
|
17765
17765
|
initSelectedUsers();
|
|
@@ -17820,54 +17820,52 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17820
17820
|
};
|
|
17821
17821
|
}
|
|
17822
17822
|
});
|
|
17823
|
-
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
17823
|
+
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-78f5783f"]]);
|
|
17824
17824
|
const vue2 = {
|
|
17825
|
-
model: {
|
|
17826
|
-
prop: "modelValue",
|
|
17827
|
-
event: "change"
|
|
17828
|
-
},
|
|
17829
|
-
beforeDestroy() {
|
|
17830
|
-
var _a;
|
|
17831
|
-
this.unWatchStack.forEach((unWatch) => unWatch == null ? void 0 : unWatch());
|
|
17832
|
-
(_a = this.app) == null ? void 0 : _a.unmount();
|
|
17833
|
-
},
|
|
17834
17825
|
created() {
|
|
17835
|
-
const
|
|
17836
|
-
|
|
17837
|
-
|
|
17838
|
-
|
|
17839
|
-
|
|
17840
|
-
|
|
17841
|
-
|
|
17842
|
-
|
|
17843
|
-
|
|
17844
|
-
|
|
17845
|
-
|
|
17826
|
+
const that = this;
|
|
17827
|
+
let app = createApp({
|
|
17828
|
+
setup() {
|
|
17829
|
+
const currentInstance = getCurrentInstance();
|
|
17830
|
+
const unwatchList = Object.keys(that.$props).map((key) => {
|
|
17831
|
+
return that.$watch(key, () => {
|
|
17832
|
+
currentInstance.proxy.$forceUpdate();
|
|
17833
|
+
});
|
|
17834
|
+
});
|
|
17835
|
+
onBeforeUnmount(() => {
|
|
17836
|
+
unwatchList.forEach((unwatch) => unwatch());
|
|
17837
|
+
});
|
|
17838
|
+
return () => h$1(BkUserSelector, {
|
|
17839
|
+
...that.$props,
|
|
17840
|
+
"onUpdate:modelValue": (value) => {
|
|
17841
|
+
that.$emit("update:modelValue", value);
|
|
17842
|
+
that.$emit("change", value);
|
|
17846
17843
|
},
|
|
17847
|
-
|
|
17844
|
+
onChange: (value) => {
|
|
17845
|
+
console.info("onChange", value);
|
|
17846
|
+
that.$emit("change", value);
|
|
17847
|
+
}
|
|
17848
17848
|
});
|
|
17849
17849
|
}
|
|
17850
17850
|
});
|
|
17851
|
-
this
|
|
17852
|
-
|
|
17853
|
-
|
|
17854
|
-
|
|
17855
|
-
|
|
17851
|
+
this.$once("hook:mounted", () => {
|
|
17852
|
+
app.mount(this.$el);
|
|
17853
|
+
console.info("app", app);
|
|
17854
|
+
});
|
|
17855
|
+
this.$once("hook:beforeDestroy", () => {
|
|
17856
|
+
app.unmount();
|
|
17857
|
+
console.info("unmount", app);
|
|
17858
|
+
app = null;
|
|
17856
17859
|
});
|
|
17857
17860
|
},
|
|
17858
|
-
|
|
17859
|
-
|
|
17860
|
-
|
|
17861
|
-
unWatchStack: []
|
|
17862
|
-
};
|
|
17863
|
-
},
|
|
17864
|
-
mounted() {
|
|
17865
|
-
var _a;
|
|
17866
|
-
(_a = this.app) == null ? void 0 : _a.mount(this.$el);
|
|
17861
|
+
model: {
|
|
17862
|
+
prop: "modelValue",
|
|
17863
|
+
event: "change"
|
|
17867
17864
|
},
|
|
17868
17865
|
name: "BkUserSelector",
|
|
17869
17866
|
props: BkUserSelector.props || {},
|
|
17870
17867
|
render(createElement) {
|
|
17868
|
+
console.info("render", createElement);
|
|
17871
17869
|
return createElement("div");
|
|
17872
17870
|
}
|
|
17873
17871
|
};
|