el-input文本域输入换行在el-table中显示成空格

56 阅读1分钟

输入:

image.png

显示效果:

image.png

解决方案:

<el-table-column prop="des" label="描述" width="300">
  <template slot-scope="scope">
    <span style="white-space: pre-wrap" v-html="scope.row.des"></span>
  </template>
</el-table-column>