随笔分类 - Ant-Design-Vue
ant-design
摘要:用两个button(添加,编辑)按钮展示同一个模态框,并不是什么大问题,问题在于解决这两个模态框得有自己的确定和取消方法 父页面完全接管子页面(利于子页面复用) 父页面代码: <template> <div> <-- 定义两个按钮,一个添加按钮, 一个编辑按钮 --> <a-button type=
阅读全文
摘要:1.创建form表单的两种方式,不同的方式在js中创建表单的方式也不同 方式1:一般使用在搜索表单中,只需要双向绑定数据即可,那就使用这种方法即可 <template> <a-form > <a-form-item label="Note" :label-col="{ span: 5 }" :wra
阅读全文
摘要:在用ant-design-vue的框架中,使用到了这种场景,就是点击编辑按钮,弹出modal模态框,渲染modal模态框中的form表单页面,并给表单赋值,但是在给表单赋值的时候,总是会报错。 错误提示: Warning: You cannot set a form field before ren
阅读全文
摘要:1. 如何自定义表格列头: <a-table :columns="columns" :dataSource="dataSource"> <span slot="customTitle"><a-icon type="smile-o"/>Name</span> </a-table> const colu
阅读全文