d2-crud icon indicating copy to clipboard operation
d2-crud copied to clipboard

[FR]将主文件分离为单独组件

Open robin-dongbin opened this issue 6 years ago • 0 comments

例: d2-crud-table d2-crud-dialog d2-crud-pagination等,抽离后组件可单独引用,可一起引用(用d2-crud组件将这些子组件合并,通过传入的props来确定是否需要引入该组件)。 优点:

  1. 降低代码耦合
  2. 结构更加清晰
  3. 起到一定的优化作用
  4. *使用时更加灵活(例如某些不需要分页或者不需要新增的表格展示,独立调用分页器以实现自定义页面布局等)

抽离后header的slot视情况甚至都可以取消(没有仔细考虑这个)

robin-dongbin avatar Dec 29 '18 09:12 robin-dongbin