drdevelop / antd-pro

antd pro components
15 stars 3 forks source link

Input 中文输入法异常 #57

Open wulucxy opened 11 months ago

wulucxy commented 11 months ago

虽然是 antd 的bug,还是希望能够处理一下

https://github.com/ant-design/ant-design/issues/41922

另外建议把文档链接放到 readme 里面,找官网好难

wulucxy commented 11 months ago

https://drdevelop.github.io/antd-pro/index.html#/schema-form/register-components#%E5%85%A8%E5%B1%80%E6%B3%A8%E5%86%8C%E7%BB%84%E4%BB%B6

全局注册没看懂,是需要对 schemaForm 进行二次封装么

drdevelop commented 11 months ago

虽然是 antd 的bug,还是希望能够处理一下

ant-design/ant-design#41922

另外建议把文档链接放到 readme 里面,找官网好难

谢谢建议,我处理下readme。antd的bug我这边看看能否处理

drdevelop commented 11 months ago

https://drdevelop.github.io/antd-pro/index.html#/schema-form/register-components#%E5%85%A8%E5%B1%80%E6%B3%A8%E5%86%8C%E7%BB%84%E4%BB%B6

全局注册没看懂,是需要对 schemaForm 进行二次封装么

@wulucxy 其实就是对schema的type做扩展,内置了input那些组件,而业务通用的组件可以通过该方式扩展,共享给其他业务场景复用

drdevelop commented 11 months ago

https://drdevelop.github.io/antd-pro/index.html#/schema-form/register-components#%E5%85%A8%E5%B1%80%E6%B3%A8%E5%86%8C%E7%BB%84%E4%BB%B6

全局注册没看懂,是需要对 schemaForm 进行二次封装么

不用二次封装的,调暴露的api会自动注册到内部的组件池子中去,表单引擎会自动把用户注册的组件和内部已有的组件合并,通过type供用户使用

drdevelop commented 11 months ago

虽然是 antd 的bug,还是希望能够处理一下

ant-design/ant-design#41922

另外建议把文档链接放到 readme 里面,找官网好难

@wulucxy antd这个bug我这可以hoc一下解决,那个issue里提供的复现代码我这边在火狐浏览器确实发现了,但SchemaForm表单里用input我这倒没复现该现象,能帮忙提供下最小复现demo吗?

drdevelop commented 11 months ago

这是我这边尝试复现的代码: (未复现) import React from 'react'; import SchemaForm, { Schema } from 'antd-pro-schema-form';

export default () => { const [values, setValues] = React.useState({});

const schema: Schema = [{ fieldName: 'title', label: 'title', type: 'input', placeholder: 'please input', rules: [{ required: true, message: 'Please input title' }], }];

return ( <> {JSON.stringify(values)} <SchemaForm onValuesChange={(changedValues, allValues) => { setValues(allValues); }} schema={schema} /> </> ) }

drdevelop commented 11 months ago

虽然是 antd 的bug,还是希望能够处理一下

ant-design/ant-design#41922

另外建议把文档链接放到 readme 里面,找官网好难

@wulucxy 文档链接已补充到readme