Skip to content

Commit 49f4c88

Browse files
committed
feat(TextAreaCopyable): word wrap
1 parent f2de87e commit 49f4c88

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
@@ -22,6 +22,7 @@ const props = withDefaults(
2222
language?: string
2323
copyPlacement?: 'top-right' | 'bottom-right' | 'outside' | 'none'
2424
copyMessage?: string
25+
wordWrap?: boolean
2526
}>(),
2627
{
2728
followHeightOf: null,
@@ -59,7 +60,7 @@ const tooltipText = computed(() => isJustCopied.value ? 'Copied!' : copyMessage.
5960
:style="height ? `min-height: ${height - 40 /* card padding */ + 10 /* negative margin compensation */}px` : ''"
6061
>
6162
<n-config-provider :hljs="hljs">
62-
<n-code :code="value" :language="language" :trim="false" data-test-id="area-content" />
63+
<n-code :code="value" :language="language" :word-wrap="wordWrap" :trim="false" data-test-id="area-content" />
6364
</n-config-provider>
6465
</n-scrollbar>
6566
<div absolute right-10px top-10px>

0 commit comments

Comments
 (0)