输出自动换行

This commit is contained in:
fofolee 2022-04-19 15:13:34 +08:00
parent 724e969f07
commit 9d21495faa

View File

@ -16,11 +16,14 @@
> >
</q-toolbar> </q-toolbar>
<q-card-section class="row items-center"> <q-card-section class="row items-center">
<div <pre
style="white-space: pre"
:class="runResultStatus ? '' : 'text-red'" :class="runResultStatus ? '' : 'text-red'"
v-html="runResult" v-html="runResult"
></div> :style="{
whiteSpace: 'pre-wrap',
wordWrap: 'break-word',
}"
></pre>
</q-card-section> </q-card-section>
<q-card-actions align="right"> <q-card-actions align="right">
<q-btn flat label="关闭" color="primary" v-close-popup /> <q-btn flat label="关闭" color="primary" v-close-popup />
@ -29,15 +32,18 @@
</q-dialog> </q-dialog>
</div> </div>
<div v-else> <div v-else>
<div <pre
v-show="!!runResult" v-show="!!runResult"
:class="{ :class="{
'text-red': !runResultStatus, 'text-red': !runResultStatus,
'q-pa-md': 1, 'q-pa-md': 1,
}" }"
style="white-space: pre" :style="{
whiteSpace: 'pre-wrap',
wordWrap: 'break-word',
}"
v-html="runResult" v-html="runResult"
></div> ></pre>
</div> </div>
</div> </div>
</template> </template>