如何设置边框半径蚂蚁设计

时间:2020-03-31 17:24:16

标签: reactjs ant-design-pro

我正在使用蚂蚁设计,无法弄清楚如何更改登录表单的用户名和密码框的边框半径。

此处是有关登录表单的链接。 https://codesandbox.io/s/rx2qf

2 个答案:

答案 0 :(得分:1)

borderRadius 设置为内联样式会起作用

style={{borderRadius: '10px'}}
<Input
  prefix={<LockOutlined className="site-form-item-icon" />}
  type="password"
  placeholder="Password"
  style={{borderRadius: '10px'}}
/>

enter image description here

答案 1 :(得分:1)

在他们的文档中检查 https://ant.design/docs/react/customize-theme#Ant-Design-Less-variables

如果使用较少,可以设置 @ border-radius-base

如果不只是自己在css文件中设置

.ant-input-affix-wrapper {
   border-radius: 5px;   // or other value
}