0
点赞
收藏
分享

微信扫一扫

Vue实现字符串换行

今天在做的时候需要用到字符串换行,在网上找了一下,换行是通过添加white-space: pre-wrap属性,通过\n进行换行 在这里记录一下

<style lang="scss" scoped>
  ::v-deep .el-table th.el-table__cell > .cell{
    white-space: pre-wrap;
    font-size: 12px;
  }
</style>

使用的时候直接\n就可以换行了

举报

相关推荐

0 条评论