naive-ui icon indicating copy to clipboard operation
naive-ui copied to clipboard

能否考虑调整下data-table的表头dom嵌套层级?

Open angeltxwh opened this issue 2 years ago • 1 comments

This function solves the problem (这个功能解决的问题)

情况是这样的,我有一个特别特别多字段的表格(使用NDataTable组件完成),这导致水平方向上的空间变得格外宝贵 当我开启了data-table组件中列的sort功能以后,会有一个小按钮出现在列标题后面 我尝试将这个小箭头使用CSS移动到列标题下方,但是因为标题的text-align属性可能是left/center/right中的其一,所以我如果使用绝对定位修改箭头位置的话,无法精确知道标题在哪个方向,从而可能导致箭头和标题分离

所以问题就是,能不能考虑将n-data-table-sorter这个div套入n-ellipsis内部,这样我就可以以n-ellipsis(标题文本div)作为relative去设置箭头的位置了

Expected API (期望的 API)

none

angeltxwh avatar Sep 12 '22 22:09 angeltxwh

ellipsis 依赖于浏览器的 CSS ellipsis,所以把箭头放进去是会有 bug 出现的

07akioni avatar Sep 14 '22 15:09 07akioni

This issue does not have any recent activity. If you are still experiencing similar problems, open a new error, including a minimal copy of the problem

jahnli avatar Mar 12 '24 13:03 jahnli