Avue-crud table component column text is too long to omit and display the specified number of rows

If you simply want to omit the content, you can set option.column.xxx.overHidden to true.

Add a slot to the column as true, and then use the TextEllipsis component when customizing the column:

<avue-crud ref="crud"
           ……>
  <!-- 看这 -->
  <template slot="introduction" slot-scope="scope">
    <avue-text-ellipsis :text="scope.row.introduction" :height="100">
      <small slot="more">...</small>
    </avue-text-ellipsis>
  </template>
</avue-crud>

<script>
……
option:{
      
      
  column:[
	 ……,
     {
      
      
      label: '简介',
      prop: 'introduction',
      // 看这
      slot: true
    },
    ……
  ]
},
……
</script>

reference

Guess you like

Origin blog.csdn.net/duanluan/article/details/119988205
Recommended