feat(edit-table): formatter 支持返回 jsx 和 自定义组件#40
Merged
lianghx-319 merged 9 commits intoFEMessage:devfrom Feb 21, 2020
Merged
Conversation
|
Deploy preview for femessage-element ready! Built with commit 5fbc557 |
|
Deploy preview for femessage-element ready! Built with commit b844fe9 |
lianghx-319
reviewed
Feb 19, 2020
Comment on lines
69
to
71
| let Component = { | ||
| render: h => h('p', null, Content) | ||
| }; |
Member
There was a problem hiding this comment.
给这个默认的 content 加一个 class name 吧,方便以后满足样式
Author
There was a problem hiding this comment.
表格嵌套蛮深的呀, 要是有定制需求的话 JSX 或者自定义组件好啦!!!
snowlocked
reviewed
Feb 20, 2020
There was a problem hiding this comment.
这个Content有必要传入formatter函数吗?
如果有必要,index和Content都是不常用的参数,顺序应该如何摆放
Author
There was a problem hiding this comment.
有必要呀, 恰好有场景用上了
这里应该改个名字, Content => cellValue(格数据)
参考 table-column 本身的 formatter, 最理想的顺序应该是 行数据, 格数据, index
没有调整顺序是由于避免出现破坏的更新嘛.
d5f1787 to
bdabb98
Compare
lianghx-319
approved these changes
Feb 21, 2020
snowlocked
approved these changes
Feb 21, 2020
lianghx-319
pushed a commit
that referenced
this pull request
Feb 24, 2020
* chore(deps): 更新 node-sass node v12 竟然不能运行, 需要降级到 v11 * feat(edit-table): formatter 支持返回 jsx 和自定义显示组件 * style: lint * feat(edit-table): 单元格数据 * docs(edit-table): 改善 edit-table formatter 文档 * refactor(edit-table): 更改为更明确的常量名 * improvement(edit-table): 更名, 调整 formatter 顺序 * docs(edit-table): 调整文档 * docs(edit-table): 使用 cellValue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please make sure these boxes are checked before submitting your PR, thank you!
devbranch.Why
close #38
Features
How
formatter被限制在P元素内formatter返回结果, 判断且处理后, 再整合一个用于展示内容的组件Others
node-sass 无法在 node v12.14.x 中运行, 大概说是 OSX 环境不支持, 降到 v11 就好
有反馈说 v12.12.0 还可以