mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-04 21:37:11 -04:00
feat(TextAreaCopyable): word wrap
This commit is contained in:
parent
f2de87e9d3
commit
49f4c881ea
1 changed files with 2 additions and 1 deletions
|
@ -22,6 +22,7 @@ const props = withDefaults(
|
||||||
language?: string
|
language?: string
|
||||||
copyPlacement?: 'top-right' | 'bottom-right' | 'outside' | 'none'
|
copyPlacement?: 'top-right' | 'bottom-right' | 'outside' | 'none'
|
||||||
copyMessage?: string
|
copyMessage?: string
|
||||||
|
wordWrap?: boolean
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
followHeightOf: null,
|
followHeightOf: null,
|
||||||
|
@ -59,7 +60,7 @@ const tooltipText = computed(() => isJustCopied.value ? 'Copied!' : copyMessage.
|
||||||
:style="height ? `min-height: ${height - 40 /* card padding */ + 10 /* negative margin compensation */}px` : ''"
|
:style="height ? `min-height: ${height - 40 /* card padding */ + 10 /* negative margin compensation */}px` : ''"
|
||||||
>
|
>
|
||||||
<n-config-provider :hljs="hljs">
|
<n-config-provider :hljs="hljs">
|
||||||
<n-code :code="value" :language="language" :trim="false" data-test-id="area-content" />
|
<n-code :code="value" :language="language" :word-wrap="wordWrap" :trim="false" data-test-id="area-content" />
|
||||||
</n-config-provider>
|
</n-config-provider>
|
||||||
</n-scrollbar>
|
</n-scrollbar>
|
||||||
<div absolute right-10px top-10px>
|
<div absolute right-10px top-10px>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue