leslie1943
大部分场景都是超过一行就显示...
<template>
  <div class="other-product-item item-name" :title="item.name">{{item.name}}</div>
  <div class="other-product-item item-name" :title="item.name">{{item.name}}</div>
<template>
<script>
  export default {
    return {
      item: {name:\'this is a very long name,this is a very long name,this is a very long name\'}
    }
  }
</script>
<style lang="scss">
  .other-product-item {
    text-overflow: -o-ellipsis-lastline;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .item-name {
    font-size: 14px;
  }
</style>

分类:

技术点:

相关文章:

  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
  • 2021-10-03
  • 2021-12-12
  • 2022-12-23
  • 2021-11-19
  • 2022-01-02
猜你喜欢
  • 2021-05-20
  • 2021-12-25
  • 2022-12-23
  • 2022-01-12
  • 2022-02-17
  • 2021-11-19
  • 2021-12-25
相关资源
相似解决方案