1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-03-15 10:14:44 +08:00
2023-03-13 18:02:48 +08:00

35 lines
685 B
Vue

<template>
<el-tooltip placement="top-start">
<template #content>
<div class="info-break" :style="{ width: width + 'px' }">{{ info }}</div>
</template>
<div class="info-hidden" :style="{ width: width + 'px' }">{{ info }}</div>
</el-tooltip>
</template>
<script lang="ts" setup>
defineProps({
width: {
type: String,
default: '100',
},
info: {
type: String,
default: '',
},
});
</script>
<style scoped>
.info-hidden {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.info-break {
width: 100px;
word-break: break-all;
word-wrap: break-word;
}
</style>