如圖顯示,-- 注釋與后面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刪除。