We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当布局为 labelPosition='left'的时候,不是所有字段都是必填的。本身在移动端空间有限,大多时候大家都是左布局。现在的节点就面临这个情况如果不required 那么将导致布局难看,如下图所示。 虽然我可以自己处理。但还是希望能更改下展示方式。
labelPosition='left'
import * as React from 'react'; import { Text } from '@tarojs/components'; import { Form, Input } from '@nutui/nutui-react-taro'; import { InputFormItemProps } from './types'; const InputFormItem: React.FC<InputFormItemProps> = (props) => { const { required, label, name, placeholder } = props; return ( <Form.Item required={required} name={name} label={required ? label : <><Text style={{ display: 'inline-block', width: 11 }} />{label}</>} > <Input placeholder={placeholder ? placeholder : `请选择${label}`} type='text' /> </Form.Item> ); }; export default InputFormItem;
期望把组件的 * 号label改成 position: absolute; label 本体用padding把文字顶走留出*的占位。这样无论我表单是不是强制的都没关系,它这样不会影响我们页面布局和美观。期望能修改实现。
The text was updated successfully, but these errors were encountered:
还没碰到过右布局,感觉starPosition多余
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
这个功能解决了什么问题?
当布局为
![image](https://private-user-images.githubusercontent.com/12706830/266308455-7fca317a-60f8-422e-aee9-1ba0e63af8ae.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NzkxOTcsIm5iZiI6MTczOTU3ODg5NywicGF0aCI6Ii8xMjcwNjgzMC8yNjYzMDg0NTUtN2ZjYTMxN2EtNjBmOC00MjJlLWFlZTktMWJhMGU2M2FmOGFlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAwMjEzN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUwYWRlM2ViNDMyMWUwNjAxMjYxMDU5ZTkwNTZiMjg5MDM1NzNmYTQzNDBkNzU0NjllOThiNTY4ZWMwZDcyODgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.e9FjFIV6s8VHLisliz-XkvfItd56URo-plGAKbX9V8A)
labelPosition='left'
的时候,不是所有字段都是必填的。本身在移动端空间有限,大多时候大家都是左布局。现在的节点就面临这个情况如果不required 那么将导致布局难看,如下图所示。虽然我可以自己处理。但还是希望能更改下展示方式。
你期望的组件设计是怎样的?
期望把组件的 * 号label改成 position: absolute; label 本体用padding把文字顶走留出*的占位。这样无论我表单是不是强制的都没关系,它这样不会影响我们页面布局和美观。期望能修改实现。
The text was updated successfully, but these errors were encountered: