Merge pull request 'fix : 修改审批记录样式' (#208) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/208
This commit is contained in:
2024-05-19 07:27:32 +00:00
2 changed files with 12 additions and 2 deletions

View File

@@ -15,7 +15,7 @@
</div>
<div class="username" v-if="user.auditOpinion">
<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>

View File

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