perf: add line break to command display

This commit is contained in:
Lykin 2023-12-14 10:47:10 +08:00
parent c7a365e8e9
commit 566a7e212f
3 changed files with 10 additions and 4 deletions

View File

@ -76,10 +76,10 @@ const columns = computed(() => [
return h( return h(
'div', 'div',
null, null,
map(cmdList, (c) => h('div', null, c)), map(cmdList, (c) => h('div', { class: 'cmd-line' }, c)),
) )
} }
return cmd return h('div', { class: 'cmd-line' }, cmd)
}, },
}, },
{ {

View File

@ -89,10 +89,10 @@ const columns = computed(() => [
return h( return h(
'div', 'div',
null, null,
map(cmdList, (c) => h('div', null, c)), map(cmdList, (c) => h('div', { class: 'cmd-line' }, c)),
) )
} }
return cmd return h('div', { class: 'cmd-line' }, cmd)
}, },
}, },
{ {

View File

@ -15,3 +15,9 @@
.tab-content { .tab-content {
} }
:deep(.cmd-line) {
word-wrap: break-word;
white-space: pre-wrap;
word-break: break-all;
}