@kne/form-info 0.1.0-alpha.2 → 0.1.0
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/README.md +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +8 -4
- package/dist/index.modern.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ const BaseExample = () => {
|
|
|
46
46
|
list={[<Input name="field_1" label="字段1" rule="REQ"/>,
|
|
47
47
|
<Input name="field_2" label="字段2" rule="REQ"/>,
|
|
48
48
|
<Input name="description" label="描述" block/>]}/>
|
|
49
|
-
<Flex justify="center">
|
|
49
|
+
<Flex justify="center" gap={8}>
|
|
50
50
|
<SubmitButton>提交</SubmitButton>
|
|
51
51
|
<ResetButton>重置</ResetButton>
|
|
52
52
|
</Flex>
|
package/dist/index.js
CHANGED
|
@@ -3794,7 +3794,9 @@ const FormSteps = p => {
|
|
|
3794
3794
|
});
|
|
3795
3795
|
const stepCacheRef = React.useRef([]);
|
|
3796
3796
|
const isLastStep = currentStep === stepProps.items.length - 1;
|
|
3797
|
-
const currentFormProps = Object.assign({}, stepProps.items[currentStep]?.formProps
|
|
3797
|
+
const currentFormProps = Object.assign({}, stepProps.items[currentStep]?.formProps, {
|
|
3798
|
+
data: Object.assign({}, stepProps.items[currentStep]?.formProps?.data, stepCacheRef.current[currentStep]?.formData)
|
|
3799
|
+
});
|
|
3798
3800
|
const inner = /*#__PURE__*/React__default["default"].createElement(antd.Flex, {
|
|
3799
3801
|
className: className,
|
|
3800
3802
|
vertical: stepProps.direction !== 'vertical',
|
|
@@ -3806,7 +3808,7 @@ const FormSteps = p => {
|
|
|
3806
3808
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3807
3809
|
className: style['steps-form-inner']
|
|
3808
3810
|
}, stepProps.items[currentStep]?.children));
|
|
3809
|
-
return /*#__PURE__*/React__default["default"].createElement(Form, Object.assign({}, currentFormProps, {
|
|
3811
|
+
return /*#__PURE__*/React__default["default"].createElement(Form, _extends({}, Object.assign({}, currentFormProps, {
|
|
3810
3812
|
onSubmit: function (data) {
|
|
3811
3813
|
try {
|
|
3812
3814
|
const _arguments = arguments;
|
|
@@ -3835,6 +3837,8 @@ const FormSteps = p => {
|
|
|
3835
3837
|
return Promise.reject(e);
|
|
3836
3838
|
}
|
|
3837
3839
|
}
|
|
3840
|
+
}), {
|
|
3841
|
+
key: currentStep
|
|
3838
3842
|
}), typeof children === 'function' ? children({
|
|
3839
3843
|
children: inner,
|
|
3840
3844
|
isLastStep,
|