首页 > 解决方案 > 如何在 td 中为 ::before 设置 pReorderableRowHandle?

问题描述

我看到 PrimeNG 在他们的示例中为 span 标签设置了 pReorderableRowHandle。但是,当我将它们悬停时,我需要在行的左侧显示一个句柄,然后使用它来重新排序行。我使用 ::before 作为行的第一个 td 标记来显示句柄,但我被困在这里,我无法为 ::before 设置 pReorderableRowHandle。

 tr td:first-child::before {
   content: '';
   background: #999;
   position: absolute;
   display: none;
 }
 tr:hover td:first-child::before {
   display: block;
 }

截图:https ://i.stack.imgur.com/f98qP.png

标签: angularprimeng

解决方案


推荐阅读