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