Happy-Coding-Clans / vue-easytable

A powerful data table based on vuejs. You can use it as data grid、Microsoft Excel or Google sheets. It supports virtual scroll、cell edit etc.
https://happy-coding-clans.github.io/vue-easytable/
MIT License
3.69k stars 738 forks source link

自定义单元格内容 #13

Closed SLRXXX closed 6 years ago

SLRXXX commented 6 years ago

调查了大部分vue、table相关的东西,但感觉都没有实现这个功能。 对于单元格内不是纯数据,而是想通过component或者template来渲染出比较复杂的东西,这种情况 如果能实现的话(类似slot之类的东西?),感觉会有一个明显的优势

huangshuwei commented 6 years ago

已经支持通过组件作为自定义单元格内容,只需要通过componentName传入组件名称即可 这是实例,看下是你想要的吗 http://doc.huangsw.com/vue-easytable/app.html#/table?anchor=table-custom-columns

SLRXXX commented 6 years ago

@huangshuwei 厉害了,正是我想要的功能

huangshuwei commented 6 years ago

@SLRXXX 不过这种方式也有局限性的,参见这个issue #7 后面准备找一个更好的方案。