css - 使用 vue-material,如何在列表中使文本换行而不是溢出到省略号?

标签 css vue.js material-design vue-material

我有:

        <md-list-item>
          <md-icon v-bind:style="{color: transcript.color}">account_circle</md-icon>

          <div class="md-list-item-text">
            <p>{{ transcript.text }}</p>
          </div>

          <md-button class="md-icon-button md-list-action">
            <small>some stuff</small>
          </md-button>
        </md-list-item>

问题是 transcript.text 可能比一行还长,所以有一个 text-overflow: ellipsis 设置。我尝试添加 text-overflow:visible!important 作为作用域样式,但这似乎被忽略了。

vue-

那么我怎样才能让我的文本正常中断并扩展到多行呢?

最佳答案

.md-list-item-text p {
  white-space: normal;
  padding-bottom: 1rem;
}

就这样完成了!

关于css - 使用 vue-material,如何在列表中使文本换行而不是溢出到省略号?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58156051/

相关文章:

vue.js - 可重复使用的嵌套 VueJS 组件

css - AngularJS Material : no scrollbar in custom components

父 div 上的 CSS 转换导致绝对子 div 跳转?

html - 在移动设备上显示 block Div

javascript - CSS3 关键帧动画在 chrome 中工作,而不是 firefox

android TagHandler 和 CSS

javascript - 使用更改 Vue 3 Option api 将 Prop 的更改从父级传递给子级

javascript - v-cloak 的 Vue.js 生命周期钩子(Hook)

android - 在 “rippleColor”字段上, Material 设计支持库和gms:wallet库之间是否存在此冲突的解决方案?

android - 选项卡 fragment 内的 Cardview