有没有办法在用户页面中移除列?

好的,我们开始。如果 Discourse 更改其用户目录结构,这段代码可能会失效,但在缺乏能唯一标识表格各元素的方法的情况下,这已是我能做到的最佳方案。请将此代码放入自定义主题组件的 CSS 部分。

div.users-directory table th:nth-child(2), 
div.users-directory table th:nth-child(3), 
div.users-directory table th:nth-child(8), 
div.users-directory table td:nth-child(2), 
div.users-directory table td:nth-child(3), 
div.users-directory table td:nth-child(8) {
    display:none;
}

我感觉这段代码还有优化空间,但目前它似乎能正常工作,并且看起来不会破坏其他表格。

1 个赞