Skip to content

Commit 43922ae

Browse files
committed
feat(TextAreaCopyable): word wrap
1 parent c906f11 commit 43922ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/TextareaCopyable.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const props = withDefaults(
1616
language?: string
1717
copyPlacement?: 'top-right' | 'bottom-right' | 'outside' | 'none'
1818
copyMessage?: string
19+
wordWrap?: boolean
1920
}>(),
2021
{
2122
followHeightOf: null,
@@ -47,7 +48,7 @@ const tooltipText = computed(() => isJustCopied.value ? 'Copied!' : copyMessage.
4748
:style="height ? `min-height: ${height - 40 /* card padding */ + 10 /* negative margin compensation */}px` : ''"
4849
>
4950
<n-config-provider :hljs="hljs">
50-
<n-code :code="value" :language="language" :trim="false" data-test-id="area-content" />
51+
<n-code :code="value" :language="language" :word-wrap="wordWrap" :trim="false" data-test-id="area-content" />
5152
</n-config-provider>
5253
</n-scrollbar>
5354
<div absolute right-10px top-10px>

0 commit comments

Comments
 (0)