@xto/form 1.6.8 → 1.6.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/es/AutoComplete/index.d.ts +29 -0
- package/es/AutoComplete/index.vue.d.ts +70 -0
- package/es/Cascader/index.d.ts +40 -0
- package/es/Cascader/index.vue.d.ts +58 -0
- package/es/Checkbox/group.vue.d.ts +34 -0
- package/es/Checkbox/index.d.ts +49 -0
- package/es/Checkbox/index.vue.d.ts +31 -0
- package/es/Checkbox/types.d.ts +106 -0
- package/es/ColorPicker/index.d.ts +15 -0
- package/es/ColorPicker/index.vue.d.ts +29 -0
- package/es/DatePicker/components/DateTable.vue.d.ts +36 -0
- package/es/DatePicker/components/MonthTable.vue.d.ts +14 -0
- package/es/DatePicker/components/YearTable.vue.d.ts +14 -0
- package/es/DatePicker/index.d.ts +35 -0
- package/es/DatePicker/index.vue.d.ts +57 -0
- package/es/DatePicker/types.d.ts +112 -0
- package/es/DatePicker/utils.d.ts +21 -0
- package/es/DynamicFields/index.d.ts +2 -0
- package/es/DynamicFields/index.vue.d.ts +52 -0
- package/es/DynamicFields/types.d.ts +36 -0
- package/es/Form/index.d.ts +77 -0
- package/es/Form/index.vue.d.ts +64 -0
- package/es/Form/item.vue.d.ts +31 -0
- package/es/Form/types.d.ts +239 -0
- package/es/Form/validators.d.ts +60 -0
- package/es/Input/index.d.ts +29 -0
- package/es/Input/index.vue.d.ts +70 -0
- package/es/Input/types.d.ts +97 -0
- package/es/InputNumber/index.vue.d.ts +57 -0
- package/es/InputNumber/types.d.ts +83 -0
- package/es/Mention/index.d.ts +27 -0
- package/es/Mention/index.vue.d.ts +45 -0
- package/es/Radio/button.vue.d.ts +29 -0
- package/es/Radio/group.vue.d.ts +35 -0
- package/es/Radio/index.d.ts +61 -0
- package/es/Radio/index.vue.d.ts +30 -0
- package/es/Radio/types.d.ts +83 -0
- package/es/Rate/index.d.ts +41 -0
- package/es/Rate/index.vue.d.ts +49 -0
- package/es/Rate/types.d.ts +71 -0
- package/es/RichEditor/index.d.ts +19 -0
- package/es/RichEditor/index.vue.d.ts +41 -0
- package/es/Segmented/index.d.ts +20 -0
- package/es/Segmented/index.vue.d.ts +52 -0
- package/es/Select/Option.vue.d.ts +9 -0
- package/es/Select/index.d.ts +48 -0
- package/es/Select/index.vue.d.ts +93 -0
- package/es/Select/types.d.ts +137 -0
- package/es/Select/utils.d.ts +8 -0
- package/es/Slider/index.d.ts +52 -0
- package/es/Slider/index.vue.d.ts +39 -0
- package/es/Slider/types.d.ts +77 -0
- package/es/Switch/index.d.ts +16 -0
- package/es/Switch/index.vue.d.ts +44 -0
- package/es/Switch/types.d.ts +69 -0
- package/es/Textarea/index.d.ts +48 -0
- package/es/Textarea/index.vue.d.ts +51 -0
- package/es/Textarea/types.d.ts +91 -0
- package/es/TimePicker/components/TimePanel.vue.d.ts +28 -0
- package/es/TimePicker/index.d.ts +39 -0
- package/es/TimePicker/index.vue.d.ts +57 -0
- package/es/TimePicker/types.d.ts +117 -0
- package/es/TimePicker/utils.d.ts +10 -0
- package/es/Transfer/index.d.ts +58 -0
- package/es/Transfer/index.vue.d.ts +62 -0
- package/es/Transfer/types.d.ts +117 -0
- package/es/Upload/index.d.ts +110 -0
- package/es/Upload/index.vue.d.ts +140 -0
- package/es/Upload/types.d.ts +238 -0
- package/es/index.d.ts +41 -0
- package/es/index.mjs +503 -496
- package/lib/index.cjs +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: number;
|
|
3
|
+
max?: number;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
readonly?: boolean;
|
|
6
|
+
allowHalf?: boolean;
|
|
7
|
+
lowThreshold?: number;
|
|
8
|
+
highThreshold?: number;
|
|
9
|
+
colors?: string[];
|
|
10
|
+
voidColor?: string;
|
|
11
|
+
disabledVoidColor?: string;
|
|
12
|
+
icon?: string;
|
|
13
|
+
voidIcon?: string;
|
|
14
|
+
disabledVoidIcon?: string;
|
|
15
|
+
showText?: boolean;
|
|
16
|
+
showScore?: boolean;
|
|
17
|
+
textColor?: string;
|
|
18
|
+
texts?: string[];
|
|
19
|
+
scoreTemplate?: string;
|
|
20
|
+
size?: 'large' | 'default' | 'small';
|
|
21
|
+
};
|
|
22
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
|
+
"update:modelValue": (value: number) => any;
|
|
24
|
+
change: (value: number) => any;
|
|
25
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
26
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
27
|
+
onChange?: ((value: number) => any) | undefined;
|
|
28
|
+
}>, {
|
|
29
|
+
modelValue: number;
|
|
30
|
+
size: "large" | "default" | "small";
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
readonly: boolean;
|
|
33
|
+
icon: string;
|
|
34
|
+
max: number;
|
|
35
|
+
allowHalf: boolean;
|
|
36
|
+
lowThreshold: number;
|
|
37
|
+
highThreshold: number;
|
|
38
|
+
colors: string[];
|
|
39
|
+
voidColor: string;
|
|
40
|
+
disabledVoidColor: string;
|
|
41
|
+
voidIcon: string;
|
|
42
|
+
disabledVoidIcon: string;
|
|
43
|
+
showText: boolean;
|
|
44
|
+
showScore: boolean;
|
|
45
|
+
textColor: string;
|
|
46
|
+
texts: string[];
|
|
47
|
+
scoreTemplate: string;
|
|
48
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
49
|
+
export default _default;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ComponentSize } from '@xto/core';
|
|
2
|
+
/**
|
|
3
|
+
* Rate Props
|
|
4
|
+
*/
|
|
5
|
+
export interface RateProps {
|
|
6
|
+
/**
|
|
7
|
+
* 绑定值
|
|
8
|
+
*/
|
|
9
|
+
modelValue?: number;
|
|
10
|
+
/**
|
|
11
|
+
* 最大分值
|
|
12
|
+
* @default 5
|
|
13
|
+
*/
|
|
14
|
+
max?: number;
|
|
15
|
+
/**
|
|
16
|
+
* 是否禁用
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 是否允许半选
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
allowHalf?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* 是否显示分数
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
showScore?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* 是否显示辅助文字
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
showText?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* 评分尺寸
|
|
37
|
+
* @default 'default'
|
|
38
|
+
*/
|
|
39
|
+
size?: ComponentSize;
|
|
40
|
+
/**
|
|
41
|
+
* 辅助文字数组
|
|
42
|
+
*/
|
|
43
|
+
texts?: string[];
|
|
44
|
+
/**
|
|
45
|
+
* 辅助文字颜色
|
|
46
|
+
*/
|
|
47
|
+
textColor?: string;
|
|
48
|
+
/**
|
|
49
|
+
* 选中颜色
|
|
50
|
+
*/
|
|
51
|
+
activeColor?: string;
|
|
52
|
+
/**
|
|
53
|
+
* 未选中颜色
|
|
54
|
+
*/
|
|
55
|
+
voidColor?: string;
|
|
56
|
+
/**
|
|
57
|
+
* 禁用颜色
|
|
58
|
+
*/
|
|
59
|
+
disabledVoidColor?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Rate Emits
|
|
63
|
+
*/
|
|
64
|
+
export interface RateEmits {
|
|
65
|
+
(e: 'update:modelValue', value: number): void;
|
|
66
|
+
(e: 'change', value: number): void;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Rate 组件实例类型
|
|
70
|
+
*/
|
|
71
|
+
export type RateInstance = InstanceType<typeof import('./index.vue').default>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as RichEditor } from './index.vue';
|
|
2
|
+
export { RichEditor };
|
|
3
|
+
export default RichEditor;
|
|
4
|
+
export type RichEditorProps = {
|
|
5
|
+
/** 编辑器内容 (HTML 格式) */
|
|
6
|
+
modelValue?: string;
|
|
7
|
+
/** 占位符 */
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
/** 是否禁用 */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** 编辑器高度 */
|
|
12
|
+
height?: number | string;
|
|
13
|
+
/** 工具栏配置 */
|
|
14
|
+
toolbar?: string[] | boolean;
|
|
15
|
+
/** 模式: default 或 simple */
|
|
16
|
+
mode?: 'default' | 'simple';
|
|
17
|
+
/** 自动聚焦 */
|
|
18
|
+
autoFocus?: boolean;
|
|
19
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** 编辑器内容 (HTML 格式) */
|
|
3
|
+
modelValue?: string;
|
|
4
|
+
/** 占位符 */
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
/** 是否禁用 */
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/** 编辑器高度 */
|
|
9
|
+
height?: number | string;
|
|
10
|
+
/** 工具栏配置 */
|
|
11
|
+
toolbar?: string[] | boolean;
|
|
12
|
+
/** 模式: default 或 simple */
|
|
13
|
+
mode?: 'default' | 'simple';
|
|
14
|
+
/** 自动聚焦 */
|
|
15
|
+
autoFocus?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
18
|
+
getEditor: () => any;
|
|
19
|
+
getText: () => any;
|
|
20
|
+
setHtml: (html: string) => void;
|
|
21
|
+
clear: () => void;
|
|
22
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
|
+
"update:modelValue": (value: string) => any;
|
|
24
|
+
change: (value: string) => any;
|
|
25
|
+
focus: (editor: any) => any;
|
|
26
|
+
blur: (editor: any) => any;
|
|
27
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
28
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
29
|
+
onChange?: ((value: string) => any) | undefined;
|
|
30
|
+
onFocus?: ((editor: any) => any) | undefined;
|
|
31
|
+
onBlur?: ((editor: any) => any) | undefined;
|
|
32
|
+
}>, {
|
|
33
|
+
modelValue: string;
|
|
34
|
+
placeholder: string;
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
height: number | string;
|
|
37
|
+
mode: "default" | "simple";
|
|
38
|
+
toolbar: string[] | boolean;
|
|
39
|
+
autoFocus: boolean;
|
|
40
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
41
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as Segmented } from './index.vue';
|
|
2
|
+
export { Segmented };
|
|
3
|
+
export default Segmented;
|
|
4
|
+
export type SegmentedOption = {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string | number;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type SegmentedProps = {
|
|
10
|
+
/** 绑定值 */
|
|
11
|
+
modelValue?: string | number;
|
|
12
|
+
/** 选项数据 */
|
|
13
|
+
options?: (string | number | SegmentedOption)[];
|
|
14
|
+
/** 是否禁用 */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** 是否块级 */
|
|
17
|
+
block?: boolean;
|
|
18
|
+
/** 尺寸 */
|
|
19
|
+
size?: 'large' | 'default' | 'small';
|
|
20
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
interface SegmentedOption {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string | number;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
/** 绑定值 */
|
|
8
|
+
modelValue?: string | number;
|
|
9
|
+
/** 选项数据 */
|
|
10
|
+
options?: (string | number | SegmentedOption)[];
|
|
11
|
+
/** 是否禁用 */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** 是否块级 */
|
|
14
|
+
block?: boolean;
|
|
15
|
+
/** 尺寸 */
|
|
16
|
+
size?: 'large' | 'default' | 'small';
|
|
17
|
+
};
|
|
18
|
+
declare function __VLS_template(): {
|
|
19
|
+
attrs: Partial<{}>;
|
|
20
|
+
slots: {
|
|
21
|
+
default?(_: {
|
|
22
|
+
option: SegmentedOption;
|
|
23
|
+
}): any;
|
|
24
|
+
};
|
|
25
|
+
refs: {
|
|
26
|
+
containerRef: HTMLDivElement;
|
|
27
|
+
};
|
|
28
|
+
rootEl: HTMLDivElement;
|
|
29
|
+
};
|
|
30
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
31
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
32
|
+
"update:modelValue": (value: string | number) => any;
|
|
33
|
+
change: (value: string | number) => any;
|
|
34
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
35
|
+
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
36
|
+
onChange?: ((value: string | number) => any) | undefined;
|
|
37
|
+
}>, {
|
|
38
|
+
modelValue: string | number;
|
|
39
|
+
size: "large" | "default" | "small";
|
|
40
|
+
disabled: boolean;
|
|
41
|
+
options: (string | number | SegmentedOption)[];
|
|
42
|
+
block: boolean;
|
|
43
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
44
|
+
containerRef: HTMLDivElement;
|
|
45
|
+
}, HTMLDivElement>;
|
|
46
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
47
|
+
export default _default;
|
|
48
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
49
|
+
new (): {
|
|
50
|
+
$slots: S;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
value: string | number;
|
|
3
|
+
label: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ComponentSize } from '@xto/core';
|
|
2
|
+
export type SelectType = 'single' | 'multiple' | 'cascader';
|
|
3
|
+
export interface SelectOption {
|
|
4
|
+
value: string | number;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
children?: SelectOption[];
|
|
8
|
+
}
|
|
9
|
+
export interface SelectProps {
|
|
10
|
+
/** 绑定值 */
|
|
11
|
+
modelValue?: string | number | (string | number)[];
|
|
12
|
+
/** 选项数据 */
|
|
13
|
+
options?: SelectOption[];
|
|
14
|
+
/** 选择类型 */
|
|
15
|
+
type?: SelectType;
|
|
16
|
+
/** 占位文本 */
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
/** 是否禁用 */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** 是否可清空 */
|
|
21
|
+
clearable?: boolean;
|
|
22
|
+
/** 是否可搜索 */
|
|
23
|
+
filterable?: boolean;
|
|
24
|
+
/** 自定义搜索方法 */
|
|
25
|
+
filterMethod?: (query: string, option: SelectOption) => boolean;
|
|
26
|
+
/** 输入框尺寸 */
|
|
27
|
+
size?: ComponentSize;
|
|
28
|
+
/** 多选限制数量 */
|
|
29
|
+
multipleLimit?: number;
|
|
30
|
+
/** 是否折叠标签 */
|
|
31
|
+
collapseTags?: boolean;
|
|
32
|
+
/** 折叠标签最大数量 */
|
|
33
|
+
maxCollapseTags?: number;
|
|
34
|
+
/** 级联分隔符 */
|
|
35
|
+
separator?: string;
|
|
36
|
+
/** 值字段名 */
|
|
37
|
+
valueKey?: string;
|
|
38
|
+
/** 标签字段名 */
|
|
39
|
+
labelKey?: string;
|
|
40
|
+
/** 子节点字段名 */
|
|
41
|
+
childrenKey?: string;
|
|
42
|
+
/** 无数据提示 */
|
|
43
|
+
noDataText?: string;
|
|
44
|
+
/** 无匹配提示 */
|
|
45
|
+
noMatchText?: string;
|
|
46
|
+
}
|
|
47
|
+
export { default as Select } from './index.vue';
|
|
48
|
+
export { default as SelectOption } from './Option.vue';
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { ComponentSize } from '@xto/core';
|
|
2
|
+
type SelectType = 'single' | 'multiple' | 'cascader';
|
|
3
|
+
interface Option {
|
|
4
|
+
value: string | number;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
children?: Option[];
|
|
8
|
+
}
|
|
9
|
+
type __VLS_Props = {
|
|
10
|
+
modelValue?: string | number | string[] | number[] | (string | number)[];
|
|
11
|
+
value?: string | number | string[] | number[] | (string | number)[];
|
|
12
|
+
options?: Option[];
|
|
13
|
+
type?: SelectType;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
clearable?: boolean;
|
|
17
|
+
filterable?: boolean;
|
|
18
|
+
filterMethod?: (query: string, option: Option) => boolean;
|
|
19
|
+
size?: ComponentSize;
|
|
20
|
+
multipleLimit?: number;
|
|
21
|
+
collapseTags?: boolean;
|
|
22
|
+
maxCollapseTags?: number;
|
|
23
|
+
separator?: string;
|
|
24
|
+
valueKey?: string;
|
|
25
|
+
labelKey?: string;
|
|
26
|
+
childrenKey?: string;
|
|
27
|
+
noDataText?: string;
|
|
28
|
+
noMatchText?: string;
|
|
29
|
+
mode?: 'single' | 'multiple';
|
|
30
|
+
};
|
|
31
|
+
declare function __VLS_template(): {
|
|
32
|
+
attrs: Partial<{}>;
|
|
33
|
+
slots: {
|
|
34
|
+
default?(_: {}): any;
|
|
35
|
+
};
|
|
36
|
+
refs: {
|
|
37
|
+
selectRef: HTMLDivElement;
|
|
38
|
+
inputRef: HTMLInputElement;
|
|
39
|
+
popperRef: HTMLDivElement;
|
|
40
|
+
};
|
|
41
|
+
rootEl: HTMLDivElement;
|
|
42
|
+
};
|
|
43
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
44
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
45
|
+
"update:modelValue": (value: string | number | (string | number)[] | null) => any;
|
|
46
|
+
"update:value": (value: string | number | (string | number)[] | null) => any;
|
|
47
|
+
change: (value: string | number | (string | number)[] | null) => any;
|
|
48
|
+
focus: (event: FocusEvent) => any;
|
|
49
|
+
blur: (event: FocusEvent) => any;
|
|
50
|
+
clear: () => any;
|
|
51
|
+
"visible-change": (visible: boolean) => any;
|
|
52
|
+
"remove-tag": (tag: string | number) => any;
|
|
53
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
54
|
+
"onUpdate:modelValue"?: ((value: string | number | (string | number)[] | null) => any) | undefined;
|
|
55
|
+
"onUpdate:value"?: ((value: string | number | (string | number)[] | null) => any) | undefined;
|
|
56
|
+
onChange?: ((value: string | number | (string | number)[] | null) => any) | undefined;
|
|
57
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
58
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
59
|
+
onClear?: (() => any) | undefined;
|
|
60
|
+
"onVisible-change"?: ((visible: boolean) => any) | undefined;
|
|
61
|
+
"onRemove-tag"?: ((tag: string | number) => any) | undefined;
|
|
62
|
+
}>, {
|
|
63
|
+
modelValue: string | number | string[] | number[] | (string | number)[];
|
|
64
|
+
value: string | number | string[] | number[] | (string | number)[];
|
|
65
|
+
type: SelectType;
|
|
66
|
+
placeholder: string;
|
|
67
|
+
size: ComponentSize;
|
|
68
|
+
disabled: boolean;
|
|
69
|
+
clearable: boolean;
|
|
70
|
+
separator: string;
|
|
71
|
+
mode: "single" | "multiple";
|
|
72
|
+
options: Option[];
|
|
73
|
+
filterable: boolean;
|
|
74
|
+
multipleLimit: number;
|
|
75
|
+
collapseTags: boolean;
|
|
76
|
+
maxCollapseTags: number;
|
|
77
|
+
valueKey: string;
|
|
78
|
+
labelKey: string;
|
|
79
|
+
childrenKey: string;
|
|
80
|
+
noDataText: string;
|
|
81
|
+
noMatchText: string;
|
|
82
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
83
|
+
selectRef: HTMLDivElement;
|
|
84
|
+
inputRef: HTMLInputElement;
|
|
85
|
+
popperRef: HTMLDivElement;
|
|
86
|
+
}, HTMLDivElement>;
|
|
87
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
88
|
+
export default _default;
|
|
89
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
90
|
+
new (): {
|
|
91
|
+
$slots: S;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { ComponentSize } from '@xto/core';
|
|
2
|
+
/**
|
|
3
|
+
* Select 类型
|
|
4
|
+
*/
|
|
5
|
+
export type SelectType = 'single' | 'multiple' | 'cascader';
|
|
6
|
+
/**
|
|
7
|
+
* Select 选项
|
|
8
|
+
*/
|
|
9
|
+
export interface SelectOption {
|
|
10
|
+
value: string | number;
|
|
11
|
+
label: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
children?: SelectOption[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Select Props
|
|
17
|
+
*/
|
|
18
|
+
export interface SelectProps {
|
|
19
|
+
/**
|
|
20
|
+
* 绑定值
|
|
21
|
+
*/
|
|
22
|
+
modelValue?: string | number | string[] | number[] | (string | number)[];
|
|
23
|
+
/**
|
|
24
|
+
* 绑定值(别名)
|
|
25
|
+
*/
|
|
26
|
+
value?: string | number | string[] | number[] | (string | number)[];
|
|
27
|
+
/**
|
|
28
|
+
* 选项数据
|
|
29
|
+
*/
|
|
30
|
+
options?: SelectOption[];
|
|
31
|
+
/**
|
|
32
|
+
* 选择器类型
|
|
33
|
+
* @default 'single'
|
|
34
|
+
*/
|
|
35
|
+
type?: SelectType;
|
|
36
|
+
/**
|
|
37
|
+
* 占位文本
|
|
38
|
+
* @default '请选择'
|
|
39
|
+
*/
|
|
40
|
+
placeholder?: string;
|
|
41
|
+
/**
|
|
42
|
+
* 是否禁用
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* 是否可清空
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
clearable?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* 是否可搜索
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
filterable?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* 自定义搜索方法
|
|
58
|
+
*/
|
|
59
|
+
filterMethod?: (query: string, option: SelectOption) => boolean;
|
|
60
|
+
/**
|
|
61
|
+
* 输入框尺寸
|
|
62
|
+
* @default 'default'
|
|
63
|
+
*/
|
|
64
|
+
size?: ComponentSize;
|
|
65
|
+
/**
|
|
66
|
+
* 多选时最大选择数量
|
|
67
|
+
* @default 0
|
|
68
|
+
*/
|
|
69
|
+
multipleLimit?: number;
|
|
70
|
+
/**
|
|
71
|
+
* 多选时是否折叠标签
|
|
72
|
+
* @default true
|
|
73
|
+
*/
|
|
74
|
+
collapseTags?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* 显示的折叠标签数量
|
|
77
|
+
* @default 1
|
|
78
|
+
*/
|
|
79
|
+
maxCollapseTags?: number;
|
|
80
|
+
/**
|
|
81
|
+
* 级联选择分隔符
|
|
82
|
+
* @default ' / '
|
|
83
|
+
*/
|
|
84
|
+
separator?: string;
|
|
85
|
+
/**
|
|
86
|
+
* 选项值字段名
|
|
87
|
+
* @default 'value'
|
|
88
|
+
*/
|
|
89
|
+
valueKey?: string;
|
|
90
|
+
/**
|
|
91
|
+
* 选项标签字段名
|
|
92
|
+
* @default 'label'
|
|
93
|
+
*/
|
|
94
|
+
labelKey?: string;
|
|
95
|
+
/**
|
|
96
|
+
* 子选项字段名
|
|
97
|
+
* @default 'children'
|
|
98
|
+
*/
|
|
99
|
+
childrenKey?: string;
|
|
100
|
+
/**
|
|
101
|
+
* 无数据时的文本
|
|
102
|
+
* @default '暂无数据'
|
|
103
|
+
*/
|
|
104
|
+
noDataText?: string;
|
|
105
|
+
/**
|
|
106
|
+
* 无匹配数据时的文本
|
|
107
|
+
* @default '无匹配数据'
|
|
108
|
+
*/
|
|
109
|
+
noMatchText?: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Select Emits
|
|
113
|
+
*/
|
|
114
|
+
export interface SelectEmits {
|
|
115
|
+
(e: 'update:modelValue', value: string | number | (string | number)[] | null): void;
|
|
116
|
+
(e: 'update:value', value: string | number | (string | number)[] | null): void;
|
|
117
|
+
(e: 'change', value: string | number | (string | number)[] | null): void;
|
|
118
|
+
(e: 'clear'): void;
|
|
119
|
+
(e: 'focus', event: FocusEvent): void;
|
|
120
|
+
(e: 'blur', event: FocusEvent): void;
|
|
121
|
+
(e: 'visible-change', visible: boolean): void;
|
|
122
|
+
(e: 'remove-tag', tag: string | number): void;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Select Expose
|
|
126
|
+
*/
|
|
127
|
+
export interface SelectExpose {
|
|
128
|
+
visible: boolean;
|
|
129
|
+
selectedValues: (string | number)[];
|
|
130
|
+
showPopper: () => void;
|
|
131
|
+
hidePopper: () => void;
|
|
132
|
+
handleClear: () => void;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Select 组件实例类型
|
|
136
|
+
*/
|
|
137
|
+
export type SelectInstance = InstanceType<typeof import('./index.vue').default>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function matchesFilter(label: string, query: string, filterMethod?: (query: string, option: any) => boolean): boolean;
|
|
2
|
+
export declare function getOptionKey(option: any, valueKey?: string): string | number;
|
|
3
|
+
export declare function getOptionLabel(option: any, labelKey?: string): string;
|
|
4
|
+
export declare function isOptionDisabled(option: any): boolean;
|
|
5
|
+
export declare function findNodeInTree(data: any[], value: any, valueKey?: string, childrenKey?: string): any;
|
|
6
|
+
export declare function getNodePath(data: any[], value: any, valueKey?: string, childrenKey?: string): any[];
|
|
7
|
+
export declare function flattenTree(data: any[], childrenKey?: string): any[];
|
|
8
|
+
export declare function formatTagsText(values: any[], options: any[], labelKey?: string, maxTags?: number): string;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export declare const sliderProps: {
|
|
3
|
+
readonly modelValue: {
|
|
4
|
+
readonly type: NumberConstructor;
|
|
5
|
+
readonly default: 0;
|
|
6
|
+
};
|
|
7
|
+
readonly min: {
|
|
8
|
+
readonly type: NumberConstructor;
|
|
9
|
+
readonly default: 0;
|
|
10
|
+
};
|
|
11
|
+
readonly max: {
|
|
12
|
+
readonly type: NumberConstructor;
|
|
13
|
+
readonly default: 100;
|
|
14
|
+
};
|
|
15
|
+
readonly step: {
|
|
16
|
+
readonly type: NumberConstructor;
|
|
17
|
+
readonly default: 1;
|
|
18
|
+
};
|
|
19
|
+
readonly disabled: {
|
|
20
|
+
readonly type: BooleanConstructor;
|
|
21
|
+
readonly default: false;
|
|
22
|
+
};
|
|
23
|
+
readonly showTooltip: {
|
|
24
|
+
readonly type: BooleanConstructor;
|
|
25
|
+
readonly default: true;
|
|
26
|
+
};
|
|
27
|
+
readonly formatTooltip: {
|
|
28
|
+
readonly type: PropType<(value: number) => string | number>;
|
|
29
|
+
readonly default: undefined;
|
|
30
|
+
};
|
|
31
|
+
readonly showStops: {
|
|
32
|
+
readonly type: BooleanConstructor;
|
|
33
|
+
readonly default: false;
|
|
34
|
+
};
|
|
35
|
+
readonly vertical: {
|
|
36
|
+
readonly type: BooleanConstructor;
|
|
37
|
+
readonly default: false;
|
|
38
|
+
};
|
|
39
|
+
readonly height: {
|
|
40
|
+
readonly type: PropType<string | number>;
|
|
41
|
+
readonly default: "200px";
|
|
42
|
+
};
|
|
43
|
+
readonly marks: {
|
|
44
|
+
readonly type: PropType<Record<number, string | {
|
|
45
|
+
style?: Record<string, string>;
|
|
46
|
+
label?: string;
|
|
47
|
+
}>>;
|
|
48
|
+
readonly default: undefined;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export type SliderProps = ExtractPropTypes<typeof sliderProps>;
|
|
52
|
+
export { default as Slider } from './index.vue';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: number;
|
|
3
|
+
min?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
step?: number;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
showTooltip?: boolean;
|
|
8
|
+
formatTooltip?: (value: number) => string | number;
|
|
9
|
+
showStops?: boolean;
|
|
10
|
+
vertical?: boolean;
|
|
11
|
+
height?: string | number;
|
|
12
|
+
marks?: Record<number, string | {
|
|
13
|
+
style?: Record<string, string>;
|
|
14
|
+
label?: string;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
+
"update:modelValue": (value: number) => any;
|
|
19
|
+
input: (value: number) => any;
|
|
20
|
+
change: (value: number) => any;
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
23
|
+
onInput?: ((value: number) => any) | undefined;
|
|
24
|
+
onChange?: ((value: number) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
modelValue: number;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
min: number;
|
|
29
|
+
max: number;
|
|
30
|
+
step: number;
|
|
31
|
+
vertical: boolean;
|
|
32
|
+
height: string | number;
|
|
33
|
+
showTooltip: boolean;
|
|
34
|
+
showStops: boolean;
|
|
35
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
36
|
+
sliderRef: HTMLDivElement;
|
|
37
|
+
buttonRef: HTMLDivElement;
|
|
38
|
+
}, HTMLDivElement>;
|
|
39
|
+
export default _default;
|