@yelingfeng/pandora2 0.1.3
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/LICENSE +21 -0
- package/README.md +88 -0
- package/dist/packages/components/PdCharts/index.d.ts +7 -0
- package/dist/packages/components/PdCharts/src/charts/pie/index.d.ts +2 -0
- package/dist/packages/components/PdCharts/src/charts/pie/pie01.d.ts +6 -0
- package/dist/packages/components/PdCharts/src/charts/pie/pie02.d.ts +6 -0
- package/dist/packages/components/PdCharts/src/constant/index.d.ts +21 -0
- package/dist/packages/components/PdCharts/src/hooks/index.d.ts +5 -0
- package/dist/packages/components/PdCharts/src/hooks/useApi.d.ts +7 -0
- package/dist/packages/components/PdCharts/src/hooks/useAutosize.d.ts +4 -0
- package/dist/packages/components/PdCharts/src/hooks/useCharts.d.ts +2 -0
- package/dist/packages/components/PdCharts/src/hooks/useEventListener.d.ts +7 -0
- package/dist/packages/components/PdCharts/src/hooks/useLoading.d.ts +4 -0
- package/dist/packages/components/PdCharts/src/props/index.d.ts +40 -0
- package/dist/packages/components/PdCharts/src/transform/index.d.ts +18 -0
- package/dist/packages/components/PdCharts/src/transform/seriesHelper.d.ts +31 -0
- package/dist/packages/components/PdCharts/src/types/chart.d.ts +19 -0
- package/dist/packages/components/PdCharts/src/types/index.d.ts +94 -0
- package/dist/packages/components/PdCharts/src/types/props.d.ts +31 -0
- package/dist/packages/components/PdCharts/src/utils/core.d.ts +7 -0
- package/dist/packages/components/PdCharts/src/utils/defaultOpt.d.ts +100 -0
- package/dist/packages/components/PdCharts/src/utils/index.d.ts +18 -0
- package/dist/packages/components/PdCharts/src/utils/wc.d.ts +5 -0
- package/dist/packages/components/PdForm/index.d.ts +14 -0
- package/dist/packages/components/PdForm/src/componentsMap.d.ts +6 -0
- package/dist/packages/components/PdForm/src/helper.d.ts +14 -0
- package/dist/packages/components/PdForm/src/hooks/useAdvanced.d.ts +15 -0
- package/dist/packages/components/PdForm/src/hooks/useAutoFocus.d.ts +10 -0
- package/dist/packages/components/PdForm/src/hooks/useComponentRegister.d.ts +3 -0
- package/dist/packages/components/PdForm/src/hooks/useForm.d.ts +4 -0
- package/dist/packages/components/PdForm/src/hooks/useFormContext.d.ts +8 -0
- package/dist/packages/components/PdForm/src/hooks/useFormEvents.d.ts +28 -0
- package/dist/packages/components/PdForm/src/hooks/useFormValues.d.ts +13 -0
- package/dist/packages/components/PdForm/src/props/index.d.ts +112 -0
- package/dist/packages/components/PdForm/src/types/formItem.d.ts +81 -0
- package/dist/packages/components/PdForm/src/types/hooks.d.ts +6 -0
- package/dist/packages/components/PdForm/src/types/index.d.ts +133 -0
- package/dist/packages/components/PdPageLayout/index.d.ts +6 -0
- package/dist/packages/components/PdTable/index.d.ts +5 -0
- package/dist/packages/components/PdTable/src/hooks/useTable.d.ts +4 -0
- package/dist/packages/components/PdTable/src/pagination/config.d.ts +8 -0
- package/dist/packages/components/PdTable/src/props/index.d.ts +20 -0
- package/dist/packages/components/PdTable/src/props/useTableProps.d.ts +381 -0
- package/dist/packages/components/PdTable/src/render/column.d.ts +11 -0
- package/dist/packages/components/PdTable/src/render/pager.d.ts +5 -0
- package/dist/packages/components/PdTable/src/sort/index.d.ts +12 -0
- package/dist/packages/components/PdTable/src/sort/sortService.d.ts +91 -0
- package/dist/packages/components/PdTable/src/types/element-type.d.ts +226 -0
- package/dist/packages/components/PdTable/src/types/index.d.ts +90 -0
- package/dist/packages/components/index.d.ts +4 -0
- package/dist/packages/hooks/index.d.ts +1 -0
- package/dist/packages/index.d.ts +6 -0
- package/dist/packages/pandora/component.d.ts +3 -0
- package/dist/packages/pandora/defaults.d.ts +4 -0
- package/dist/packages/pandora/make-installer.d.ts +4 -0
- package/dist/packages/pandora/plugin.d.ts +3 -0
- package/dist/pandora2.css +1 -0
- package/dist/pandora2.es.js +52230 -0
- package/dist/pandora2.umd.js +78 -0
- package/dist/src/_utils/create/index.d.ts +1 -0
- package/dist/src/_utils/dateUtil.d.ts +7 -0
- package/dist/src/_utils/env.d.ts +26 -0
- package/dist/src/_utils/helper/index.d.ts +4 -0
- package/dist/src/_utils/helper/tsxHelper.d.ts +13 -0
- package/dist/src/_utils/index.d.ts +8 -0
- package/dist/src/_utils/is/index.d.ts +21 -0
- package/dist/src/_utils/log/index.d.ts +2 -0
- package/dist/src/_utils/propTypes.d.ts +9 -0
- package/dist/src/_utils/props/index.d.ts +2 -0
- package/dist/src/_utils/vue/index.d.ts +3 -0
- package/dist/src/_utils/vue/install.d.ts +5 -0
- package/dist/src/_utils/vue/refs.d.ts +3 -0
- package/dist/src/_utils/vue/typescript.d.ts +5 -0
- package/dist/src/enums/breakpointEnum.d.ts +18 -0
- package/dist/src/hooks/component/useFormItem.d.ts +2 -0
- package/dist/src/hooks/core/useAttrs.d.ts +9 -0
- package/dist/src/hooks/core/useContext.d.ts +11 -0
- package/dist/src/hooks/event/useBreakpoint.d.ts +22 -0
- package/dist/src/hooks/event/useEventListener.d.ts +14 -0
- package/dist/src/types/axios.d.ts +53 -0
- package/dist/src/types/config.d.ts +25 -0
- package/dist/src/types/global.d.ts +107 -0
- package/dist/src/vue-sfc-shim.d.ts +19 -0
- package/package.json +129 -0
- package/volar.d.ts +9 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FormItemProp } from 'element-plus';
|
|
2
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
3
|
+
import type { Callback, EmitType, Fn, IFormActionType, IFormProps, IFormSchema } from '../types';
|
|
4
|
+
interface UseFormActionContext {
|
|
5
|
+
emit: EmitType;
|
|
6
|
+
getProps: ComputedRef<IFormProps>;
|
|
7
|
+
getSchema: ComputedRef<IFormSchema[]>;
|
|
8
|
+
formModel: Recordable;
|
|
9
|
+
defaultValueRef: Ref<Recordable>;
|
|
10
|
+
formElRef: Ref<IFormActionType>;
|
|
11
|
+
schemaRef: Ref<IFormSchema[]>;
|
|
12
|
+
handleFormValues: Fn;
|
|
13
|
+
}
|
|
14
|
+
export declare function useFormEvents({ emit, getProps, formModel, getSchema, defaultValueRef, formElRef, schemaRef, handleFormValues }: UseFormActionContext): {
|
|
15
|
+
handleSubmit: (e?: Event) => Promise<void>;
|
|
16
|
+
clearValidate: (name?: string | string[]) => Promise<void>;
|
|
17
|
+
validate: (cb?: Callback) => Promise<void>;
|
|
18
|
+
validateFields: (props?: FormItemProp[] | undefined, callback?: Callback | undefined) => Promise<void>;
|
|
19
|
+
getFieldsValue: () => Recordable;
|
|
20
|
+
updateSchema: (data: Partial<IFormSchema> | Partial<IFormSchema>[]) => Promise<void>;
|
|
21
|
+
resetSchema: (data: Partial<IFormSchema> | Partial<IFormSchema>[]) => Promise<void>;
|
|
22
|
+
appendSchemaByField: (schema: IFormSchema, prefixField?: string, first?: boolean) => Promise<void>;
|
|
23
|
+
removeSchemaByFiled: (fields: string | string[]) => Promise<void>;
|
|
24
|
+
resetFields: () => Promise<void>;
|
|
25
|
+
setFieldsValue: (values: Recordable) => Promise<void>;
|
|
26
|
+
scrollToField: (name: string, options?: ScrollOptions | undefined) => Promise<void>;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IFormProps, IFormSchema } from '../types';
|
|
2
|
+
import { Ref, ComputedRef } from 'vue';
|
|
3
|
+
interface UseFormValuesContext {
|
|
4
|
+
defaultValueRef: Ref<any>;
|
|
5
|
+
getSchema: ComputedRef<IFormSchema[]>;
|
|
6
|
+
getProps: ComputedRef<IFormProps>;
|
|
7
|
+
formModel: Recordable;
|
|
8
|
+
}
|
|
9
|
+
export declare function useFormValues({ defaultValueRef, getSchema, getProps, formModel }: UseFormValuesContext): {
|
|
10
|
+
handleFormValues: (values: Recordable) => Recordable<any>;
|
|
11
|
+
initDefault: () => void;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { FieldMapToTime, IFormSchema, Fn } from '../types';
|
|
2
|
+
import type { CSSProperties, PropType } from 'vue';
|
|
3
|
+
import type { ButtonProps, ColProps, RowProps } from 'element-plus';
|
|
4
|
+
export declare const FormBasicProps: {
|
|
5
|
+
model: {
|
|
6
|
+
type: PropType<Recordable<any>>;
|
|
7
|
+
default: {};
|
|
8
|
+
};
|
|
9
|
+
labelWidth: {
|
|
10
|
+
type: PropType<string | number>;
|
|
11
|
+
default: number;
|
|
12
|
+
};
|
|
13
|
+
fieldMapToTime: {
|
|
14
|
+
type: PropType<FieldMapToTime>;
|
|
15
|
+
default: () => never[];
|
|
16
|
+
};
|
|
17
|
+
schemas: {
|
|
18
|
+
type: PropType<IFormSchema[]>;
|
|
19
|
+
default: () => never[];
|
|
20
|
+
};
|
|
21
|
+
mergeDynamicData: {
|
|
22
|
+
type: PropType<Recordable<any>>;
|
|
23
|
+
default: null;
|
|
24
|
+
};
|
|
25
|
+
baseRowStyle: {
|
|
26
|
+
type: PropType<CSSProperties>;
|
|
27
|
+
};
|
|
28
|
+
baseColProps: {
|
|
29
|
+
type: PropType<Partial<ColProps>>;
|
|
30
|
+
};
|
|
31
|
+
autoSetPlaceHolder: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
32
|
+
default: boolean;
|
|
33
|
+
} & {
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
autoSubmitOnEnter: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
37
|
+
default: boolean;
|
|
38
|
+
} & {
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
submitOnReset: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
submitOnChange: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
size: import("vue-types").VueTypeDef<string> & {
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
emptySpan: {
|
|
54
|
+
type: PropType<number>;
|
|
55
|
+
default: number;
|
|
56
|
+
};
|
|
57
|
+
showAdvancedButton: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
58
|
+
default: boolean;
|
|
59
|
+
} & {
|
|
60
|
+
default: boolean;
|
|
61
|
+
};
|
|
62
|
+
transformDateFunc: {
|
|
63
|
+
type: PropType<Fn>;
|
|
64
|
+
default: (date: any) => any;
|
|
65
|
+
};
|
|
66
|
+
rulesMessageJoinLabel: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
67
|
+
default: boolean;
|
|
68
|
+
} & {
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
autoAdvancedLine: import("vue-types").VueTypeValidableDef<number> & {
|
|
72
|
+
default: number;
|
|
73
|
+
} & {
|
|
74
|
+
default: number;
|
|
75
|
+
};
|
|
76
|
+
alwaysShowLines: import("vue-types").VueTypeValidableDef<number> & {
|
|
77
|
+
default: number;
|
|
78
|
+
} & {
|
|
79
|
+
default: number;
|
|
80
|
+
};
|
|
81
|
+
showActionButtonGroup: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
82
|
+
default: boolean;
|
|
83
|
+
} & {
|
|
84
|
+
default: boolean;
|
|
85
|
+
};
|
|
86
|
+
actionColOptions: PropType<Partial<ColProps>>;
|
|
87
|
+
showResetButton: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
88
|
+
default: boolean;
|
|
89
|
+
} & {
|
|
90
|
+
default: boolean;
|
|
91
|
+
};
|
|
92
|
+
autoFocusFirstItem: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
93
|
+
default: boolean;
|
|
94
|
+
};
|
|
95
|
+
resetButtonOptions: PropType<Partial<ButtonProps>>;
|
|
96
|
+
showSubmitButton: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
97
|
+
default: boolean;
|
|
98
|
+
} & {
|
|
99
|
+
default: boolean;
|
|
100
|
+
};
|
|
101
|
+
submitButtonOptions: PropType<Partial<ButtonProps>>;
|
|
102
|
+
resetFunc: PropType<() => Promise<void>>;
|
|
103
|
+
submitFunc: PropType<() => Promise<void>>;
|
|
104
|
+
hideRequiredMark: import("vue-types").VueTypeValidableDef<boolean> & {
|
|
105
|
+
default: boolean;
|
|
106
|
+
};
|
|
107
|
+
labelAlign: import("vue-types").VueTypeValidableDef<string> & {
|
|
108
|
+
default: string;
|
|
109
|
+
};
|
|
110
|
+
rowProps: PropType<RowProps>;
|
|
111
|
+
rules: PropType<Partial<Record<string, import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>>>>;
|
|
112
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { ColProps } from 'element-plus';
|
|
2
|
+
import type { HTMLAttributes, VNodeChild } from 'vue';
|
|
3
|
+
export type IFormItem = {
|
|
4
|
+
/**
|
|
5
|
+
* Used with label, whether to display : after label text.
|
|
6
|
+
* @default true
|
|
7
|
+
* @type boolean
|
|
8
|
+
*/
|
|
9
|
+
colon?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* The extra prompt message. It is similar to help. Usage example: to display error message and prompt message at the same time.
|
|
12
|
+
* @type any (string | slot)
|
|
13
|
+
*/
|
|
14
|
+
extra?: string | VNodeChild | JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* Used with validateStatus, this option specifies the validation status icon. Recommended to be used only with Input.
|
|
17
|
+
* @default false
|
|
18
|
+
* @type boolean
|
|
19
|
+
*/
|
|
20
|
+
hasFeedback?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The prompt message. If not provided, the prompt message will be generated by the validation rule.
|
|
23
|
+
* @type any (string | slot)
|
|
24
|
+
*/
|
|
25
|
+
help?: string | VNodeChild | JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Label test
|
|
28
|
+
* @type any (string | slot)
|
|
29
|
+
*/
|
|
30
|
+
label?: string | VNodeChild | JSX.Element;
|
|
31
|
+
/**
|
|
32
|
+
* The layout of label. You can set span offset to something like {span: 3, offset: 12} or sm: {span: 3, offset: 12} same as with <Col>
|
|
33
|
+
* @type Col
|
|
34
|
+
*/
|
|
35
|
+
labelCol?: ColProps & HTMLAttributes;
|
|
36
|
+
/**
|
|
37
|
+
* Whether provided or not, it will be generated by the validation rule.
|
|
38
|
+
* @default false
|
|
39
|
+
* @type boolean
|
|
40
|
+
*/
|
|
41
|
+
required?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The validation status. If not provided, it will be generated by validation rule. options: 'success' 'warning' 'error' 'validating'
|
|
44
|
+
* @type string
|
|
45
|
+
*/
|
|
46
|
+
validateStatus?: '' | 'success' | 'warning' | 'error' | 'validating';
|
|
47
|
+
/**
|
|
48
|
+
* The layout for input controls, same as labelCol
|
|
49
|
+
* @type Col
|
|
50
|
+
*/
|
|
51
|
+
wrapperCol?: ColProps;
|
|
52
|
+
/**
|
|
53
|
+
* Set sub label htmlFor.
|
|
54
|
+
*/
|
|
55
|
+
htmlFor?: string;
|
|
56
|
+
/**
|
|
57
|
+
* text align of label
|
|
58
|
+
*/
|
|
59
|
+
labelAlign?: 'left' | 'right';
|
|
60
|
+
/**
|
|
61
|
+
* a key of model. In the setting of validate and resetFields method, the attribute is required
|
|
62
|
+
*/
|
|
63
|
+
name?: string;
|
|
64
|
+
/**
|
|
65
|
+
* validation rules of form
|
|
66
|
+
*/
|
|
67
|
+
rules?: object | object[];
|
|
68
|
+
/**
|
|
69
|
+
* Whether to automatically associate form fields. In most cases, you can setting automatic association.
|
|
70
|
+
* If the conditions for automatic association are not met, you can manually associate them. See the notes below.
|
|
71
|
+
*/
|
|
72
|
+
autoLink?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Whether stop validate on first rule of error for this field.
|
|
75
|
+
*/
|
|
76
|
+
validateFirst?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* When to validate the value of children node
|
|
79
|
+
*/
|
|
80
|
+
validateTrigger?: string | string[] | false;
|
|
81
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import type { ValidateFieldsError } from 'async-validator';
|
|
2
|
+
import type { ButtonProps, ColProps, FormItemProp, FormItemRule, FormRules, RowProps } from 'element-plus';
|
|
3
|
+
import type { ComputedRef, CSSProperties, Ref, VNode } from 'vue';
|
|
4
|
+
export type Fn = (...args: any[]) => any;
|
|
5
|
+
export type EmitType = (event: string, ...args: any[]) => void;
|
|
6
|
+
export type FieldMapToTime = [string, [string, string], string?][];
|
|
7
|
+
export type IFormProps = {
|
|
8
|
+
name?: string;
|
|
9
|
+
model?: Record<string, any>;
|
|
10
|
+
labelPosition?: 'left' | 'right' | 'top';
|
|
11
|
+
labelWidth?: string | number;
|
|
12
|
+
labelSuffix?: string;
|
|
13
|
+
size?: 'large' | 'default' | 'small';
|
|
14
|
+
inline?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
rules?: FormRules;
|
|
17
|
+
compact?: boolean;
|
|
18
|
+
emptySpan?: number | Partial<ColProps>;
|
|
19
|
+
rowProps?: RowProps;
|
|
20
|
+
submitOnReset?: boolean;
|
|
21
|
+
submitOnChange?: boolean;
|
|
22
|
+
labelCol?: Partial<ColProps>;
|
|
23
|
+
wrapperCol?: Partial<ColProps>;
|
|
24
|
+
baseRowStyle?: CSSProperties;
|
|
25
|
+
baseColProps?: Partial<ColProps>;
|
|
26
|
+
schemas?: IFormSchema[];
|
|
27
|
+
mergeDynamicData?: Recordable;
|
|
28
|
+
autoSetPlaceHolder?: boolean;
|
|
29
|
+
autoSubmitOnEnter?: boolean;
|
|
30
|
+
rulesMessageJoinLabel?: boolean;
|
|
31
|
+
showAdvancedButton?: boolean;
|
|
32
|
+
autoFocusFirstItem?: boolean;
|
|
33
|
+
autoAdvancedLine?: number;
|
|
34
|
+
alwaysShowLines?: number;
|
|
35
|
+
showActionButtonGroup?: boolean;
|
|
36
|
+
fieldMapToTime?: FieldMapToTime;
|
|
37
|
+
resetButtonOptions?: Partial<ButtonProps>;
|
|
38
|
+
submitButtonOptions?: Partial<ButtonProps>;
|
|
39
|
+
actionColOptions?: Partial<ColProps>;
|
|
40
|
+
showResetButton?: boolean;
|
|
41
|
+
showSubmitButton?: boolean;
|
|
42
|
+
hideRequiredAsterisk?: boolean;
|
|
43
|
+
showMessage?: boolean;
|
|
44
|
+
inlineMessage?: boolean;
|
|
45
|
+
statusIcon?: boolean;
|
|
46
|
+
validateOnRuleChange?: boolean;
|
|
47
|
+
resetFunc?: () => Promise<void>;
|
|
48
|
+
submitFunc?: () => Promise<void>;
|
|
49
|
+
transformDateFunc?: (date: any) => string;
|
|
50
|
+
layout?: 'horizontal' | 'vertical' | 'inline';
|
|
51
|
+
};
|
|
52
|
+
export type RenderCallbackParams = {
|
|
53
|
+
schema: IFormSchema;
|
|
54
|
+
values: Recordable;
|
|
55
|
+
model: Recordable;
|
|
56
|
+
field: string;
|
|
57
|
+
};
|
|
58
|
+
export type HelpComponentProps = {
|
|
59
|
+
maxWidth: string;
|
|
60
|
+
showIndex: boolean;
|
|
61
|
+
text: any;
|
|
62
|
+
color: string;
|
|
63
|
+
fontSize: string;
|
|
64
|
+
icon: string;
|
|
65
|
+
absolute: boolean;
|
|
66
|
+
position: any;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Form Schema
|
|
70
|
+
*/
|
|
71
|
+
export type IFormSchema = {
|
|
72
|
+
field: string;
|
|
73
|
+
label: string;
|
|
74
|
+
changeEvent?: string;
|
|
75
|
+
component: ComponentType;
|
|
76
|
+
componentProps?: ((opt: {
|
|
77
|
+
schema: IFormSchema;
|
|
78
|
+
formModel: Recordable;
|
|
79
|
+
}) => Recordable) | any;
|
|
80
|
+
rules?: FormItemRule | FormItemRule[];
|
|
81
|
+
required?: boolean | ((renderCallbackParams: RenderCallbackParams) => boolean);
|
|
82
|
+
suffix?: string | number | ((values: RenderCallbackParams) => string | number);
|
|
83
|
+
rulesMessageJoinLabel?: boolean;
|
|
84
|
+
itemProps?: Partial<FormItemProp>;
|
|
85
|
+
colProps?: Partial<ColProps>;
|
|
86
|
+
labelCol?: Partial<ColProps>;
|
|
87
|
+
wrapperCol?: Partial<ColProps>;
|
|
88
|
+
baseRowStyle?: CSSProperties;
|
|
89
|
+
baseColProps?: Partial<ColProps>;
|
|
90
|
+
valueField?: string;
|
|
91
|
+
subLabel?: string;
|
|
92
|
+
helpMessage?: string | string[] | ((renderCallbackParams: RenderCallbackParams) => string | string[]);
|
|
93
|
+
helpComponentProps?: Partial<HelpComponentProps>;
|
|
94
|
+
defaultValue?: any;
|
|
95
|
+
isAdvanced?: boolean;
|
|
96
|
+
span?: number;
|
|
97
|
+
ifShow?: boolean | ((renderCallbackParams: RenderCallbackParams) => boolean);
|
|
98
|
+
show?: boolean | ((renderCallbackParams: RenderCallbackParams) => boolean);
|
|
99
|
+
render?: (renderCallbackParams: RenderCallbackParams) => VNode | VNode[] | string;
|
|
100
|
+
renderColContent?: (renderCallbackParams: RenderCallbackParams) => VNode | VNode[] | string;
|
|
101
|
+
renderComponentContent?: ((renderCallbackParams: RenderCallbackParams) => any) | VNode | VNode[] | string;
|
|
102
|
+
slot?: string;
|
|
103
|
+
colSlot?: string;
|
|
104
|
+
dynamicDisabled?: boolean | ((renderCallbackParams: RenderCallbackParams) => boolean);
|
|
105
|
+
dynamicRules?: (renderCallbackParams: RenderCallbackParams) => FormItemRule[];
|
|
106
|
+
labelWidth?: string | number;
|
|
107
|
+
disabledLabelWidth?: boolean;
|
|
108
|
+
};
|
|
109
|
+
export type Callback = {
|
|
110
|
+
(isValid?: boolean, invalidFields?: ValidateFieldsError): void;
|
|
111
|
+
};
|
|
112
|
+
export type DynamicProps<T> = {
|
|
113
|
+
[P in keyof T]: Ref<T[P]> | T[P] | ComputedRef<T[P]>;
|
|
114
|
+
};
|
|
115
|
+
export type IFormActionType = {
|
|
116
|
+
submit: () => Promise<void>;
|
|
117
|
+
resetFields: () => Promise<void>;
|
|
118
|
+
validate: (cb: Callback | undefined) => Promise<void>;
|
|
119
|
+
validateFields: (props?: Array<FormItemProp>, callback?: Callback) => Promise<void>;
|
|
120
|
+
setFieldsValue: (values: Recordable) => Promise<void>;
|
|
121
|
+
getFieldsValue: () => Recordable;
|
|
122
|
+
clearValidate: (name?: string | string[]) => Promise<void>;
|
|
123
|
+
updateSchema: (data: Partial<IFormSchema> | Partial<IFormSchema>[]) => Promise<void>;
|
|
124
|
+
resetSchema: (data: Partial<IFormSchema> | Partial<IFormSchema>[]) => Promise<void>;
|
|
125
|
+
setProps: (formProps: Partial<IFormProps>) => Promise<void>;
|
|
126
|
+
removeSchemaByFiled: (field: string | string[]) => Promise<void>;
|
|
127
|
+
appendSchemaByField?: (schema: IFormSchema, prefixField?: string, first?: boolean | any) => Promise<void>;
|
|
128
|
+
scrollToField: (name: any, options?: ScrollOptions) => Promise<void>;
|
|
129
|
+
};
|
|
130
|
+
export type RegisterFn = (formInstance: IFormActionType) => void;
|
|
131
|
+
export type UseFormReturnType = [RegisterFn, IFormActionType];
|
|
132
|
+
export type NamePath = string | number | (string | number)[];
|
|
133
|
+
export type ComponentType = 'Autocomplete' | 'Button' | 'Checkbox' | 'Cascader' | 'CheckboxGroup' | 'DatePicker' | 'Input' | 'InputNumber' | 'TimePicker' | 'TimeSelect' | 'Slider' | 'Select' | 'SelectOption' | 'Radio' | 'RadioGroup' | 'Switch' | 'Rate' | 'Divider' | 'ApiSelect';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import index from './index.vue';
|
|
2
|
+
import tree from './tree.vue';
|
|
3
|
+
import type { SFCWithInstall } from '../../../src/_utils/vue/typescript';
|
|
4
|
+
export declare const PdPageLayout: SFCWithInstall<typeof index>;
|
|
5
|
+
export declare const PdPageTreeLayout: SFCWithInstall<typeof tree>;
|
|
6
|
+
export default PdPageLayout;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const PdTable: import('../../../src/_utils/vue').SFCWithInstall<import("vue").DefineComponent<{}, {}, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
2
|
+
export default PdTable;
|
|
3
|
+
export type TableInstance = InstanceType<typeof PdTable>;
|
|
4
|
+
export * from './src/types';
|
|
5
|
+
export { useTable } from './src/hooks/useTable';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IPandoraTableColumn, IPandoraTableSort } from '../types';
|
|
3
|
+
export declare const tableProps: {
|
|
4
|
+
data: {
|
|
5
|
+
type: PropType<any>;
|
|
6
|
+
default(): never[];
|
|
7
|
+
};
|
|
8
|
+
columns: {
|
|
9
|
+
type: PropType<IPandoraTableColumn<any>[]>;
|
|
10
|
+
default(): never[];
|
|
11
|
+
};
|
|
12
|
+
sortConfig: {
|
|
13
|
+
type: PropType<IPandoraTableSort<any>>;
|
|
14
|
+
default(): {};
|
|
15
|
+
};
|
|
16
|
+
tableConfig: {
|
|
17
|
+
type: PropType<Partial<Omit<import("../types/element-type").TableProps<any>, "data" | "column">>>;
|
|
18
|
+
default(): {};
|
|
19
|
+
};
|
|
20
|
+
};
|