文档里 form 表单的 labelCol 属性只写了 {span: 3, offset: 12} 的用法,和参考 Grid Col 的属性参数,并没有说可以设置 style 属性和用法。

其实可以这么设置:

:labelCol="{ style: 'width: 100px' }"

  

这是在/form/FormItem.jsx 源码里找到了 labelCol 属性的接收参数,才知道正确用法。

const {
class: labelColClass,
style: labelColStyle,
id: labelColId,
on,
...restProps
} = mergedLabelCol;

感谢@github vhkdiy

原文:https://github.com/vueComponent/ant-design-vue/issues/3042

相关文章:

  • 2022-12-23
  • 2021-10-01
  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
  • 2022-12-23
猜你喜欢
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案