fix : 修改审批记录样式

This commit is contained in:
2024-05-19 15:27:22 +08:00
parent 190a1d6477
commit 3bd6df74cc
2 changed files with 12 additions and 2 deletions

View File

@@ -15,7 +15,7 @@
</div> </div>
<div class="username" v-if="user.auditOpinion"> <div class="username" v-if="user.auditOpinion">
<div style="margin-bottom: 10px;color: #909399">{{user.operationTime}}</div> <div style="margin-bottom: 10px;color: #909399">{{user.operationTime}}</div>
<Tooltip :content="user.auditOpinion" placement="bottom-start" width="150"/> <Tooltip :content="user.auditOpinion" placement="bottom-start" width="150" :lines="true"/>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -5,7 +5,7 @@
placement="bottom-start" placement="bottom-start"
:disabled="isShow" :disabled="isShow"
> >
<div class="content" :style="{width: props.width+'px'}" @mouseover="isShowTooltip"> <div :class="lines?'content-lines':'content'" :style="{width: props.width+'px'}" @mouseover="isShowTooltip">
<span ref="contentRef"> <span ref="contentRef">
<slot name="content">{{ props.content }}</slot> <slot name="content">{{ props.content }}</slot>
</span> </span>
@@ -20,6 +20,9 @@ const props = defineProps({
}, width: { }, width: {
type: String, type: String,
default: '' default: ''
}, lines: {
type: Boolean,
default: false
} }
}) })
const contentRef = ref() const contentRef = ref()
@@ -36,4 +39,11 @@ const isShowTooltip = () => {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
} }
.content-lines{
overflow:hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
}
</style> </style>