vue element 字符串超过n长度剩余部分省略号显示

<el-table-column prop="name" label="科目" width="180">
  <template slot-scope="scope">
     <div :title="scope.row.name">{{scope.row.name.substring(0,8)}} <span v-if="scope.row.name.length > 8">......</span> </div>
  </template>
</el-table-column>

  

posted @ 2021-03-12 10:37  pumpkz  阅读(789)  评论(0)    收藏  举报