Closed donaldshen closed 4 years ago
fix #283
原有的 showRow 方法是用来展现一个 toggle 的动画的;现在的处理是合并该逻辑与用户通过 tableAttrs 传进来的逻辑
https://deploy-preview-284--el-data-table.netlify.com/#/Demo/is-tree?q=size~999,page~1,
// is-tree.md export default { data: function() { return { isTree: true, tableAttrs: { rowClassName({rowIndex}) { return rowIndex === 2 ? 'is-tree-red' : '' } }, } }, created() { // FYI: styleguide 里面用不了 style block document.querySelector('style').sheet.insertRule('.is-tree-red {color: red}') } }
Deploy preview for el-data-table ready!
Built with commit ded4825b803ae7c3812f434ea7b1dd16b88c6800
https://deploy-preview-284--el-data-table.netlify.com
Why
fix #283
How
原有的 showRow 方法是用来展现一个 toggle 的动画的;现在的处理是合并该逻辑与用户通过 tableAttrs 传进来的逻辑
Test
https://deploy-preview-284--el-data-table.netlify.com/#/Demo/is-tree?q=size~999,page~1,
Before
After