@fox-js/foxui 4.0.1-3 → 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 +2577 -2004
- package/dist/foxui.umd.js +17 -17
- package/dist/style.css +1 -1
- package/dist/types/components/calendaritem/common.d.ts +1 -1
- package/dist/types/components/content/common.d.ts +16 -0
- package/dist/types/components/datepicker/common.d.ts +12 -0
- package/dist/types/components/fixednav/common.d.ts +51 -0
- package/dist/types/components/footer/common.d.ts +22 -0
- package/dist/types/components/footer/type.d.ts +1 -0
- package/dist/types/components/header/common.d.ts +87 -0
- package/dist/types/components/item/common.d.ts +1 -1
- package/dist/types/components/linkitem/common.d.ts +1 -1
- package/dist/types/components/page/common.d.ts +78 -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/components/table/common.d.ts +3 -0
- package/dist/types/components/table/types.d.ts +2 -0
- package/dist/types/components/uploader/uploader.d.ts +2 -0
- package/dist/types/interface.d.ts +4 -1
- package/dist/types/main.d.ts +1 -0
- package/dist/types/utils/domain/page.d.ts +35 -11
- package/dist/types/utils/domain/validator.d.ts +3 -3
- package/dist/types/utils/use-expose/index.d.ts +2 -1
- package/dist/types/utils/use-touch/index.d.ts +2 -0
- package/package.json +1 -1
- package/dist/types/components/overlay/index.taro.vue.d.ts +0 -13
- package/dist/types/components/picker/common-column.d.ts +0 -26
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PropType, CSSProperties } from 'vue';
|
|
2
|
+
import { Padding } from '../../utils/domain';
|
|
3
|
+
export declare function component(componentName: string, scope: string): {
|
|
4
|
+
props: {
|
|
5
|
+
padding: {
|
|
6
|
+
type: PropType<Padding>;
|
|
7
|
+
required: boolean;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
setup(props: Record<string, any>): {
|
|
11
|
+
classes: import("vue").ComputedRef<{
|
|
12
|
+
[x: string]: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
styles: import("vue").ComputedRef<CSSProperties>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -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;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
export declare const component: (componentName: string, scope: string) => {
|
|
3
|
+
props: {
|
|
4
|
+
visible: {
|
|
5
|
+
type: BooleanConstructor;
|
|
6
|
+
default: boolean;
|
|
7
|
+
};
|
|
8
|
+
overlay: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
navList: {
|
|
13
|
+
default: () => never[];
|
|
14
|
+
type: PropType<any[]>;
|
|
15
|
+
};
|
|
16
|
+
activeColor: {
|
|
17
|
+
default: string;
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
};
|
|
20
|
+
activeText: {
|
|
21
|
+
default: string;
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
};
|
|
24
|
+
unActiveText: {
|
|
25
|
+
default: string;
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
};
|
|
28
|
+
position: {
|
|
29
|
+
default: () => {
|
|
30
|
+
top: string;
|
|
31
|
+
bottom: string;
|
|
32
|
+
};
|
|
33
|
+
type: ObjectConstructor;
|
|
34
|
+
};
|
|
35
|
+
type: {
|
|
36
|
+
default: string;
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
emits: string[];
|
|
41
|
+
setup(props: any, { emit }: any): {
|
|
42
|
+
classes: import("vue").ComputedRef<{
|
|
43
|
+
[x: string]: any;
|
|
44
|
+
[x: number]: boolean;
|
|
45
|
+
active: any;
|
|
46
|
+
}>;
|
|
47
|
+
updateValue: (value?: boolean) => void;
|
|
48
|
+
selected: (item: any, event: Event) => void;
|
|
49
|
+
current: import("vue").Ref<number>;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PropType, SetupContext, CSSProperties } from 'vue';
|
|
2
|
+
import { Padding } from '../../utils/domain';
|
|
3
|
+
import type { AlignType } from './type';
|
|
4
|
+
export declare function component(componentName: string, scope: string): {
|
|
5
|
+
props: {
|
|
6
|
+
padding: {
|
|
7
|
+
type: PropType<Padding>;
|
|
8
|
+
required: boolean;
|
|
9
|
+
};
|
|
10
|
+
align: {
|
|
11
|
+
type: PropType<AlignType>;
|
|
12
|
+
required: boolean;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
setup(props: Record<string, any>, context: SetupContext): {
|
|
17
|
+
classes: import("vue").ComputedRef<{
|
|
18
|
+
[x: string]: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
styles: import("vue").ComputedRef<CSSProperties>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type AlignType = 'left' | 'center' | 'right';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { PropType, SetupContext, CSSProperties } from 'vue';
|
|
2
|
+
import { Padding } from '../../utils/domain';
|
|
3
|
+
import { IconParams, Tab } from './types';
|
|
4
|
+
export declare const component: (componentName: string, scope: string) => {
|
|
5
|
+
props: {
|
|
6
|
+
padding: {
|
|
7
|
+
type: PropType<Padding>;
|
|
8
|
+
required: boolean;
|
|
9
|
+
};
|
|
10
|
+
leftShow: {
|
|
11
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
12
|
+
required: boolean;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
leftIcon: {
|
|
16
|
+
type: PropType<string | IconParams>;
|
|
17
|
+
required: boolean;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
leftText: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
required: boolean;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
titleShow: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
required: boolean;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
defaultIndex: {
|
|
31
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
32
|
+
default: number;
|
|
33
|
+
};
|
|
34
|
+
tabs: {
|
|
35
|
+
type: PropType<Tab[]>;
|
|
36
|
+
default: () => never[];
|
|
37
|
+
};
|
|
38
|
+
title: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
required: boolean;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
titleIcon: {
|
|
44
|
+
type: PropType<string | IconParams>;
|
|
45
|
+
required: boolean;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
rightShow: {
|
|
49
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
50
|
+
required: boolean;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
rightIcon: {
|
|
54
|
+
type: PropType<string | IconParams>;
|
|
55
|
+
required: boolean;
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
58
|
+
rightText: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
required: boolean;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
emits: string[];
|
|
65
|
+
setup(props: Record<string, any>, context: SetupContext): {
|
|
66
|
+
classes: import("vue").ComputedRef<{
|
|
67
|
+
[x: string]: boolean;
|
|
68
|
+
}>;
|
|
69
|
+
styles: import("vue").ComputedRef<CSSProperties>;
|
|
70
|
+
activeIndex: import("vue").Ref<string | number>;
|
|
71
|
+
leftStyles: import("vue").ComputedRef<CSSProperties>;
|
|
72
|
+
rightStyles: import("vue").ComputedRef<CSSProperties>;
|
|
73
|
+
tabStyles: import("vue").ComputedRef<CSSProperties>;
|
|
74
|
+
mLeftShow: import("vue").ComputedRef<any>;
|
|
75
|
+
mTitleShow: import("vue").ComputedRef<any>;
|
|
76
|
+
mTabsShow: import("vue").ComputedRef<any>;
|
|
77
|
+
mRightShow: import("vue").ComputedRef<any>;
|
|
78
|
+
mLeftIcon: import("vue").ComputedRef<Record<string, any>>;
|
|
79
|
+
mTitleIcon: import("vue").ComputedRef<Record<string, any>>;
|
|
80
|
+
mRightIcon: import("vue").ComputedRef<Record<string, any>>;
|
|
81
|
+
handleLeft: () => void;
|
|
82
|
+
handleCenter: () => void;
|
|
83
|
+
handleRight: () => void;
|
|
84
|
+
handleRightText: () => void;
|
|
85
|
+
handleTabChange: (id: number | string, name: string) => void;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { CSSProperties, PropType, SetupContext } from 'vue';
|
|
2
|
+
import { SafeAreaInset } from '../../utils/domain';
|
|
3
|
+
import { Rect } from '../../utils/types';
|
|
4
|
+
export declare const component: (componentName: string, scope: string) => {
|
|
5
|
+
props: {
|
|
6
|
+
name: {
|
|
7
|
+
type: PropType<string>;
|
|
8
|
+
required: boolean;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
width: {
|
|
12
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
13
|
+
required: boolean;
|
|
14
|
+
};
|
|
15
|
+
height: {
|
|
16
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
17
|
+
required: boolean;
|
|
18
|
+
};
|
|
19
|
+
safeAreaInset: {
|
|
20
|
+
type: PropType<SafeAreaInset>;
|
|
21
|
+
required: boolean;
|
|
22
|
+
};
|
|
23
|
+
contentPadding: {
|
|
24
|
+
type: PropType<Rect>;
|
|
25
|
+
required: boolean;
|
|
26
|
+
};
|
|
27
|
+
headerPadding: {
|
|
28
|
+
type: PropType<Rect>;
|
|
29
|
+
required: boolean;
|
|
30
|
+
};
|
|
31
|
+
footerPadding: {
|
|
32
|
+
type: PropType<Rect>;
|
|
33
|
+
required: boolean;
|
|
34
|
+
};
|
|
35
|
+
headerHeight: {
|
|
36
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
37
|
+
required: boolean;
|
|
38
|
+
};
|
|
39
|
+
footerHeight: {
|
|
40
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
41
|
+
required: boolean;
|
|
42
|
+
};
|
|
43
|
+
column: {
|
|
44
|
+
type: PropType<string | number>;
|
|
45
|
+
required: boolean;
|
|
46
|
+
};
|
|
47
|
+
gutter: {
|
|
48
|
+
type: PropType<string | number>;
|
|
49
|
+
required: boolean;
|
|
50
|
+
};
|
|
51
|
+
disabled: {
|
|
52
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
53
|
+
required: boolean;
|
|
54
|
+
};
|
|
55
|
+
readonly: {
|
|
56
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
57
|
+
required: boolean;
|
|
58
|
+
};
|
|
59
|
+
labelPosition: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
required: boolean;
|
|
62
|
+
};
|
|
63
|
+
labelWidth: {
|
|
64
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
65
|
+
required: boolean;
|
|
66
|
+
};
|
|
67
|
+
hasBorder: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
setup(props: Record<string, unknown>, context: SetupContext): {
|
|
73
|
+
classes: import("vue").ComputedRef<{
|
|
74
|
+
[x: string]: boolean;
|
|
75
|
+
}>;
|
|
76
|
+
styles: import("vue").ComputedRef<CSSProperties>;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
@@ -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';
|
|
@@ -44,9 +44,12 @@ export declare const component: (componentName: string, scope: string) => {
|
|
|
44
44
|
'fox-table__main__head__tr--border': any;
|
|
45
45
|
};
|
|
46
46
|
getColumnItem: (value: string) => TableColumnProps;
|
|
47
|
+
getColumnItemStyle: (value: string) => any;
|
|
47
48
|
handleSorterClick: (item: TableColumnProps) => void;
|
|
48
49
|
sortDataItem: () => any;
|
|
49
50
|
t: (key: string | string[], ...args: unknown[]) => string;
|
|
51
|
+
stylehead: (item: TableColumnProps) => string;
|
|
52
|
+
stylecolumn: (item: TableColumnProps) => string;
|
|
50
53
|
curData: import("vue").Ref<any>;
|
|
51
54
|
};
|
|
52
55
|
};
|
|
@@ -3,6 +3,7 @@ export declare class UploadOptions {
|
|
|
3
3
|
name: string;
|
|
4
4
|
fileType?: string | undefined;
|
|
5
5
|
formData?: FormData;
|
|
6
|
+
sourceFile: any;
|
|
6
7
|
method: string;
|
|
7
8
|
xhrState: number;
|
|
8
9
|
timeout: number;
|
|
@@ -13,6 +14,7 @@ export declare class UploadOptions {
|
|
|
13
14
|
onProgress?: Function;
|
|
14
15
|
onSuccess?: Function;
|
|
15
16
|
onFailure?: Function;
|
|
17
|
+
beforeXhrUpload?: Function;
|
|
16
18
|
}
|
|
17
19
|
export declare class Uploader {
|
|
18
20
|
options: UploadOptions;
|
|
@@ -4,17 +4,20 @@ import { ScopeGetter } from './api';
|
|
|
4
4
|
import { GroupLayout } from './utils/domain/group';
|
|
5
5
|
import { SafeAreaInset, PageLayout, Domain } from './utils/domain';
|
|
6
6
|
export interface FoxUIOptions {
|
|
7
|
+
headerBarHeight?: number;
|
|
8
|
+
footerBarHeight?: number;
|
|
7
9
|
safeAreaInset?: SafeAreaInset;
|
|
8
10
|
pageLayout?: PageLayout;
|
|
9
11
|
headerPadding?: Rect;
|
|
10
12
|
contentPadding?: Rect;
|
|
11
|
-
|
|
13
|
+
groupLayout?: GroupLayout;
|
|
12
14
|
labelWidth?: number | string;
|
|
13
15
|
[propName: string]: any;
|
|
14
16
|
}
|
|
15
17
|
export interface FoxUI {
|
|
16
18
|
version: string;
|
|
17
19
|
install(app: App, options: FoxUIOptions): void;
|
|
20
|
+
initPageLayout(options: FoxUIOptions, rootDomain?: Domain): void;
|
|
18
21
|
setScopeGetter(getter: ScopeGetter): void;
|
|
19
22
|
setAPI(name: string, func: any, scope?: string): void;
|
|
20
23
|
getAPI(proxy: ComponentPublicInstance, name: string, scope?: string): any | null;
|
package/dist/types/main.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare class FoxUIApp implements FoxUI {
|
|
|
8
8
|
get version(): string;
|
|
9
9
|
constructor(packages: any[], version: string);
|
|
10
10
|
install(app: App, options: FoxUIOptions): void;
|
|
11
|
+
initPageLayout(options: FoxUIOptions, rootDomain?: Domain): void;
|
|
11
12
|
setScopeGetter(getter: ScopeGetter): void;
|
|
12
13
|
setAPI(name: string, api: any, scope?: string): void;
|
|
13
14
|
getAPI(proxy: ComponentPublicInstance, name: string, scope?: string): any | null;
|
|
@@ -1,25 +1,49 @@
|
|
|
1
1
|
import { Domain } from './domain';
|
|
2
|
+
import { UnwrapNestedRefs } from 'vue';
|
|
2
3
|
export interface SafeAreaInset {
|
|
3
4
|
left: number | string;
|
|
4
5
|
top: number | string;
|
|
5
6
|
right: number | string;
|
|
6
7
|
bottom: number | string;
|
|
7
8
|
}
|
|
9
|
+
export interface Padding {
|
|
10
|
+
left: number | null;
|
|
11
|
+
top: number | null;
|
|
12
|
+
right: number | null;
|
|
13
|
+
bottom: number | null;
|
|
14
|
+
}
|
|
8
15
|
export interface PageLayout {
|
|
9
16
|
width: number | string;
|
|
10
17
|
height: number | string;
|
|
11
18
|
headerHeight: number | string;
|
|
12
19
|
footerHeight: number | string;
|
|
20
|
+
headerPadding?: Padding;
|
|
21
|
+
footerPadding?: Padding;
|
|
22
|
+
contentPadding?: Padding;
|
|
23
|
+
}
|
|
24
|
+
export interface PageState {
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
headerHeight: number;
|
|
28
|
+
headerPadding: Padding;
|
|
29
|
+
footerHeight: number;
|
|
30
|
+
footerPadding: Padding;
|
|
31
|
+
contentHeight: number | string | null;
|
|
32
|
+
contentPadding: Padding;
|
|
33
|
+
safeAreaTop: number;
|
|
34
|
+
safeAreaBottom: number;
|
|
35
|
+
safeAreaLeft: number;
|
|
36
|
+
safeAreaRight: number;
|
|
37
|
+
headerMounted?: boolean;
|
|
38
|
+
footerMounted?: boolean;
|
|
13
39
|
}
|
|
14
|
-
export declare function
|
|
15
|
-
export declare function
|
|
16
|
-
export declare function
|
|
17
|
-
export declare function
|
|
18
|
-
export declare function
|
|
19
|
-
export declare function
|
|
20
|
-
export declare function
|
|
21
|
-
export declare function
|
|
22
|
-
export declare function
|
|
40
|
+
export declare function toPadding(rect: any): Padding;
|
|
41
|
+
export declare function updatePageState(state: PageState, pageLayout: any, overrideProps?: Record<string, unknown>, root?: boolean, rootWidth?: number, rootHeight?: number): void;
|
|
42
|
+
export declare function definePageState(domain: Domain, overrideProps?: Record<string, unknown>): UnwrapNestedRefs<PageState> | null;
|
|
43
|
+
export declare function usePageState(domain: Domain): PageState | null;
|
|
44
|
+
export declare function getPageHeaderAreaHeight(domain: Domain, state?: PageState): number;
|
|
45
|
+
export declare function getPageFooterAreaHeight(domain: Domain, state?: PageState): number;
|
|
46
|
+
export declare function getPageContentAreaHeight(domain: Domain, state?: PageState): number;
|
|
47
|
+
export declare function getPageContentAreaWidth(domain: Domain, state?: PageState): number;
|
|
48
|
+
export declare function isInnerPage(domain: Domain, proxy: any): boolean;
|
|
23
49
|
export declare function isSubPage(domain: Domain): boolean;
|
|
24
|
-
export declare function getParentPageContentHeight(domain: Domain): number;
|
|
25
|
-
export declare function getParentPageContentWidth(domain: Domain): number;
|
|
@@ -4,12 +4,12 @@ export interface ValidateHandler {
|
|
|
4
4
|
error?(errorMsg: string, proxy: ComponentPublicInstance, instance: ComponentInternalInstance): void;
|
|
5
5
|
reset?(proxy: ComponentPublicInstance, instance: ComponentInternalInstance): void;
|
|
6
6
|
success?(proxy: ComponentPublicInstance, instance: ComponentInternalInstance): void;
|
|
7
|
-
decorate?(
|
|
7
|
+
decorate?(newRule: Rule, oldRle: Rule, proxy: ComponentPublicInstance, instance: ComponentInternalInstance): void;
|
|
8
8
|
getValue?(proxy: ComponentPublicInstance, instance: ComponentInternalInstance): any;
|
|
9
9
|
}
|
|
10
10
|
export declare function setGlobalValidateHandler(validateHandler: ValidateHandler): void;
|
|
11
11
|
export declare function setGlobalValidator(type: string, validator: ExecuteValidator): void;
|
|
12
|
-
export declare function
|
|
12
|
+
export declare function deleteGlobalValidator(type: string): void;
|
|
13
13
|
export declare function setGlobalValidateCheckEvents(events: string[]): void;
|
|
14
14
|
export declare function getGlobalValidateCheckEvents(): string[];
|
|
15
15
|
export declare function setGlobalValidateResetEvents(events: string[]): void;
|
|
@@ -40,7 +40,7 @@ export declare class ValidateSchema {
|
|
|
40
40
|
destroy(): void;
|
|
41
41
|
addChild(child: ValidateSchema): void;
|
|
42
42
|
removeChild(child: ValidateSchema): void;
|
|
43
|
-
private
|
|
43
|
+
private execHandler;
|
|
44
44
|
private decorate;
|
|
45
45
|
private success;
|
|
46
46
|
private error;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { ComponentInternalInstance } from 'vue';
|
|
2
|
+
export declare function useExpose(apis: Record<string, any>, instance?: ComponentInternalInstance | null): void;
|
|
@@ -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>;
|