@blueking/bk-user-selector 0.1.4 → 0.1.6
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 +102 -27
- package/package.json +3 -6
- package/typings/components/me-tag.vue.d.ts +2 -1
- package/typings/components/selection-popover.vue.d.ts +7 -21
- package/typings/components/user-selector.vue.d.ts +10 -2
- package/typings/components/user-tag.vue.d.ts +8 -40
- package/typings/types/index.d.ts +22 -0
- package/vue2/config.json +22 -1
- package/vue2/index.es.min.js +11618 -19680
- package/vue2/index.iife.min.js +17851 -20765
- package/vue2/index.umd.min.js +12179 -20237
- package/vue2/vue2.css +45 -30
- package/vue3/config.json +22 -1
- package/vue3/index.es.min.js +4067 -4490
- package/vue3/index.iife.min.js +12127 -14018
- package/vue3/index.umd.min.js +4135 -4549
- package/vue3/vue3.css +44 -29
package/README.md
CHANGED
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
| 👥 **用户组** | 支持用户组/角色分组显示 |
|
|
21
21
|
| ✏️ **自定义输入** | 支持创建自定义用户和自由粘贴 |
|
|
22
22
|
| 🎭 **自定义渲染** | 支持自定义标签和列表项渲染 |
|
|
23
|
+
| 📝 **多行输入** | 支持 textarea 模式,完整展示所有标签 |
|
|
23
24
|
| ⌨️ **键盘导航** | 支持上下键切换选项、Enter 快速选中 |
|
|
25
|
+
| 🎯 **焦点控制** | 支持自动聚焦和手动 focus/blur 方法 |
|
|
24
26
|
|
|
25
27
|
## 📦 安装
|
|
26
28
|
|
|
@@ -232,6 +234,37 @@ export default {
|
|
|
232
234
|
</script>
|
|
233
235
|
```
|
|
234
236
|
|
|
237
|
+
### 多行输入模式(Textarea)
|
|
238
|
+
|
|
239
|
+
当需要展示大量已选用户时,可使用 textarea 模式完整展示所有标签:
|
|
240
|
+
|
|
241
|
+
```vue
|
|
242
|
+
<template>
|
|
243
|
+
<BkUserSelector
|
|
244
|
+
v-model="selectedUsers"
|
|
245
|
+
:api-base-url="apiBaseUrl"
|
|
246
|
+
:tenant-id="tenantId"
|
|
247
|
+
:multiple="true"
|
|
248
|
+
type="textarea"
|
|
249
|
+
:rows="4"
|
|
250
|
+
:resize="true"
|
|
251
|
+
@change="handleChange"
|
|
252
|
+
/>
|
|
253
|
+
</template>
|
|
254
|
+
|
|
255
|
+
<script setup>
|
|
256
|
+
import { ref } from 'vue';
|
|
257
|
+
|
|
258
|
+
const apiBaseUrl = ref('https://api.example.com');
|
|
259
|
+
const tenantId = ref('default');
|
|
260
|
+
const selectedUsers = ref([]);
|
|
261
|
+
|
|
262
|
+
const handleChange = users => {
|
|
263
|
+
console.log('Selected:', users);
|
|
264
|
+
};
|
|
265
|
+
</script>
|
|
266
|
+
```
|
|
267
|
+
|
|
235
268
|
### 排除指定用户
|
|
236
269
|
|
|
237
270
|
从下拉列表中排除特定用户:
|
|
@@ -262,30 +295,34 @@ export default {
|
|
|
262
295
|
|
|
263
296
|
### Props 属性
|
|
264
297
|
|
|
265
|
-
| 参数 | 说明
|
|
266
|
-
| --------------------- |
|
|
267
|
-
| modelValue / v-model | 绑定值,单选为字符串,多选为数组
|
|
268
|
-
| apiBaseUrl | API 基础 URL
|
|
269
|
-
| tenantId | 租户 ID
|
|
270
|
-
| hasAvatar | 是否显示头像
|
|
271
|
-
| avatarBaseUrl | 头像基础 URL
|
|
272
|
-
| label | 文本标签
|
|
273
|
-
| placeholder | 占位文本
|
|
274
|
-
| multiple | 是否多选
|
|
275
|
-
| draggable | 是否可拖拽排序(仅多选模式有效)
|
|
276
|
-
| exactSearchKey | 精确查找 key
|
|
277
|
-
| currentUserId | 当前用户 ID(用于快速选择"我")
|
|
278
|
-
| userGroup | 用户组列表
|
|
279
|
-
| userGroupName | 用户组分类名称
|
|
280
|
-
| emptyText | 无匹配人员时的提示文本
|
|
281
|
-
| disabled | 是否禁用
|
|
282
|
-
| renderTag | 自定义标签渲染函数
|
|
283
|
-
| renderListItem | 自定义列表项渲染函数
|
|
284
|
-
| excludeUserIds | 排除的用户 ID 列表
|
|
285
|
-
| enableMultiTenantMode | 是否启用多租户模式
|
|
286
|
-
| allowCreate | 是否允许自定义输入,按 Enter 确认
|
|
287
|
-
| freePaste | 是否允许粘贴任意文本
|
|
288
|
-
| maxCount | 最大可选数量(0 表示不限制)
|
|
298
|
+
| 参数 | 说明 | 类型 | 默认值 | 必填 |
|
|
299
|
+
| --------------------- | -------------------------------------------- | ------------------------------------------------ | ---------------------- | ---- |
|
|
300
|
+
| modelValue / v-model | 绑定值,单选为字符串,多选为数组 | `string` / `string[]` | `''` / `[]` | 是 |
|
|
301
|
+
| apiBaseUrl | API 基础 URL | `string` | `''` | 是 |
|
|
302
|
+
| tenantId | 租户 ID | `string` | `'default'` | 否 |
|
|
303
|
+
| hasAvatar | 是否显示头像 | `boolean` | `false` | 否 |
|
|
304
|
+
| avatarBaseUrl | 头像基础 URL | `string` | `` | 否 |
|
|
305
|
+
| label | 文本标签 | `string` | `'人员选择'` | 否 |
|
|
306
|
+
| placeholder | 占位文本 | `string` | `'请输入人员名称搜索'` | 否 |
|
|
307
|
+
| multiple | 是否多选 | `boolean` | `false` | 否 |
|
|
308
|
+
| draggable | 是否可拖拽排序(仅多选模式有效) | `boolean` | `false` | 否 |
|
|
309
|
+
| exactSearchKey | 精确查找 key | `'bk_username'` / `'login_name'` / `'full_name'` | `'bk_username'` | 否 |
|
|
310
|
+
| currentUserId | 当前用户 ID(用于快速选择"我") | `string` | `''` | 否 |
|
|
311
|
+
| userGroup | 用户组列表 | `UserGroupItem[]` | `[]` | 否 |
|
|
312
|
+
| userGroupName | 用户组分类名称 | `string` | `'用户群组'` | 否 |
|
|
313
|
+
| emptyText | 无匹配人员时的提示文本 | `string` | `'无匹配人员'` | 否 |
|
|
314
|
+
| disabled | 是否禁用 | `boolean` | `false` | 否 |
|
|
315
|
+
| renderTag | 自定义标签渲染函数 | `(h, userInfo) => VNode` | - | 否 |
|
|
316
|
+
| renderListItem | 自定义列表项渲染函数 | `(h, userInfo) => VNode` | - | 否 |
|
|
317
|
+
| excludeUserIds | 排除的用户 ID 列表 | `string[]` | `[]` | 否 |
|
|
318
|
+
| enableMultiTenantMode | 是否启用多租户模式 | `boolean` | `true` | 否 |
|
|
319
|
+
| allowCreate | 是否允许自定义输入,按 Enter 确认 | `boolean` | `false` | 否 |
|
|
320
|
+
| freePaste | 是否允许粘贴任意文本 | `boolean` | `false` | 否 |
|
|
321
|
+
| maxCount | 最大可选数量(0 表示不限制) | `number` | `0` | 否 |
|
|
322
|
+
| type | 输入框类型 | `'input'` / `'textarea'` | `'input'` | 否 |
|
|
323
|
+
| rows | 默认行数(仅 textarea 模式生效) | `number` | `4` | 否 |
|
|
324
|
+
| resize | 是否允许拖拽调整高度(仅 textarea 模式生效) | `boolean` | `true` | 否 |
|
|
325
|
+
| autoFocus | 是否自动聚焦 | `boolean` | `false` | 否 |
|
|
289
326
|
|
|
290
327
|
#### exactSearchKey 说明
|
|
291
328
|
|
|
@@ -304,8 +341,36 @@ export default {
|
|
|
304
341
|
| ----------------- | -------------------- | ------------------------------------ |
|
|
305
342
|
| update:modelValue | 绑定值变化时触发 | `(value: string \| string[])` |
|
|
306
343
|
| change | 选中值变化时触发 | `(userInfo: UserInfo \| UserInfo[])` |
|
|
307
|
-
| focus | 输入框获得焦点时触发 |
|
|
308
|
-
| blur | 输入框失去焦点时触发 |
|
|
344
|
+
| focus | 输入框获得焦点时触发 | - |
|
|
345
|
+
| blur | 输入框失去焦点时触发 | - |
|
|
346
|
+
|
|
347
|
+
### Methods 方法
|
|
348
|
+
|
|
349
|
+
通过模板 ref 调用组件方法:
|
|
350
|
+
|
|
351
|
+
| 方法名 | 说明 | 参数 |
|
|
352
|
+
| ------ | ---------- | ---- |
|
|
353
|
+
| focus | 使组件聚焦 | - |
|
|
354
|
+
| blur | 使组件失焦 | - |
|
|
355
|
+
|
|
356
|
+
```vue
|
|
357
|
+
<template>
|
|
358
|
+
<BkUserSelector
|
|
359
|
+
ref="selectorRef"
|
|
360
|
+
v-model="value"
|
|
361
|
+
:api-base-url="apiBaseUrl"
|
|
362
|
+
/>
|
|
363
|
+
<button @click="selectorRef?.focus()">聚焦</button>
|
|
364
|
+
<button @click="selectorRef?.blur()">失焦</button>
|
|
365
|
+
</template>
|
|
366
|
+
|
|
367
|
+
<script setup>
|
|
368
|
+
import { ref } from 'vue';
|
|
369
|
+
const selectorRef = ref(null);
|
|
370
|
+
const value = ref('');
|
|
371
|
+
const apiBaseUrl = 'https://api.example.com';
|
|
372
|
+
</script>
|
|
373
|
+
```
|
|
309
374
|
|
|
310
375
|
### 类型定义
|
|
311
376
|
|
|
@@ -360,6 +425,16 @@ type RenderFunction = (
|
|
|
360
425
|
- **开启(默认)**:使用多租户用户管理接口查询,支持跨租户显示
|
|
361
426
|
- **关闭**:使用原有用户管理接口查询
|
|
362
427
|
|
|
428
|
+
### 多行输入模式(Textarea)
|
|
429
|
+
|
|
430
|
+
通过 `type="textarea"` 启用多行模式:
|
|
431
|
+
|
|
432
|
+
- **完整展示**:未聚焦时不折叠标签,完整展示所有已选用户
|
|
433
|
+
- **高度可配**:通过 `rows` 设置默认行数,每行约 32px
|
|
434
|
+
- **可拖拽调整**:默认允许拖拽调整容器高度,可通过 `resize=false` 禁用
|
|
435
|
+
- **自动滚动**:内容超出容器高度时自动出现滚动条
|
|
436
|
+
- **聚焦同步**:切换聚焦/失焦状态时自动同步容器高度
|
|
437
|
+
|
|
363
438
|
### 拖拽排序
|
|
364
439
|
|
|
365
440
|
在多选模式下启用 `draggable`:
|
|
@@ -417,7 +492,7 @@ A: 通过 `change` 事件获取,它会返回完整的用户信息对象,而
|
|
|
417
492
|
|
|
418
493
|
### Q: 多选模式下如何限制选择数量?
|
|
419
494
|
|
|
420
|
-
A:
|
|
495
|
+
A: 使用 `maxCount` 属性设置最大可选数量,`0` 表示不限制。
|
|
421
496
|
|
|
422
497
|
### Q: 搜索没有结果怎么办?
|
|
423
498
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blueking/bk-user-selector",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "蓝鲸用户选择器",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Tencent BlueKing",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"prepublishOnly": "run-p build dts",
|
|
9
9
|
"dev": "vite --mode development -c scripts/vite.dev.ts",
|
|
10
|
-
"build": "
|
|
10
|
+
"build": "vite-node ./scripts/vite.build.ts",
|
|
11
11
|
"dts": "vue-tsc --project tsconfig.dts.json",
|
|
12
12
|
"prettier": "prettier ./src ./scripts ./playground --write",
|
|
13
13
|
"visualize": "vite-bundle-visualizer -c scripts/vite.visualizer.ts"
|
|
@@ -58,10 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"bkui-vue": "2.0.2-beta.63",
|
|
61
|
-
"lodash": "^4.17.
|
|
61
|
+
"lodash": "^4.17.23",
|
|
62
62
|
"sortablejs": "^1.15.6"
|
|
63
|
-
},
|
|
64
|
-
"engines": {
|
|
65
|
-
"node": ">=18.16.0"
|
|
66
63
|
}
|
|
67
64
|
}
|
|
@@ -7,7 +7,7 @@ interface MeTagProps {
|
|
|
7
7
|
/** 是否禁用 */
|
|
8
8
|
isDisabled?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<MeTagProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
11
|
click: () => any;
|
|
12
12
|
}, string, import("vue").PublicProps, Readonly<MeTagProps> & Readonly<{
|
|
13
13
|
onClick?: (() => any) | undefined;
|
|
@@ -15,4 +15,5 @@ declare const _default: import("vue").DefineComponent<MeTagProps, {}, {}, {}, {}
|
|
|
15
15
|
currentUserId: string;
|
|
16
16
|
isDisabled: boolean;
|
|
17
17
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
18
19
|
export default _default;
|
|
@@ -34,21 +34,11 @@ interface SelectionPopoverProps {
|
|
|
34
34
|
/** 用户组名称 */
|
|
35
35
|
userGroupName?: string;
|
|
36
36
|
}
|
|
37
|
-
declare var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
contentContainerRef: any;
|
|
41
|
-
slotContainerRef: any;
|
|
37
|
+
declare var __VLS_22: {};
|
|
38
|
+
type __VLS_Slots = {} & {
|
|
39
|
+
default?: (props: typeof __VLS_22) => any;
|
|
42
40
|
};
|
|
43
|
-
declare const
|
|
44
|
-
slots: {
|
|
45
|
-
default?(_: typeof __VLS_20): any;
|
|
46
|
-
};
|
|
47
|
-
refs: __VLS_PickRefsExpose<typeof __VLS_refs>;
|
|
48
|
-
attrs: Partial<typeof __VLS_inheritedAttrs>;
|
|
49
|
-
};
|
|
50
|
-
type __VLS_Slots = typeof __VLS_templateResult['slots'];
|
|
51
|
-
declare const __VLS_component: import("vue").DefineComponent<SelectionPopoverProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
41
|
+
declare const __VLS_base: import("vue").DefineComponent<SelectionPopoverProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
52
42
|
"click-outside": (event: MouseEvent) => any;
|
|
53
43
|
"select-user": (user: FormattedUser) => any;
|
|
54
44
|
}, string, import("vue").PublicProps, Readonly<SelectionPopoverProps> & Readonly<{
|
|
@@ -70,14 +60,10 @@ declare const __VLS_component: import("vue").DefineComponent<SelectionPopoverPro
|
|
|
70
60
|
options: FormattedUser[];
|
|
71
61
|
userGroupName: string;
|
|
72
62
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
73
|
-
declare const
|
|
63
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
64
|
+
declare const _default: typeof __VLS_export;
|
|
74
65
|
export default _default;
|
|
75
|
-
type
|
|
76
|
-
[K in keyof T]: (T[K] extends any[] ? Parameters<T[K][0]['expose']>[0][] : T[K] extends {
|
|
77
|
-
expose?: (exposed: infer E) => void;
|
|
78
|
-
} ? E : T[K]) | null;
|
|
79
|
-
} : never;
|
|
80
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
66
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
81
67
|
new (): {
|
|
82
68
|
$slots: S;
|
|
83
69
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { FormattedUser, UserSelectorProps } from '../types';
|
|
2
|
-
declare const
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<UserSelectorProps, {
|
|
3
|
+
focus: () => void;
|
|
4
|
+
blur: () => void;
|
|
5
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
6
|
blur: () => any;
|
|
4
7
|
change: (user: FormattedUser | FormattedUser[] | null) => any;
|
|
5
8
|
focus: () => any;
|
|
@@ -15,6 +18,7 @@ declare const _default: import("vue").DefineComponent<UserSelectorProps, {}, {},
|
|
|
15
18
|
"onUpdate:modelValue"?: ((value: string | string[]) => any) | undefined;
|
|
16
19
|
}>, {
|
|
17
20
|
userGroup: import("../types").UserGroupConfig[];
|
|
21
|
+
type: "input" | "textarea";
|
|
18
22
|
apiBaseUrl: string;
|
|
19
23
|
tenantId: string;
|
|
20
24
|
enableMultiTenantMode: boolean;
|
|
@@ -24,14 +28,18 @@ declare const _default: import("vue").DefineComponent<UserSelectorProps, {}, {},
|
|
|
24
28
|
freePaste: boolean;
|
|
25
29
|
maxCount: number;
|
|
26
30
|
excludeUserIds: string[];
|
|
27
|
-
|
|
31
|
+
resize: boolean;
|
|
28
32
|
hasAvatar: boolean;
|
|
29
33
|
avatarBaseUrl: string;
|
|
30
34
|
emptyText: string;
|
|
31
35
|
userGroupName: string;
|
|
36
|
+
disabled: boolean;
|
|
32
37
|
draggable: boolean;
|
|
38
|
+
autoFocus: boolean;
|
|
33
39
|
modelValue: string | string[];
|
|
34
40
|
multiple: boolean;
|
|
41
|
+
rows: number;
|
|
35
42
|
placeholder: string;
|
|
36
43
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
44
|
+
declare const _default: typeof __VLS_export;
|
|
37
45
|
export default _default;
|
|
@@ -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
|
*/
|
|
@@ -37,48 +40,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
40
|
* 用户信息
|
|
38
41
|
*/
|
|
39
42
|
user: FormattedUser;
|
|
40
|
-
}
|
|
43
|
+
};
|
|
44
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
41
45
|
click: (...args: any[]) => void;
|
|
42
46
|
close: (...args: any[]) => void;
|
|
43
|
-
}, string, import("vue").PublicProps, Readonly<{
|
|
44
|
-
/**
|
|
45
|
-
* 是否激活状态
|
|
46
|
-
*/
|
|
47
|
-
active?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* 头像基础URL
|
|
50
|
-
*/
|
|
51
|
-
avatarBaseUrl?: string;
|
|
52
|
-
/**
|
|
53
|
-
* 当前租户ID
|
|
54
|
-
*/
|
|
55
|
-
currentTenantId: string;
|
|
56
|
-
/**
|
|
57
|
-
* 是否可拖拽
|
|
58
|
-
*/
|
|
59
|
-
draggable?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* 是否显示头像
|
|
62
|
-
*/
|
|
63
|
-
hasAvatar?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* 渲染标签
|
|
66
|
-
*/
|
|
67
|
-
renderTag?: (h: typeof createVNode, userInfo: FormattedUser) => VNode;
|
|
68
|
-
/**
|
|
69
|
-
* 是否显示租户信息
|
|
70
|
-
*/
|
|
71
|
-
showTenant?: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* 租户数据映射
|
|
74
|
-
*/
|
|
75
|
-
tenants: Record<string, string>;
|
|
76
|
-
/**
|
|
77
|
-
* 用户信息
|
|
78
|
-
*/
|
|
79
|
-
user: FormattedUser;
|
|
80
|
-
}> & Readonly<{
|
|
47
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
81
48
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
82
49
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
83
50
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
51
|
+
declare const _default: typeof __VLS_export;
|
|
84
52
|
export default _default;
|
package/typings/types/index.d.ts
CHANGED
|
@@ -204,6 +204,11 @@ export interface UserGroupConfig {
|
|
|
204
204
|
* 用户选择器属性
|
|
205
205
|
*/
|
|
206
206
|
export interface UserSelectorProps extends BaseSelectorProps {
|
|
207
|
+
/**
|
|
208
|
+
* 是否自动聚焦
|
|
209
|
+
* @default false
|
|
210
|
+
*/
|
|
211
|
+
autoFocus?: boolean;
|
|
207
212
|
/**
|
|
208
213
|
* 是否支持拖拽排序
|
|
209
214
|
*/
|
|
@@ -220,6 +225,23 @@ export interface UserSelectorProps extends BaseSelectorProps {
|
|
|
220
225
|
* 是否多选
|
|
221
226
|
*/
|
|
222
227
|
multiple?: boolean;
|
|
228
|
+
/**
|
|
229
|
+
* 是否允许拖拽调整高度(仅 type='textarea' 时生效)
|
|
230
|
+
* @default true
|
|
231
|
+
*/
|
|
232
|
+
resize?: boolean;
|
|
233
|
+
/**
|
|
234
|
+
* 默认行数(仅 type='textarea' 时生效,每行约 32px)
|
|
235
|
+
* @default 4
|
|
236
|
+
*/
|
|
237
|
+
rows?: number;
|
|
238
|
+
/**
|
|
239
|
+
* 输入框类型
|
|
240
|
+
* - input: 单行模式(默认),固定高度,未聚焦时折叠标签
|
|
241
|
+
* - textarea: 多行模式,高度可配置,完整展示所有标签
|
|
242
|
+
* @default 'input'
|
|
243
|
+
*/
|
|
244
|
+
type?: 'input' | 'textarea';
|
|
223
245
|
}
|
|
224
246
|
/**
|
|
225
247
|
* 用户类型
|
package/vue2/config.json
CHANGED
|
@@ -1 +1,22 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"type": "bk-user-selector",
|
|
3
|
+
"name": "bk-user-selector",
|
|
4
|
+
"displayName": "人员选择器",
|
|
5
|
+
"framework": "vue2",
|
|
6
|
+
"styles": [],
|
|
7
|
+
"props": {
|
|
8
|
+
"modelValue": {
|
|
9
|
+
"type": [
|
|
10
|
+
"number",
|
|
11
|
+
"string"
|
|
12
|
+
],
|
|
13
|
+
"tips": "值"
|
|
14
|
+
},
|
|
15
|
+
"dataUrl": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"tips": "数据源接口"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"events": [],
|
|
21
|
+
"slots": {}
|
|
22
|
+
}
|