1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 10:50:24 +00:00

adjust tag z-index

This commit is contained in:
shanshuirenjia
2018-12-17 17:44:59 +08:00
parent ce2ac1ecba
commit 0b9e5d3a1b
2 changed files with 8 additions and 7 deletions

View File

@@ -401,9 +401,10 @@ class DirentListItem extends React.Component {
</td> </td>
<td> <td>
<div className="dirent-item tag-list tag-list-stacked "> <div className="dirent-item tag-list tag-list-stacked ">
{ dirent.type !== 'dir' && dirent.file_tags.map((fileTag) => { { dirent.type !== 'dir' && dirent.file_tags.map((fileTag, index) => {
let length = dirent.file_tags.length;
return ( return (
<span className={`file-tag bg-${fileTag.color}`} key={fileTag.id} title={fileTag.name}></span> <span className={`file-tag bg-${fileTag.color}`} key={fileTag.id} title={fileTag.name} style={{zIndex: length - index }}></span>
); );
})} })}
</div> </div>

View File

@@ -998,20 +998,20 @@ table .menu-toggle {
/* begin file-tag */ /* begin file-tag */
.tag-list { .tag-list {
position: relative; position: relative;
justify-content: flex-end;
} }
.tag-list .file-tag { .tag-list .file-tag {
margin-left: 0.25rem;
cursor: pointer; cursor: pointer;
} }
.tag-list .file-tag:first-child { .tag-list .file-tag:last-child {
margin-left: 0; margin-right: 0;
} }
.tag-list-stacked .file-tag{ .tag-list-stacked .file-tag{
margin-left: -0.35rem; margin-right: -0.3rem;
box-shadow: 0 0 0 2px #fff; box-shadow: 0 0 0 0.125rem #fff;
cursor: pointer; cursor: pointer;
} }