Antd Vue组件样式修改 百分百有效
a-modal组件
<a-modal :visible="true" title="aa" okText="同意" wrapClassName="aa" cancelText="tuichu" @ok="()=>{}">
<a href="#">全部订单</a>
</a-modal>
-
先在组件上添加wrapClassName=“aa”,一定要有
-
less 样式编写 ,不要写scoped,否则header和footer不生效
.aa{ div[role='document']{ .ant-modal-header { border-bottom: 0; } } }
其余的antd组件可以看dom里的antd-conteent 附近的div的role属性的,一般都为document ,然后复制当前role的值,同上编写