pref: 优化排序显示

This commit is contained in:
xiaozzzi 2024-04-07 16:12:15 +08:00
parent 5b55cb5c59
commit 68fbccdf20
4 changed files with 4 additions and 4 deletions

View File

@ -66,9 +66,9 @@
@nodeCollapse="handleNodeCollapse" @nodeCollapse="handleNodeCollapse"
@nodeDrop="handleDrop"> @nodeDrop="handleDrop">
<template #default="{ node, data }"> <template #default="{ node, data }">
<div v-if="isShowSort" class="sort-tag" :style="{ backgroundColor: getColor(node) }">{{ data.s }}</div>
<div class="menu-item-wrapper" :id="'article-doc-wrapper-' + data.i" @click.right="handleClickRightMenu($event, data)"> <div class="menu-item-wrapper" :id="'article-doc-wrapper-' + data.i" @click.right="handleClickRightMenu($event, data)">
<div :class="[viewStyle.isShowSubjectStyle ? (data.t?.includes('subject') ? 'subject-title' : 'doc-title') : 'doc-title']"> <div :class="[viewStyle.isShowSubjectStyle ? (data.t?.includes('subject') ? 'subject-title' : 'doc-title') : 'doc-title']">
<div v-if="isShowSort" class="sort-tag" :style="{ backgroundColor: getColor(node) }">{{ data.s }}</div>
<div class="doc-name"> <div class="doc-name">
<img class="menu-icon-img" v-if="isShowImg(data, viewStyle)" :src="data.icon" /> <img class="menu-icon-img" v-if="isShowImg(data, viewStyle)" :src="data.icon" />
<svg v-else-if="isShowSvg(data, viewStyle)" class="icon menu-icon" aria-hidden="true"> <svg v-else-if="isShowSvg(data, viewStyle)" class="icon menu-icon" aria-hidden="true">

View File

@ -3,7 +3,6 @@ $icon-size: 17px;
.doc-title { .doc-title {
@include flex(row, flex-start, flex-start); @include flex(row, flex-start, flex-start);
width: 100%; width: 100%;
position: relative;
padding: 1px 0; padding: 1px 0;
.doc-name { .doc-name {
@ -73,9 +72,9 @@ $icon-size: 17px;
.sort-tag { .sort-tag {
font-size: 12px; font-size: 12px;
color: #fff; color: #fff;
border-radius: 4px;
padding: 0 2px; padding: 0 2px;
margin-top: 3px; margin-top: 3px;
border-radius: 4px;
position: absolute; position: absolute;
right: 3px; right: 3px;
top: 2px; top: 2px;

View File

@ -155,6 +155,7 @@
:deep(.el-tree-node__content) { :deep(.el-tree-node__content) {
height: auto; height: auto;
position: relative;
&:hover { &:hover {
border-radius: 5px; border-radius: 5px;

View File

@ -58,10 +58,10 @@
@nodeCollapse="handleNodeCollapse" @nodeCollapse="handleNodeCollapse"
@nodeDrop="handleDrop"> @nodeDrop="handleDrop">
<template #default="{ node, data }"> <template #default="{ node, data }">
<div v-if="data.ty !== 11 && isShowSort" class="sort-tag" :style="{ backgroundColor: getColor(node) }">{{ data.s }}</div>
<div v-if="data.ty === 11" class="menu-divider"></div> <div v-if="data.ty === 11" class="menu-divider"></div>
<div v-else class="menu-item-wrapper" @click.right="handleClickRightMenu($event, data)"> <div v-else class="menu-item-wrapper" @click.right="handleClickRightMenu($event, data)">
<div class="doc-title"> <div class="doc-title">
<div v-if="isShowSort" class="sort-tag" :style="{ backgroundColor: getColor(node) }">{{ data.s }}</div>
<div class="doc-name"> <div class="doc-name">
<img class="menu-icon-img" v-if="isShowImg(data, viewStyle)" :src="data.icon" /> <img class="menu-icon-img" v-if="isShowImg(data, viewStyle)" :src="data.icon" />
<svg v-else-if="isShowSvg(data, viewStyle)" class="icon menu-icon" aria-hidden="true"> <svg v-else-if="isShowSvg(data, viewStyle)" class="icon menu-icon" aria-hidden="true">