kingdee / kdesign

An enterprise-class React UI components library
https://react.kingdee.design/
Apache License 2.0
107 stars 45 forks source link

[form] wrapperWidth api失效 #888

Closed albyben closed 1 month ago

albyben commented 1 month ago

重现链接或代码

import React from 'react'
import ReactDOM from 'react-dom'
import { Button, Form, Input } from '@kdcloudjs/kdesign'
const Demo = () => {
  const onChange = (e) => {
    console.log('input', e.target.value)
  }
  return (
    <div className="demo">
      <Form
        wrapperWidth={200}
        layout="vertical"
        labelWidth={100}
        onValuesChange={(changedValue, values) => {
          console.log('form', changedValue, values)
        }}
        onFinish={(val) => console.log('submit', val)}>
        <Form.Item label="用户名" name="username" required validateTrigger="onBlur">
          <Input onChange={onChange} />
        </Form.Item>
        <Form.Item label="密码" name="password" required>
          <Input type="password" />
        </Form.Item>
        <Button htmlType="submit">提交</Button>
        <Button
          htmlType="reset"
          style={{
            marginLeft: 10
          }}>
          重置
        </Button>
      </Form>
    </div>
  )
}
ReactDOM.render(<Demo />, mountNode)

重现问题步骤

设置了wrapperWidth没有生效,另外文档中的api写错了 写成了wrappedWidth

期望的结果是什么

实际的结果是什么

组件库版本号、浏览器信息

组件库与浏览器均为最新版本