ant design初嘗試遇到的問題---table插槽以及title不識別<br/>的問題

       <template
            slot="reason"
            slot-scope="text"
          >
            <div class="reasonText"
                 :title="(text+'').replace(/<br \/>/g, '\r\n')"    // title只識別\r\n換行
                 v-html="text"
            />
          </template>

  

// 表格的Columns

{ title: '原因', dataIndex: 'reason', ellipsis: true, scopedSlots: { customRender: 'reason' }, width: '500px' }

  

// 超過4行顯示省略號
.reasonText{ overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }

  

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章