element-ui 字段过长悬浮显示
<template slot-scope="scope">
<el-popover
placement="top-start"
width="300"
trigger="hover"
:disabled="scope.row.unit_name.length <= 4"
>
<div>{{ scope.row.unit_name }}</div>
<span slot="reference" v-if="scope.row.unit_name.length <= 4">{{scope.row.unit_name}}</span>
<span slot="reference" v-if="scope.row.unit_name.length > 4">{{scope.row.unit_name.substr(0, 4) + "..."}}</span>
</el-popover>
</template>