mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-29 07:52:50 +00:00
fix: modify related problem tooltip bug(#18853)
This commit is contained in:
parent
4920e8787b
commit
91dac247c9
|
|
@ -1,15 +1,11 @@
|
|||
<template>
|
||||
<el-tag class="tag-ellipsis flex-between mb-8" effect="plain" v-bind="$attrs">
|
||||
<auto-tooltip :content="tooltipContent">
|
||||
<slot></slot>
|
||||
</auto-tooltip>
|
||||
<slot></slot>
|
||||
</el-tag>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, useSlots } from 'vue'
|
||||
defineOptions({ name: 'TagEllipsis' })
|
||||
const slots = useSlots()
|
||||
const tooltipContent = slots.default?.()?.[0].children || ''
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/* tag超出省略号 */
|
||||
|
|
@ -27,10 +23,5 @@ const tooltipContent = slots.default?.()?.[0].children || ''
|
|||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
// :deep(.el-tooltip__trigger) {
|
||||
// overflow: hidden;
|
||||
// white-space: nowrap;
|
||||
// text-overflow: ellipsis;
|
||||
// }
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,9 @@
|
|||
effect="plain"
|
||||
closable
|
||||
>
|
||||
{{ item.content }}
|
||||
<auto-tooltip :content="item.content">
|
||||
{{ item.content }}
|
||||
</auto-tooltip>
|
||||
</TagEllipsis>
|
||||
</template>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,9 @@
|
|||
effect="plain"
|
||||
closable
|
||||
>
|
||||
{{ item.content }}
|
||||
<auto-tooltip :content="item.content">
|
||||
{{ item.content }}
|
||||
</auto-tooltip>
|
||||
</TagEllipsis>
|
||||
</template>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue