如图显示,-- 注释与后面SQL语句之间有\n\r ,如何在页面上最终显示换行,只需要如下代码:
<template slot-scope="{row}" slot="sqlText"> <p v-html="row.sqlText" style="white-space: pre-line;"></p> </template>
style="white-space: pre-line;" 这个样式很重要
如图显示,-- 注释与后面SQL语句之间有\n\r ,如何在页面上最终显示换行,只需要如下代码:
<template slot-scope="{row}" slot="sqlText"> <p v-html="row.sqlText" style="white-space: pre-line;"></p> </template>
style="white-space: pre-line;" 这个样式很重要
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。