@blueking/ediatable 0.0.1-beta.16 → 0.0.1-beta.18
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 +23 -18
- package/package.json +1 -1
- package/typings/components/date-time-picker-column.vue.d.ts +6 -0
- package/typings/components/input-column.vue.d.ts +8 -0
- package/typings/components/select-column.vue.d.ts +6 -0
- package/typings/components/tag-input-column.vue.d.ts +6 -0
- package/vue2/index.es.min.js +72 -40
- package/vue2/index.iife.min.js +73 -41
- package/vue2/index.umd.min.js +73 -41
- package/vue2/vue2.css +24 -4
- package/vue3/index.es.min.js +72 -40
- package/vue3/index.iife.min.js +73 -41
- package/vue3/index.umd.min.js +96 -44
- package/vue3/vue3.css +24 -4
package/README.md
CHANGED
|
@@ -328,13 +328,13 @@ npm i @blueking/ediatable
|
|
|
328
328
|
|
|
329
329
|
| 属性名 | 描述 | 属性类型 | 默认值 |
|
|
330
330
|
| ------------ | ---------------------- | -------------------------------- | ----------- |
|
|
331
|
-
| fixed | 表头列是否固定 | `right 或 left 或 undefined`
|
|
332
|
-
| maxWidth | 表头列最大宽度 | `number 或 undefined`
|
|
333
|
-
| minWidth | 表头列最小宽度 | `number 或 undefined`
|
|
334
|
-
| memo | 列名hover时的提示 | `string 或 undefined`
|
|
335
|
-
| required | 是否必填标志 | `boolean`
|
|
336
|
-
| title | 表头列名 | `string 或 undefined`
|
|
337
|
-
| width | 表头列宽度 | `number 或 undefined`
|
|
331
|
+
| fixed | 表头列是否固定 | `right 或 left 或 undefined` | undefined |
|
|
332
|
+
| maxWidth | 表头列最大宽度 | `number 或 undefined` | undefined |
|
|
333
|
+
| minWidth | 表头列最小宽度 | `number 或 undefined` | undefined |
|
|
334
|
+
| memo | 列名hover时的提示 | `string 或 undefined` | undefined |
|
|
335
|
+
| required | 是否必填标志 | `boolean` | true |
|
|
336
|
+
| title | 表头列名 | `string 或 undefined` | undefined |
|
|
337
|
+
| width | 表头列宽度 | `number 或 undefined` | undefined |
|
|
338
338
|
| renderAppend | 表头列名之后追加的元素 | `() => JSX.Element 或 undefined` | undefined |
|
|
339
339
|
|
|
340
340
|
### Slots插槽
|
|
@@ -351,7 +351,7 @@ npm i @blueking/ediatable
|
|
|
351
351
|
| 属性名 | 描述 | 属性类型 | 默认值 |
|
|
352
352
|
| --------- | ------------ | --------------------------------------------- | ------ |
|
|
353
353
|
| validator | 校验函数 | `(value: any) => boolean 或 Promise<boolean>` | 无 |
|
|
354
|
-
| message | 校验出错提示 | `string 或 (() => string)`
|
|
354
|
+
| message | 校验出错提示 | `string 或 (() => string)` | 无 |
|
|
355
355
|
|
|
356
356
|
#### 输入框组件
|
|
357
357
|
|
|
@@ -369,13 +369,15 @@ npm i @blueking/ediatable
|
|
|
369
369
|
| ------ | ------------ | --------- | --------- |
|
|
370
370
|
| rules | 校验规则配置 | `IRule[]` | undefined |
|
|
371
371
|
|
|
372
|
-
其他配置同 `bkui-vue3
|
|
372
|
+
其他配置同 `bkui-vue3` 的 `Input` 组件
|
|
373
373
|
|
|
374
374
|
##### Emits事件列表
|
|
375
375
|
|
|
376
376
|
| 事件名 | 参数 | 参数类型 | 描述 |
|
|
377
377
|
| ------ | ----- | ------------------ | ------------ |
|
|
378
378
|
| submit | value | `string 或 number` | 输入完成事件 |
|
|
379
|
+
| error | value | `boolean` | 校验报错事件 |
|
|
380
|
+
| clear | | | 清空事件 |
|
|
379
381
|
|
|
380
382
|
##### Exposes事件列表
|
|
381
383
|
|
|
@@ -400,13 +402,14 @@ npm i @blueking/ediatable
|
|
|
400
402
|
| ------ | ------------ | --------- | --------- |
|
|
401
403
|
| rules | 校验规则配置 | `IRule[]` | undefined |
|
|
402
404
|
|
|
403
|
-
其他配置同 `bkui-vue3
|
|
405
|
+
其他配置同 `bkui-vue3` 的 `TimerPicker` 组件
|
|
404
406
|
|
|
405
407
|
##### Emits事件列表
|
|
406
408
|
|
|
407
409
|
| 事件名 | 参数 | 参数类型 | 描述 |
|
|
408
410
|
| ------ | ----- | ---------------------------- | ------------ |
|
|
409
411
|
| change | value | `[string, string] 或 string` | 选择完成事件 |
|
|
412
|
+
| error | value | `boolean` | 校验报错事件 |
|
|
410
413
|
|
|
411
414
|
##### Exposes事件列表
|
|
412
415
|
|
|
@@ -430,13 +433,14 @@ npm i @blueking/ediatable
|
|
|
430
433
|
| ------ | ------------ | --------- | --------- |
|
|
431
434
|
| rules | 校验规则配置 | `IRule[]` | undefined |
|
|
432
435
|
|
|
433
|
-
其他配置同 `bkui-vue3
|
|
436
|
+
其他配置同 `bkui-vue3` 的 `Select` 组件
|
|
434
437
|
|
|
435
438
|
##### Emits事件列表
|
|
436
439
|
|
|
437
440
|
| 事件名 | 参数 | 参数类型 | 描述 |
|
|
438
441
|
| ------ | ----- | ------------------ | ------------ |
|
|
439
442
|
| change | value | `string 或 number` | 选择完成事件 |
|
|
443
|
+
| error | value | `boolean` | 校验报错事件 |
|
|
440
444
|
|
|
441
445
|
##### Exposes事件列表
|
|
442
446
|
|
|
@@ -460,13 +464,14 @@ npm i @blueking/ediatable
|
|
|
460
464
|
| ------ | ------------ | --------- | --------- |
|
|
461
465
|
| rules | 校验规则配置 | `IRule[]` | undefined |
|
|
462
466
|
|
|
463
|
-
其他配置同 `bkui-vue3
|
|
467
|
+
其他配置同 `bkui-vue3` 的 `TagInput` 组件
|
|
464
468
|
|
|
465
469
|
##### Emits事件列表
|
|
466
470
|
|
|
467
471
|
| 事件名 | 参数 | 参数类型 | 描述 |
|
|
468
472
|
| ------ | ----- | ---------- | ------------ |
|
|
469
473
|
| change | value | `string[]` | 输入完成事件 |
|
|
474
|
+
| error | value | `boolean` | 校验报错事件 |
|
|
470
475
|
|
|
471
476
|
##### Exposes事件列表
|
|
472
477
|
|
|
@@ -495,9 +500,9 @@ npm i @blueking/ediatable
|
|
|
495
500
|
| 属性名 | 描述 | 属性类型 | 默认值 |
|
|
496
501
|
| ----------- | ------------ | ------------------------------- | --------- |
|
|
497
502
|
| data | 文本内容 | `string 或 number 或 undefined` | undefined |
|
|
498
|
-
| isLoading | 是否加载中 | `boolean 或 undefined`
|
|
499
|
-
| placeholder | 空白提示 | `string 或 undefined`
|
|
500
|
-
| rules | 校验规则配置 | `IRule[] 或 undefined`
|
|
503
|
+
| isLoading | 是否加载中 | `boolean 或 undefined` | undefined |
|
|
504
|
+
| placeholder | 空白提示 | `string 或 undefined` | undefined |
|
|
505
|
+
| rules | 校验规则配置 | `IRule[] 或 undefined` | undefined |
|
|
501
506
|
|
|
502
507
|
##### Exposes事件列表
|
|
503
508
|
|
|
@@ -519,10 +524,10 @@ npm i @blueking/ediatable
|
|
|
519
524
|
|
|
520
525
|
| 属性名 | 描述 | 属性类型 | 默认值 |
|
|
521
526
|
| ---------- | ------------------ | ----------- | ------ |
|
|
522
|
-
| removeable | 删除图标是否可用 | `boolean`
|
|
523
|
-
| showCopy | 是否展示行克隆图标 | `boolean`
|
|
527
|
+
| removeable | 删除图标是否可用 | `boolean` | true |
|
|
528
|
+
| showCopy | 是否展示行克隆图标 | `boolean` | false |
|
|
524
529
|
| showAdd | 是否展示添加图标 | `boolean ` | true |
|
|
525
|
-
| showRemove | 是否展示删除图标 | `boolean `
|
|
530
|
+
| showRemove | 是否展示删除图标 | `boolean ` | true |
|
|
526
531
|
|
|
527
532
|
##### Emits事件列表
|
|
528
533
|
|
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ interface Props {
|
|
|
4
4
|
rules?: Rules;
|
|
5
5
|
type?: any;
|
|
6
6
|
disabled?: boolean;
|
|
7
|
+
clearable?: boolean;
|
|
7
8
|
}
|
|
8
9
|
interface Slots {
|
|
9
10
|
footer(): any;
|
|
@@ -19,24 +20,29 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
19
20
|
rules: undefined;
|
|
20
21
|
type: undefined;
|
|
21
22
|
disabled: boolean;
|
|
23
|
+
clearable: boolean;
|
|
22
24
|
}>, {
|
|
23
25
|
getValue: () => Promise<ValueType>;
|
|
24
26
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
27
|
"update:modelValue": (modelValue: ValueType) => void;
|
|
26
28
|
change: (value: any) => void;
|
|
29
|
+
error: (result: boolean) => void;
|
|
27
30
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {
|
|
28
31
|
placeholder: string;
|
|
29
32
|
rules: undefined;
|
|
30
33
|
type: undefined;
|
|
31
34
|
disabled: boolean;
|
|
35
|
+
clearable: boolean;
|
|
32
36
|
}>>> & {
|
|
33
37
|
onChange?: ((value: any) => any) | undefined;
|
|
38
|
+
onError?: ((result: boolean) => any) | undefined;
|
|
34
39
|
"onUpdate:modelValue"?: ((modelValue: ValueType) => any) | undefined;
|
|
35
40
|
}, {
|
|
36
41
|
type: any;
|
|
37
42
|
placeholder: string;
|
|
38
43
|
rules: Rules;
|
|
39
44
|
disabled: boolean;
|
|
45
|
+
clearable: boolean;
|
|
40
46
|
}, {}>;
|
|
41
47
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
42
48
|
export default _default;
|
|
@@ -9,6 +9,7 @@ interface Props {
|
|
|
9
9
|
isShowBlur?: boolean;
|
|
10
10
|
precision?: number;
|
|
11
11
|
maxlength?: number;
|
|
12
|
+
clearable?: boolean;
|
|
12
13
|
}
|
|
13
14
|
declare let __VLS_typeProps: Props;
|
|
14
15
|
type __VLS_PublicProps = {
|
|
@@ -26,12 +27,15 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
26
27
|
max: number;
|
|
27
28
|
isShowBlur: boolean;
|
|
28
29
|
precision: number;
|
|
30
|
+
clearable: boolean;
|
|
29
31
|
}>, {
|
|
30
32
|
getValue: () => Promise<string | number>;
|
|
31
33
|
focus: () => void;
|
|
32
34
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
35
|
"update:modelValue": (modelValue: string | number) => void;
|
|
34
36
|
submit: (value: string | number) => void;
|
|
37
|
+
error: (result: boolean) => void;
|
|
38
|
+
clear: () => void;
|
|
35
39
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {
|
|
36
40
|
placeholder: string;
|
|
37
41
|
rules: undefined;
|
|
@@ -41,14 +45,18 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
41
45
|
max: number;
|
|
42
46
|
isShowBlur: boolean;
|
|
43
47
|
precision: number;
|
|
48
|
+
clearable: boolean;
|
|
44
49
|
}>>> & {
|
|
45
50
|
onSubmit?: ((value: string | number) => any) | undefined;
|
|
51
|
+
onError?: ((result: boolean) => any) | undefined;
|
|
46
52
|
"onUpdate:modelValue"?: ((modelValue: string | number) => any) | undefined;
|
|
53
|
+
onClear?: (() => any) | undefined;
|
|
47
54
|
}, {
|
|
48
55
|
type: string;
|
|
49
56
|
placeholder: string;
|
|
50
57
|
rules: Rules;
|
|
51
58
|
disabled: boolean;
|
|
59
|
+
clearable: boolean;
|
|
52
60
|
min: number;
|
|
53
61
|
max: number;
|
|
54
62
|
isShowBlur: boolean;
|
|
@@ -11,6 +11,7 @@ interface Props {
|
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
multiple?: boolean;
|
|
13
13
|
showSelectAll?: boolean;
|
|
14
|
+
clearable?: boolean;
|
|
14
15
|
}
|
|
15
16
|
declare let __VLS_typeProps: Props;
|
|
16
17
|
type __VLS_PublicProps = {
|
|
@@ -23,11 +24,13 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
23
24
|
disabled: boolean;
|
|
24
25
|
multiple: boolean;
|
|
25
26
|
showSelectAll: boolean;
|
|
27
|
+
clearable: boolean;
|
|
26
28
|
}>, {
|
|
27
29
|
getValue: () => Promise<IKey>;
|
|
28
30
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
31
|
"update:modelValue": (modelValue: IKey) => void;
|
|
30
32
|
change: (value: IKey) => void;
|
|
33
|
+
error: (result: boolean) => void;
|
|
31
34
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {
|
|
32
35
|
placeholder: string;
|
|
33
36
|
textarea: boolean;
|
|
@@ -35,13 +38,16 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
35
38
|
disabled: boolean;
|
|
36
39
|
multiple: boolean;
|
|
37
40
|
showSelectAll: boolean;
|
|
41
|
+
clearable: boolean;
|
|
38
42
|
}>>> & {
|
|
39
43
|
onChange?: ((value: IKey) => any) | undefined;
|
|
44
|
+
onError?: ((result: boolean) => any) | undefined;
|
|
40
45
|
"onUpdate:modelValue"?: ((modelValue: IKey) => any) | undefined;
|
|
41
46
|
}, {
|
|
42
47
|
placeholder: string;
|
|
43
48
|
rules: Rules;
|
|
44
49
|
disabled: boolean;
|
|
50
|
+
clearable: boolean;
|
|
45
51
|
multiple: boolean;
|
|
46
52
|
showSelectAll: boolean;
|
|
47
53
|
}, {}>;
|
|
@@ -3,6 +3,7 @@ interface Props {
|
|
|
3
3
|
placeholder?: string;
|
|
4
4
|
single?: boolean;
|
|
5
5
|
rules?: Rules;
|
|
6
|
+
clearable?: boolean;
|
|
6
7
|
}
|
|
7
8
|
declare let __VLS_typeProps: Props;
|
|
8
9
|
type __VLS_PublicProps = {
|
|
@@ -19,21 +20,26 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
19
20
|
placeholder: string;
|
|
20
21
|
single: boolean;
|
|
21
22
|
rules: undefined;
|
|
23
|
+
clearable: boolean;
|
|
22
24
|
}>, {
|
|
23
25
|
getValue: () => Promise<string[] | undefined>;
|
|
24
26
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
27
|
"update:modelValue": (modelValue: string[]) => void;
|
|
26
28
|
change: (value: string[]) => void;
|
|
29
|
+
error: (result: boolean) => void;
|
|
27
30
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {
|
|
28
31
|
placeholder: string;
|
|
29
32
|
single: boolean;
|
|
30
33
|
rules: undefined;
|
|
34
|
+
clearable: boolean;
|
|
31
35
|
}>>> & {
|
|
32
36
|
onChange?: ((value: string[]) => any) | undefined;
|
|
37
|
+
onError?: ((result: boolean) => any) | undefined;
|
|
33
38
|
"onUpdate:modelValue"?: ((modelValue: string[]) => any) | undefined;
|
|
34
39
|
}, {
|
|
35
40
|
placeholder: string;
|
|
36
41
|
rules: Rules;
|
|
42
|
+
clearable: boolean;
|
|
37
43
|
single: boolean;
|
|
38
44
|
}, {}>;
|
|
39
45
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
package/vue2/index.es.min.js
CHANGED
|
@@ -5488,7 +5488,7 @@ lodash.exports;
|
|
|
5488
5488
|
var lodashExports = lodash.exports;
|
|
5489
5489
|
const _$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodashExports);
|
|
5490
5490
|
!function() {
|
|
5491
|
-
var svgCode = '<svg xmlns="http://www.w3.org/2000/svg" data-name="ediatable" xmlns:xlink="http://www.w3.org/1999/xlink" style="position:absolute;width:0;height:0;visibility:hidden"><symbol id="icon-exclamation-fill" viewBox="0 0 64 64"><path fill="#737987" d="M32 4C16.5 4 4 16.5 4 32s12.5 28 28 28 28-12.5 28-28S47.5 4 32 4zm0 44c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3zm3-28.7L34 38c0 1.1-.9 2-2 2s-2-.9-2-2l-1-18.7V19c0-1.7 1.3-3 3-3s3 1.3 3 3v.3z"/></symbol><symbol id="icon-copy" viewBox="0 0 1024 1024"><path d="M864 128H288c-17.6 0-32 14.4-32 32v96h-96c-17.6 0-32 14.4-32 32v576c0 17.6 14.4 32 32 32h576c17.6 0 32-14.4 32-32v-96h96c17.6 0 32-14.4 32-32V160c0-17.6-14.4-32-32-32zM704 704v128H192V320h512v384zm128 0h-64V288c0-17.6-14.4-32-32-32H320v-64h512v512z"/><path d="M275.2 419.2h336v64h-336zM272 544h336v64H272zM272 672h336v64H272z"/></symbol><symbol id="icon-minus-fill" viewBox="0 0 1024 1024"><path d="M512 64C264 64 64 264 64 512s200 448 448 448 448-200 448-448S760 64 512 64zm224 480H288v-64h448v64z"/></symbol><symbol id="icon-plus-fill" viewBox="0 0 1024 1024"><path d="M512 64C264 64 64 264 64 512s200 448 448 448 448-200 448-448S760 64 512 64zm224 480H544v192h-64V544H288v-64h192V288h64v192h192v64z"/></symbol></svg>';
|
|
5491
|
+
var svgCode = '<svg xmlns="http://www.w3.org/2000/svg" data-name="ediatable" xmlns:xlink="http://www.w3.org/1999/xlink" style="position:absolute;width:0;height:0;visibility:hidden"><symbol id="icon-exclamation-fill" viewBox="0 0 64 64"><path fill="#737987" d="M32 4C16.5 4 4 16.5 4 32s12.5 28 28 28 28-12.5 28-28S47.5 4 32 4zm0 44c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3zm3-28.7L34 38c0 1.1-.9 2-2 2s-2-.9-2-2l-1-18.7V19c0-1.7 1.3-3 3-3s3 1.3 3 3v.3z"/></symbol><symbol id="icon-close-circle-shape" viewBox="0 0 64 64"><path fill="#737987" d="M32 4C16.5 4 4 16.5 4 32s12.5 28 28 28 28-12.5 28-28S47.5 4 32 4zm11.3 36.5l-2.8 2.8-8.5-8.5-8.5 8.5-2.8-2.8 8.5-8.5-8.5-8.5 2.8-2.8 8.5 8.5 8.5-8.5 2.8 2.8-8.5 8.5 8.5 8.5z"/></symbol><symbol id="icon-copy" viewBox="0 0 1024 1024"><path d="M864 128H288c-17.6 0-32 14.4-32 32v96h-96c-17.6 0-32 14.4-32 32v576c0 17.6 14.4 32 32 32h576c17.6 0 32-14.4 32-32v-96h96c17.6 0 32-14.4 32-32V160c0-17.6-14.4-32-32-32zM704 704v128H192V320h512v384zm128 0h-64V288c0-17.6-14.4-32-32-32H320v-64h512v512z"/><path d="M275.2 419.2h336v64h-336zM272 544h336v64H272zM272 672h336v64H272z"/></symbol><symbol id="icon-minus-fill" viewBox="0 0 1024 1024"><path d="M512 64C264 64 64 264 64 512s200 448 448 448 448-200 448-448S760 64 512 64zm224 480H288v-64h448v64z"/></symbol><symbol id="icon-plus-fill" viewBox="0 0 1024 1024"><path d="M512 64C264 64 64 264 64 512s200 448 448 448 448-200 448-448S760 64 512 64zm224 480H544v192h-64V544H288v-64h192V288h64v192h192v64z"/></symbol></svg>';
|
|
5492
5492
|
if (document.body) {
|
|
5493
5493
|
document.body.insertAdjacentHTML("afterbegin", svgCode);
|
|
5494
5494
|
} else {
|
|
@@ -42075,12 +42075,13 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
42075
42075
|
placeholder: { default: "" },
|
|
42076
42076
|
rules: { default: void 0 },
|
|
42077
42077
|
type: { default: void 0 },
|
|
42078
|
-
disabled: { type: Boolean, default: false }
|
|
42078
|
+
disabled: { type: Boolean, default: false },
|
|
42079
|
+
clearable: { type: Boolean, default: true }
|
|
42079
42080
|
}, {
|
|
42080
42081
|
"modelValue": {},
|
|
42081
42082
|
"modelModifiers": {}
|
|
42082
42083
|
}),
|
|
42083
|
-
emits: /* @__PURE__ */ mergeModels(["change"], ["update:modelValue"]),
|
|
42084
|
+
emits: /* @__PURE__ */ mergeModels(["change", "error"], ["update:modelValue"]),
|
|
42084
42085
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
42085
42086
|
const props2 = __props;
|
|
42086
42087
|
const emits = __emit;
|
|
@@ -42092,12 +42093,15 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
42092
42093
|
const handleChange = (value) => {
|
|
42093
42094
|
modelValue.value = value;
|
|
42094
42095
|
validator11(modelValue.value).then(() => {
|
|
42096
|
+
emits("error", false);
|
|
42095
42097
|
emits("change", modelValue.value);
|
|
42096
|
-
});
|
|
42098
|
+
}).catch(() => emits("error", true));
|
|
42097
42099
|
};
|
|
42098
42100
|
const handleOpenChange = (open) => {
|
|
42099
42101
|
if (!open) {
|
|
42100
|
-
validator11(modelValue.value)
|
|
42102
|
+
validator11(modelValue.value).then(() => {
|
|
42103
|
+
emits("error", false);
|
|
42104
|
+
}).catch(() => emits("error", true));
|
|
42101
42105
|
}
|
|
42102
42106
|
};
|
|
42103
42107
|
__expose({
|
|
@@ -42117,7 +42121,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
42117
42121
|
[
|
|
42118
42122
|
createVNode(unref(__webpack_exports__default), mergeProps({
|
|
42119
42123
|
"append-to-body": "",
|
|
42120
|
-
clearable:
|
|
42124
|
+
clearable: _ctx.clearable,
|
|
42121
42125
|
"model-value": modelValue.value,
|
|
42122
42126
|
placeholder: _ctx.placeholder,
|
|
42123
42127
|
style: { "width": "100%" },
|
|
@@ -42136,7 +42140,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
42136
42140
|
]),
|
|
42137
42141
|
key: "0"
|
|
42138
42142
|
} : void 0
|
|
42139
|
-
]), 1040, ["model-value", "placeholder", "type"]),
|
|
42143
|
+
]), 1040, ["clearable", "model-value", "placeholder", "type"]),
|
|
42140
42144
|
unref(errorMessage) ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
42141
42145
|
withDirectives(createVNode(
|
|
42142
42146
|
unref(DbIcon),
|
|
@@ -42156,7 +42160,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
42156
42160
|
}
|
|
42157
42161
|
});
|
|
42158
42162
|
const _hoisted_1$4 = {
|
|
42159
|
-
key:
|
|
42163
|
+
key: 2,
|
|
42160
42164
|
class: "blur-dispaly-main"
|
|
42161
42165
|
};
|
|
42162
42166
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
@@ -42170,14 +42174,15 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
42170
42174
|
max: { default: Number.MAX_SAFE_INTEGER },
|
|
42171
42175
|
isShowBlur: { type: Boolean, default: false },
|
|
42172
42176
|
precision: { default: 0 },
|
|
42173
|
-
maxlength: {}
|
|
42177
|
+
maxlength: {},
|
|
42178
|
+
clearable: { type: Boolean, default: true }
|
|
42174
42179
|
}, {
|
|
42175
42180
|
"modelValue": {
|
|
42176
42181
|
default: ""
|
|
42177
42182
|
},
|
|
42178
42183
|
"modelModifiers": {}
|
|
42179
42184
|
}),
|
|
42180
|
-
emits: /* @__PURE__ */ mergeModels(["submit"], ["update:modelValue"]),
|
|
42185
|
+
emits: /* @__PURE__ */ mergeModels(["submit", "error", "clear"], ["update:modelValue"]),
|
|
42181
42186
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
42182
42187
|
const props2 = __props;
|
|
42183
42188
|
const emits = __emit;
|
|
@@ -42196,31 +42201,41 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
42196
42201
|
modelValue.value = value;
|
|
42197
42202
|
if (props2.type === "number") {
|
|
42198
42203
|
validator11(value).then(() => {
|
|
42204
|
+
emits("error", false);
|
|
42199
42205
|
emits("submit", value);
|
|
42200
|
-
});
|
|
42206
|
+
}).catch(() => emits("error", true));
|
|
42201
42207
|
}
|
|
42202
42208
|
};
|
|
42209
|
+
const handleClear = () => {
|
|
42210
|
+
modelValue.value = "";
|
|
42211
|
+
validator11("").catch(() => emits("error", true)).finally(() => {
|
|
42212
|
+
emits("clear");
|
|
42213
|
+
});
|
|
42214
|
+
};
|
|
42203
42215
|
const handleInput = (value) => {
|
|
42204
42216
|
isBlur.value = false;
|
|
42205
42217
|
modelValue.value = value;
|
|
42206
42218
|
};
|
|
42207
42219
|
const handleBlur = (event) => {
|
|
42208
|
-
|
|
42209
|
-
|
|
42210
|
-
|
|
42211
|
-
|
|
42212
|
-
}
|
|
42213
|
-
if (modelValue.value) {
|
|
42214
|
-
if (oldInputText === modelValue.value) {
|
|
42220
|
+
setTimeout(() => {
|
|
42221
|
+
isBlur.value = true;
|
|
42222
|
+
if (props2.disabled) {
|
|
42223
|
+
event.preventDefault();
|
|
42215
42224
|
return;
|
|
42216
42225
|
}
|
|
42217
|
-
|
|
42218
|
-
|
|
42219
|
-
|
|
42220
|
-
|
|
42221
|
-
|
|
42222
|
-
|
|
42223
|
-
|
|
42226
|
+
if (modelValue.value) {
|
|
42227
|
+
if (oldInputText === modelValue.value) {
|
|
42228
|
+
return;
|
|
42229
|
+
}
|
|
42230
|
+
oldInputText = modelValue.value;
|
|
42231
|
+
validator11(modelValue.value).then(() => {
|
|
42232
|
+
emits("error", false);
|
|
42233
|
+
emits("submit", modelValue.value);
|
|
42234
|
+
}).catch(() => emits("error", true));
|
|
42235
|
+
return;
|
|
42236
|
+
}
|
|
42237
|
+
emits("submit", modelValue.value);
|
|
42238
|
+
}, 100);
|
|
42224
42239
|
};
|
|
42225
42240
|
const handleKeydown = (_value, event) => {
|
|
42226
42241
|
if (props2.disabled) {
|
|
@@ -42238,9 +42253,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
42238
42253
|
event.preventDefault();
|
|
42239
42254
|
validator11(modelValue.value).then((result) => {
|
|
42240
42255
|
if (result) {
|
|
42256
|
+
emits("error", false);
|
|
42241
42257
|
emits("submit", modelValue.value);
|
|
42242
42258
|
}
|
|
42243
|
-
});
|
|
42259
|
+
}).catch(() => emits("error", true));
|
|
42244
42260
|
}
|
|
42245
42261
|
};
|
|
42246
42262
|
const handlePaste = (_value, event) => {
|
|
@@ -42281,6 +42297,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
42281
42297
|
disabled: _ctx.disabled,
|
|
42282
42298
|
max: _ctx.max,
|
|
42283
42299
|
min: _ctx.min,
|
|
42300
|
+
clearable: false,
|
|
42284
42301
|
"model-value": modelValue.value,
|
|
42285
42302
|
maxlength: _ctx.maxlength,
|
|
42286
42303
|
placeholder: _ctx.placeholder,
|
|
@@ -42294,10 +42311,16 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
42294
42311
|
onKeydown: handleKeydown,
|
|
42295
42312
|
onPaste: handlePaste
|
|
42296
42313
|
}), null, 16, ["disabled", "max", "min", "model-value", "maxlength", "placeholder", "type", "precision"]),
|
|
42314
|
+
_ctx.clearable && modelValue.value && _ctx.type !== "number" ? (openBlock(), createBlock(unref(DbIcon), {
|
|
42315
|
+
key: 0,
|
|
42316
|
+
class: "clear-icon",
|
|
42317
|
+
type: "close-circle-shape",
|
|
42318
|
+
onClick: handleClear
|
|
42319
|
+
})) : createCommentVNode("v-if", true),
|
|
42297
42320
|
unref(errorMessage) ? withDirectives((openBlock(), createBlock(
|
|
42298
42321
|
unref(DbIcon),
|
|
42299
42322
|
{
|
|
42300
|
-
key:
|
|
42323
|
+
key: 1,
|
|
42301
42324
|
class: "error-icon",
|
|
42302
42325
|
type: "exclamation-fill"
|
|
42303
42326
|
},
|
|
@@ -42423,12 +42446,13 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
42423
42446
|
rules: { default: () => [] },
|
|
42424
42447
|
disabled: { type: Boolean, default: false },
|
|
42425
42448
|
multiple: { type: Boolean, default: false },
|
|
42426
|
-
showSelectAll: { type: Boolean, default: false }
|
|
42449
|
+
showSelectAll: { type: Boolean, default: false },
|
|
42450
|
+
clearable: { type: Boolean, default: true }
|
|
42427
42451
|
}, {
|
|
42428
42452
|
"modelValue": {},
|
|
42429
42453
|
"modelModifiers": {}
|
|
42430
42454
|
}),
|
|
42431
|
-
emits: /* @__PURE__ */ mergeModels(["change"], ["update:modelValue"]),
|
|
42455
|
+
emits: /* @__PURE__ */ mergeModels(["change", "error"], ["update:modelValue"]),
|
|
42432
42456
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
42433
42457
|
const { Option } = __webpack_exports__default$2;
|
|
42434
42458
|
const props2 = __props;
|
|
@@ -42447,11 +42471,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
42447
42471
|
}
|
|
42448
42472
|
localValue.value = value;
|
|
42449
42473
|
if (typeof value !== "object" && value) {
|
|
42450
|
-
validator11(value)
|
|
42474
|
+
validator11(value).then(() => {
|
|
42475
|
+
emits("error", false);
|
|
42476
|
+
}).catch(() => emits("error", true));
|
|
42451
42477
|
return;
|
|
42452
42478
|
}
|
|
42453
42479
|
if (Array.isArray(value) && value.length > 0) {
|
|
42454
|
-
validator11(value)
|
|
42480
|
+
validator11(value).then(() => {
|
|
42481
|
+
emits("error", false);
|
|
42482
|
+
}).catch(() => emits("error", true));
|
|
42455
42483
|
return;
|
|
42456
42484
|
}
|
|
42457
42485
|
},
|
|
@@ -42463,15 +42491,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
42463
42491
|
localValue.value = value;
|
|
42464
42492
|
validator11(localValue.value).then(() => {
|
|
42465
42493
|
modelValue.value = value;
|
|
42494
|
+
emits("error", false);
|
|
42466
42495
|
emits("change", localValue.value);
|
|
42467
|
-
});
|
|
42496
|
+
}).catch(() => emits("error", true));
|
|
42468
42497
|
};
|
|
42469
42498
|
const handleRemove = () => {
|
|
42470
42499
|
localValue.value = "";
|
|
42471
42500
|
validator11(localValue.value).then(() => {
|
|
42472
42501
|
modelValue.value = localValue.value;
|
|
42502
|
+
emits("error", false);
|
|
42473
42503
|
emits("change", localValue.value);
|
|
42474
|
-
});
|
|
42504
|
+
}).catch(() => emits("error", true));
|
|
42475
42505
|
};
|
|
42476
42506
|
const checkRootHeight = () => {
|
|
42477
42507
|
rootHeight.value = rootRef.value.parentNode.clientHeight;
|
|
@@ -42499,7 +42529,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
42499
42529
|
"model-value": localValue.value,
|
|
42500
42530
|
"auto-focus": "",
|
|
42501
42531
|
class: "select-box",
|
|
42502
|
-
clearable:
|
|
42532
|
+
clearable: _ctx.clearable,
|
|
42503
42533
|
disabled: _ctx.disabled,
|
|
42504
42534
|
filterable: "",
|
|
42505
42535
|
"input-search": false,
|
|
@@ -42526,7 +42556,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
42526
42556
|
]),
|
|
42527
42557
|
_: 1
|
|
42528
42558
|
/* STABLE */
|
|
42529
|
-
}, 16, ["model-value", "disabled", "multiple", "placeholder", "show-select-all"]),
|
|
42559
|
+
}, 16, ["model-value", "clearable", "disabled", "multiple", "placeholder", "show-select-all"]),
|
|
42530
42560
|
unref(errorMessage) ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
42531
42561
|
withDirectives(createVNode(
|
|
42532
42562
|
unref(DbIcon),
|
|
@@ -42555,12 +42585,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
42555
42585
|
props: /* @__PURE__ */ mergeModels({
|
|
42556
42586
|
placeholder: { default: "" },
|
|
42557
42587
|
single: { type: Boolean, default: false },
|
|
42558
|
-
rules: { default: void 0 }
|
|
42588
|
+
rules: { default: void 0 },
|
|
42589
|
+
clearable: { type: Boolean, default: true }
|
|
42559
42590
|
}, {
|
|
42560
42591
|
"modelValue": {},
|
|
42561
42592
|
"modelModifiers": {}
|
|
42562
42593
|
}),
|
|
42563
|
-
emits: /* @__PURE__ */ mergeModels(["change"], ["update:modelValue"]),
|
|
42594
|
+
emits: /* @__PURE__ */ mergeModels(["change", "error"], ["update:modelValue"]),
|
|
42564
42595
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
42565
42596
|
const props2 = __props;
|
|
42566
42597
|
const emits = __emit;
|
|
@@ -42577,8 +42608,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
42577
42608
|
modelValue.value = value;
|
|
42578
42609
|
nextTick(() => {
|
|
42579
42610
|
validator11(modelValue.value).then(() => {
|
|
42611
|
+
emits("error", false);
|
|
42580
42612
|
emits("change", value);
|
|
42581
|
-
});
|
|
42613
|
+
}).catch(() => emits("error", true));
|
|
42582
42614
|
});
|
|
42583
42615
|
};
|
|
42584
42616
|
const handleShowTips = () => {
|
|
@@ -42639,7 +42671,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
42639
42671
|
createVNode(unref(__webpack_exports__default$1), mergeProps({ "model-value": modelValue.value }, _ctx.$attrs, {
|
|
42640
42672
|
"allow-auto-match": "",
|
|
42641
42673
|
"allow-create": "",
|
|
42642
|
-
clearable:
|
|
42674
|
+
clearable: _ctx.clearable,
|
|
42643
42675
|
"collapse-tags": "",
|
|
42644
42676
|
"has-delete-icon": "",
|
|
42645
42677
|
"max-data": _ctx.single ? 1 : -1,
|
|
@@ -42648,7 +42680,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
42648
42680
|
onBlur: handleBlur,
|
|
42649
42681
|
onChange: handleChange,
|
|
42650
42682
|
onFocus: handleFocus
|
|
42651
|
-
}), null, 16, ["model-value", "max-data", "placeholder"]),
|
|
42683
|
+
}), null, 16, ["model-value", "clearable", "max-data", "placeholder"]),
|
|
42652
42684
|
unref(errorMessage) ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
42653
42685
|
withDirectives(createVNode(
|
|
42654
42686
|
unref(DbIcon),
|