@fox-js/foxui 4.0.1-4 → 4.0.1-5
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/dist/foxui.es.js +239 -166
- package/dist/foxui.umd.js +11 -11
- package/dist/style.css +1 -1
- package/dist/types/components/datepicker/common.d.ts +12 -0
- package/dist/types/components/picker/common.d.ts +38 -6
- package/dist/types/components/picker/model.d.ts +11 -41
- package/dist/types/components/picker/types.d.ts +20 -0
- package/dist/types/components/searchbar/type.d.ts +1 -0
- package/dist/types/utils/use-touch/index.d.ts +2 -0
- package/package.json +1 -1
- package/dist/types/components/picker/common-column.d.ts +0 -26
|
@@ -48,6 +48,18 @@ export declare let datepickerProps: {
|
|
|
48
48
|
default: () => Date;
|
|
49
49
|
validator: (val: unknown) => val is Date;
|
|
50
50
|
};
|
|
51
|
+
visibleItemCount: {
|
|
52
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
53
|
+
default: number;
|
|
54
|
+
};
|
|
55
|
+
threeDimensional: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
59
|
+
swipeDuration: {
|
|
60
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
61
|
+
default: number;
|
|
62
|
+
};
|
|
51
63
|
isWrapTeleport: {
|
|
52
64
|
type: BooleanConstructor;
|
|
53
65
|
default: boolean;
|
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { ColumnOptions, Item, SourceFunction, ValueType } from './types';
|
|
3
|
+
export declare const commonColumnProps: {
|
|
4
|
+
readonly: {
|
|
5
|
+
type: BooleanConstructor;
|
|
6
|
+
default: boolean;
|
|
7
|
+
};
|
|
8
|
+
visibleItemCount: {
|
|
9
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
10
|
+
default: number;
|
|
11
|
+
};
|
|
12
|
+
textName: {
|
|
13
|
+
type: PropType<string>;
|
|
14
|
+
required: boolean;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
valueName: {
|
|
18
|
+
type: PropType<string>;
|
|
19
|
+
required: boolean;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
threeDimensional: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
swipeDuration: {
|
|
27
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
28
|
+
default: number;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
3
31
|
export declare const pickerProps: {
|
|
4
32
|
modelValue: {
|
|
5
33
|
type: (BooleanConstructor | StringConstructor | NumberConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
@@ -10,10 +38,10 @@ export declare const pickerProps: {
|
|
|
10
38
|
default: never[];
|
|
11
39
|
};
|
|
12
40
|
columnOptions: {
|
|
13
|
-
type: PropType<
|
|
41
|
+
type: PropType<ColumnOptions>;
|
|
14
42
|
};
|
|
15
43
|
source: {
|
|
16
|
-
type: PropType<string |
|
|
44
|
+
type: PropType<string | Item[] | SourceFunction>;
|
|
17
45
|
default: never[];
|
|
18
46
|
};
|
|
19
47
|
params: {
|
|
@@ -58,9 +86,13 @@ export declare const pickerProps: {
|
|
|
58
86
|
required: boolean;
|
|
59
87
|
default: string;
|
|
60
88
|
};
|
|
61
|
-
|
|
62
|
-
type:
|
|
63
|
-
|
|
89
|
+
threeDimensional: {
|
|
90
|
+
type: BooleanConstructor;
|
|
91
|
+
default: boolean;
|
|
92
|
+
};
|
|
93
|
+
swipeDuration: {
|
|
94
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
95
|
+
default: number;
|
|
64
96
|
};
|
|
65
97
|
position: {
|
|
66
98
|
type: StringConstructor;
|
|
@@ -1,55 +1,25 @@
|
|
|
1
1
|
import { ComponentPublicInstance } from 'vue';
|
|
2
|
+
import { Item, ColumnOptionsObject, ValueType, SourceFunction, DataType } from './types';
|
|
2
3
|
export declare function getGlobalItemHeight(): number;
|
|
3
4
|
export declare function setGlobalItemHeight(h: number): void;
|
|
4
|
-
export declare
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
children?: ItemType[] | null;
|
|
9
|
-
[propName: string]: any;
|
|
10
|
-
}
|
|
11
|
-
export declare function getItemIndex(props: Record<string, any>, items: ItemType[], value: number | string | boolean | ItemType, valueType?: ValueType): number;
|
|
12
|
-
export declare function getItemText(props: Record<string, any>, item: ItemType): string;
|
|
13
|
-
export declare function getItemValue(props: Record<string, any>, item: ItemType): string | boolean | number;
|
|
14
|
-
export interface ItemOptionsObject {
|
|
15
|
-
disabled: boolean;
|
|
16
|
-
[propName: string]: any;
|
|
17
|
-
}
|
|
18
|
-
export interface ItemOptionsFunction {
|
|
19
|
-
(item?: any, index?: number): ItemOptionsObject;
|
|
20
|
-
}
|
|
21
|
-
export declare type ItemOptions = ItemOptionsObject | ItemOptionsFunction;
|
|
22
|
-
export declare function getItemOptions(props: {
|
|
23
|
-
[propName: string]: any;
|
|
24
|
-
}, item: ItemType, column: number, index: number): ItemOptionsObject | null;
|
|
25
|
-
export interface ColumnOptionsObject {
|
|
26
|
-
readonly: boolean;
|
|
27
|
-
defautIndex?: number;
|
|
28
|
-
[propName: string]: any;
|
|
29
|
-
}
|
|
30
|
-
export interface ColumnOptionsFunction {
|
|
31
|
-
(index?: number): ColumnOptionsObject;
|
|
32
|
-
}
|
|
33
|
-
export declare type CloumnOptions = ColumnOptionsObject | ColumnOptionsFunction;
|
|
34
|
-
export declare function getCoumnOptions(props: {
|
|
5
|
+
export declare function getItemIndex(props: Record<string, any>, items: Item[], value: number | string | boolean | Item, valueType?: ValueType): number;
|
|
6
|
+
export declare function getItemText(props: Record<string, any>, item: Item): string;
|
|
7
|
+
export declare function getItemValue(props: Record<string, any>, item: Item): string | boolean | number;
|
|
8
|
+
export declare function getColumnOptions(props: {
|
|
35
9
|
[propName: string]: any;
|
|
36
10
|
}, index: number): ColumnOptionsObject;
|
|
37
|
-
export interface SourceFunction {
|
|
38
|
-
(params?: any): Promise<ItemType[][] | ItemType[]>;
|
|
39
|
-
}
|
|
40
|
-
export declare type ValueType = 'value' | 'text' | 'item';
|
|
41
11
|
export declare class Model {
|
|
42
12
|
private proxy;
|
|
43
13
|
constructor(proxy: ComponentPublicInstance);
|
|
44
|
-
load(componentType: string, src: SourceFunction |
|
|
14
|
+
load(componentType: string, src: SourceFunction | Item[][] | Item[] | string, params?: any): Promise<Item[][] | Item[] | string[] | string[][]>;
|
|
45
15
|
}
|
|
46
16
|
export declare function useModel(): Model;
|
|
47
|
-
export declare function isEqualsItem(props: Record<string, any>, x:
|
|
48
|
-
export declare function valuesToIndexs(props: Record<string, any>, value: any, columns:
|
|
17
|
+
export declare function isEqualsItem(props: Record<string, any>, x: Item, y: Item): boolean;
|
|
18
|
+
export declare function valuesToIndexs(props: Record<string, any>, value: any, columns: Item[][], dataType: DataType): number[];
|
|
49
19
|
interface Result {
|
|
50
20
|
texts: string[];
|
|
51
|
-
values: (
|
|
21
|
+
values: (Item | string | number | boolean)[];
|
|
52
22
|
}
|
|
53
|
-
export declare function indexsToResult(props: Record<string, any>, indexs: number[], columns:
|
|
54
|
-
export declare function stringToItem(text: string):
|
|
23
|
+
export declare function indexsToResult(props: Record<string, any>, indexs: number[], columns: Item[][], dataType: DataType): Result | null;
|
|
24
|
+
export declare function stringToItem(text: string): Item;
|
|
55
25
|
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface Item {
|
|
2
|
+
text: string;
|
|
3
|
+
value: any;
|
|
4
|
+
children?: Item[] | null;
|
|
5
|
+
[propName: string]: any;
|
|
6
|
+
}
|
|
7
|
+
export interface ColumnOptionsObject {
|
|
8
|
+
readonly: boolean;
|
|
9
|
+
defaultIndex?: number;
|
|
10
|
+
[propName: string]: any;
|
|
11
|
+
}
|
|
12
|
+
export interface ColumnOptionsFunction {
|
|
13
|
+
(index?: number): ColumnOptionsObject;
|
|
14
|
+
}
|
|
15
|
+
export declare type ColumnOptions = ColumnOptionsObject | ColumnOptionsFunction;
|
|
16
|
+
export interface SourceFunction {
|
|
17
|
+
(params?: any): Promise<Item[][] | Item[]>;
|
|
18
|
+
}
|
|
19
|
+
export declare type ValueType = 'value' | 'text' | 'item';
|
|
20
|
+
export declare type DataType = 'singleColumn' | 'multipleColumn' | 'cascade';
|
|
@@ -5,6 +5,8 @@ export declare function useTouch(): {
|
|
|
5
5
|
reset: () => void;
|
|
6
6
|
startX: import("vue").Ref<number>;
|
|
7
7
|
startY: import("vue").Ref<number>;
|
|
8
|
+
startTime: import("vue").Ref<number>;
|
|
9
|
+
duration: import("vue").Ref<number>;
|
|
8
10
|
moveX: import("vue").Ref<number>;
|
|
9
11
|
moveY: import("vue").Ref<number>;
|
|
10
12
|
deltaX: import("vue").Ref<number>;
|
package/package.json
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import { ItemOptions } from './model';
|
|
3
|
-
export declare const commonProps: {
|
|
4
|
-
readonly: {
|
|
5
|
-
type: BooleanConstructor;
|
|
6
|
-
default: boolean;
|
|
7
|
-
};
|
|
8
|
-
visibleItemCount: {
|
|
9
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
10
|
-
default: number;
|
|
11
|
-
};
|
|
12
|
-
textName: {
|
|
13
|
-
type: PropType<string>;
|
|
14
|
-
required: boolean;
|
|
15
|
-
default: string;
|
|
16
|
-
};
|
|
17
|
-
valueName: {
|
|
18
|
-
type: PropType<string>;
|
|
19
|
-
required: boolean;
|
|
20
|
-
default: string;
|
|
21
|
-
};
|
|
22
|
-
itemOptions: {
|
|
23
|
-
type: PropType<ItemOptions>;
|
|
24
|
-
required: boolean;
|
|
25
|
-
};
|
|
26
|
-
};
|