@form-create/element-ui 2.5.14 → 3.0.0-alpha.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/types/config.d.ts DELETED
@@ -1,119 +0,0 @@
1
- import {Button, Col, Popover, Row, Tooltip} from "element-ui";
2
- import {FormData, VNodeData} from "@form-create/core";
3
- import {ElementUIComponentSize} from "element-ui/types/component";
4
- import {FormItemLabelPosition, ValidateCallback, ValidateFieldCallback} from "element-ui/types/form";
5
- import {Api} from "./index";
6
-
7
- export interface OptionAttrs {
8
- col?: Boolean | Col & {
9
- labelWidth?: number | string;
10
- show?: Boolean;
11
- };
12
- row?: Boolean | Row & {
13
- show?: Boolean;
14
- };
15
- info?: Boolean | (Tooltip | Popover) & VNodeData & {
16
- show?: Boolean;
17
- native?: Boolean;
18
- icon?: string;
19
- align?: 'left' | 'right';
20
- info?: string;
21
- };
22
- wrap?: Boolean | VNodeData & {
23
- labelWidth?: string
24
- required?: boolean
25
- error?: string
26
- showMessage?: boolean
27
- inlineMessage?: boolean
28
- size?: ElementUIComponentSize
29
- show?: Boolean;
30
- };
31
- form?: {
32
- inline?: boolean
33
- disabled?: boolean
34
- labelPosition?: FormItemLabelPosition
35
- labelWidth?: string
36
- labelSuffix?: string
37
- showMessage?: boolean
38
- inlineMessage?: boolean
39
- statusIcon?: boolean
40
- validateOnRuleChange?: boolean
41
- size?: ElementUIComponentSize
42
- className?: any;
43
- col?: Boolean;
44
- };
45
-
46
- submitBtn?: Boolean | Button & {
47
- click?: Function;
48
- innerText?: string;
49
- show?: Boolean;
50
- };
51
-
52
- resetBtn?: Boolean | Button & {
53
- click?: Function;
54
- innerText?: string;
55
- show?: Boolean;
56
- };
57
-
58
- }
59
-
60
- declare const optionAttrs: OptionAttrs & {
61
- title?: Boolean | VNodeData & {
62
- show?: Boolean;
63
- native?: Boolean;
64
- title?: string;
65
- };
66
- };
67
-
68
- interface children {
69
- children?: VNodeData[]
70
- }
71
-
72
- export interface CreatorAttrs {
73
- col(props: typeof optionAttrs.col): this;
74
-
75
- wrap(props: typeof optionAttrs.wrap): this;
76
-
77
- title(props: string | typeof optionAttrs.title & children): this;
78
-
79
- info(props: string | typeof optionAttrs.info & children): this;
80
-
81
- className(prop: string): this;
82
-
83
- }
84
-
85
- export interface RuleAttrs {
86
- col?: typeof optionAttrs.col;
87
- wrap?: typeof optionAttrs.wrap;
88
- title?: string | typeof optionAttrs.title & children;
89
- info?: string | typeof optionAttrs.info & children;
90
- className?: string;
91
- }
92
-
93
- export interface ApiAttrs {
94
- btn: {
95
- loading(loading: boolean): void;
96
- disabled(disabled: boolean): void;
97
- show(show: boolean): void;
98
- }
99
- resetBtn: {
100
- loading(loading: boolean): void;
101
- disabled(disabled: boolean): void;
102
- show(show: boolean): void;
103
- }
104
-
105
- submit(success: (formData: FormData, $f: Api) => void, fail: ($f: Api) => void): void;
106
-
107
- clearValidateState(fields?: string | string[], clearSub?: Boolean): void;
108
-
109
- clearSubValidateState(fields?: string | string[]): void;
110
-
111
- validate(callback?: ValidateCallback): void;
112
-
113
- validateField(field: string, callback?: ValidateFieldCallback): void;
114
-
115
- submitBtnProps(props: Button): void;
116
-
117
- resetBtnProps(props: Button): void;
118
-
119
- }
package/types/index.d.ts DELETED
@@ -1,31 +0,0 @@
1
- import {
2
- FormCreate,
3
- FormRule as $FormRule,
4
- Options as $Options,
5
- Rule as $Rule,
6
- Creator as $Creator,
7
- Control as $Control,
8
- Api as $Api,
9
- Effect as $Effect,
10
- Parser as $Parser
11
- } from "@form-create/core";
12
- import Maker from "./maker";
13
- import {ApiAttrs, CreatorAttrs, OptionAttrs, RuleAttrs} from "./config";
14
-
15
- declare module 'vue/types/vue' {
16
- interface Vue {
17
- $formCreate: FormCreate<Maker, OptionAttrs, CreatorAttrs, RuleAttrs, ApiAttrs>;
18
- }
19
- }
20
-
21
- declare const formCreate: FormCreate<Maker, OptionAttrs, CreatorAttrs, RuleAttrs, ApiAttrs>;
22
- export default formCreate;
23
- export declare const maker: typeof formCreate.maker;
24
- export type FormRule = $FormRule<OptionAttrs, CreatorAttrs, RuleAttrs, ApiAttrs>
25
- export type Options = $Options<OptionAttrs, CreatorAttrs, RuleAttrs, ApiAttrs>
26
- export type Rule = $Rule<OptionAttrs, CreatorAttrs, RuleAttrs, ApiAttrs>
27
- export type Effect = $Effect<OptionAttrs, CreatorAttrs, RuleAttrs, ApiAttrs>
28
- export type Creator = $Creator<OptionAttrs, CreatorAttrs, RuleAttrs, ApiAttrs>
29
- export type Control = $Control<OptionAttrs, CreatorAttrs, RuleAttrs, ApiAttrs>
30
- export type Api = $Api<OptionAttrs, CreatorAttrs, RuleAttrs, ApiAttrs>
31
- export type Parser = $Parser
package/types/maker.d.ts DELETED
@@ -1,14 +0,0 @@
1
- import {CreatorHelper} from "@form-create/core";
2
- import {CreatorAttrs, OptionAttrs, RuleAttrs, ApiAttrs} from "./config";
3
-
4
- declare const makerFactory: CreatorHelper<OptionAttrs, CreatorAttrs, RuleAttrs, ApiAttrs>
5
-
6
- declare enum MakerName {
7
- "datePicker", "year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange", "hidden", "input", "password", "url", "email", "text", "textarea", "idate", "slider", "sliderRange", "timePicker", "time", "timeRange", "group", "tree", "switch", "upload", "autoComplete", "checkbox", "cascader", "colorPicker", "frame", "inputNumber", "radio", "rate", "select", "auto", "number", "color", "selectMultiple", "selectOne", "treeSelected", "treeChecked", "image", "file", "uploadFileOne", "uploadImageOne", "uploadImage", "uploadFile", "frameInputs", "frameFiles", "frameImages", "frameInputOne", "frameFileOne", "frameImageOne", "frameInput", "frameFile", "frameImage"
8
- }
9
-
10
- type Maker = {
11
- [name in keyof typeof MakerName]: typeof makerFactory;
12
- }
13
-
14
- export default Maker;