@faasjs/ant-design 0.0.2-beta.330 → 0.0.2-beta.331
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/index.d.ts +14 -4
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -15,15 +15,25 @@ declare type FaasItemProps = {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
declare type StringProps = {
|
|
18
|
-
type?: 'string'
|
|
18
|
+
type?: 'string';
|
|
19
19
|
input?: InputProps;
|
|
20
20
|
};
|
|
21
|
+
declare type StringListProps = {
|
|
22
|
+
type: 'string[]';
|
|
23
|
+
input?: InputProps;
|
|
24
|
+
maxCount?: number;
|
|
25
|
+
};
|
|
21
26
|
declare type NumberProps = {
|
|
22
|
-
type
|
|
27
|
+
type: 'number';
|
|
28
|
+
input?: InputNumberProps;
|
|
29
|
+
};
|
|
30
|
+
declare type NumberListProps = {
|
|
31
|
+
type: 'number[]';
|
|
23
32
|
input?: InputNumberProps;
|
|
33
|
+
maxCount?: number;
|
|
24
34
|
};
|
|
25
35
|
declare type BooleanProps = {
|
|
26
|
-
type
|
|
36
|
+
type: 'boolean';
|
|
27
37
|
input?: SwitchProps;
|
|
28
38
|
};
|
|
29
39
|
declare type OptionType<T = any> = {
|
|
@@ -37,7 +47,7 @@ declare type OptionsProps<T = any> = {
|
|
|
37
47
|
type?: 'string' | 'string[]' | 'number' | 'number[]';
|
|
38
48
|
input?: SelectProps<any>;
|
|
39
49
|
};
|
|
40
|
-
declare type FormItemInputProps<T = any> = StringProps | NumberProps | BooleanProps | OptionsProps<T>;
|
|
50
|
+
declare type FormItemInputProps<T = any> = StringProps | StringListProps | NumberProps | NumberListProps | BooleanProps | OptionsProps<T>;
|
|
41
51
|
declare type FormItemProps<T = any> = {
|
|
42
52
|
children?: JSX.Element;
|
|
43
53
|
rules?: RuleObject[];
|
package/dist/index.js
CHANGED
|
@@ -148,7 +148,7 @@ function FormItem(props) {
|
|
|
148
148
|
style: { float: "right" },
|
|
149
149
|
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.MinusCircleOutlined, null),
|
|
150
150
|
onClick: () => remove(field.name)
|
|
151
|
-
}))))), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, {
|
|
151
|
+
}))))), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, null, (!computedProps.maxCount || computedProps.maxCount > fields.length) && /* @__PURE__ */ import_react.default.createElement(import_antd.Button, {
|
|
152
152
|
type: "dashed",
|
|
153
153
|
block: true,
|
|
154
154
|
onClick: () => add(),
|
|
@@ -192,7 +192,7 @@ function FormItem(props) {
|
|
|
192
192
|
style: { float: "right" },
|
|
193
193
|
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.MinusCircleOutlined, null),
|
|
194
194
|
onClick: () => remove(field.name)
|
|
195
|
-
}))))), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, {
|
|
195
|
+
}))))), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, null, (!computedProps.maxCount || computedProps.maxCount > fields.length) && /* @__PURE__ */ import_react.default.createElement(import_antd.Button, {
|
|
196
196
|
type: "dashed",
|
|
197
197
|
block: true,
|
|
198
198
|
onClick: () => add(),
|
package/dist/index.mjs
CHANGED
|
@@ -131,7 +131,7 @@ function FormItem(props) {
|
|
|
131
131
|
style: { float: "right" },
|
|
132
132
|
icon: /* @__PURE__ */ React.createElement(MinusCircleOutlined, null),
|
|
133
133
|
onClick: () => remove(field.name)
|
|
134
|
-
}))))), /* @__PURE__ */ React.createElement(AntdForm.Item, null, /* @__PURE__ */ React.createElement(Button, {
|
|
134
|
+
}))))), /* @__PURE__ */ React.createElement(AntdForm.Item, null, (!computedProps.maxCount || computedProps.maxCount > fields.length) && /* @__PURE__ */ React.createElement(Button, {
|
|
135
135
|
type: "dashed",
|
|
136
136
|
block: true,
|
|
137
137
|
onClick: () => add(),
|
|
@@ -175,7 +175,7 @@ function FormItem(props) {
|
|
|
175
175
|
style: { float: "right" },
|
|
176
176
|
icon: /* @__PURE__ */ React.createElement(MinusCircleOutlined, null),
|
|
177
177
|
onClick: () => remove(field.name)
|
|
178
|
-
}))))), /* @__PURE__ */ React.createElement(AntdForm.Item, null, /* @__PURE__ */ React.createElement(Button, {
|
|
178
|
+
}))))), /* @__PURE__ */ React.createElement(AntdForm.Item, null, (!computedProps.maxCount || computedProps.maxCount > fields.length) && /* @__PURE__ */ React.createElement(Button, {
|
|
179
179
|
type: "dashed",
|
|
180
180
|
block: true,
|
|
181
181
|
onClick: () => add(),
|