Skip to content

Commit

Permalink
Merge pull request #4 from kne-union/linzp
Browse files Browse the repository at this point in the history
发布正式版
  • Loading branch information
zhipenglin authored Nov 12, 2024
2 parents 17bd156 + aed3203 commit 0903895
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const BaseExample = () => {
list={[<Input name="field_1" label="字段1" rule="REQ"/>,
<Input name="field_2" label="字段2" rule="REQ"/>,
<Input name="description" label="描述" block/>]}/>
<Flex justify="center">
<Flex justify="center" gap={8}>
<SubmitButton>提交</SubmitButton>
<ResetButton>重置</ResetButton>
</Flex>
Expand Down
2 changes: 1 addition & 1 deletion doc/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const BaseExample = () => {
list={[<Input name="field_1" label="字段1" rule="REQ"/>,
<Input name="field_2" label="字段2" rule="REQ"/>,
<Input name="description" label="描述" block/>]}/>
<Flex justify="center">
<Flex justify="center" gap={8}>
<SubmitButton>提交</SubmitButton>
<ResetButton>重置</ResetButton>
</Flex>
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kne/form-info",
"version": "0.1.0-alpha.2",
"version": "0.1.0",
"description": "构建一个更加美观的form表单组件",
"syntax": {
"esmodules": true
Expand Down Expand Up @@ -76,7 +76,7 @@
},
"devDependencies": {
"@kne/microbundle": "^0.15.5",
"@kne/modules-dev": "^2.0.14",
"@kne/modules-dev": "^2.1.2",
"cross-env": "^7.0.3",
"husky": "^9.0.11",
"npm-run-all": "^4.1.5",
Expand All @@ -89,8 +89,8 @@
"@kne/flex-box": "^0.1.1",
"@kne/global-context": "^1.1.1",
"@kne/info-page": "^0.1.11",
"@kne/react-form-antd": "^4.0.0",
"@kne/react-form-plus": "^0.1.0-alpha.6",
"@kne/react-form-antd": "^4.0.1",
"@kne/react-form-plus": "^0.1.0",
"@kne/use-control-value": "^0.1.8"
}
}
5 changes: 4 additions & 1 deletion src/FormSteps.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ const FormSteps = p => {

const isLastStep = currentStep === stepProps.items.length - 1;

const currentFormProps = Object.assign({}, stepProps.items[currentStep]?.formProps);
const currentFormProps = Object.assign({}, stepProps.items[currentStep]?.formProps, {
data: Object.assign({}, stepProps.items[currentStep]?.formProps?.data, stepCacheRef.current[currentStep]?.formData)
});
const inner = (
<Flex className={className} vertical={stepProps.direction !== 'vertical'} gap={24}>
<Steps {...omit(stepProps, ['current', 'defaultCurrent', 'onChange'])} className={classnames(stepsClassName, style['steps'])} items={stepProps.items.map(item => omit(item, ['formProps']))} current={currentStep} />
Expand Down Expand Up @@ -65,6 +67,7 @@ const FormSteps = p => {
return res;
}
})}
key={currentStep}
>
{typeof children === 'function'
? children({
Expand Down

0 comments on commit 0903895

Please sign in to comment.