1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-08 18:30:53 +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>
<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 (
<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>

View File

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