From bc509dff91d0b496700dc8a42caa560d19771983 Mon Sep 17 00:00:00 2001 From: Denis Voinovich Date: Mon, 2 Jun 2025 12:44:03 +0300 Subject: [PATCH] =?UTF-8?q?fix=20[P-246]:=20=D0=B0=D0=B1=D0=B7=D0=B0=D1=86?= =?UTF-8?q?=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/testing/BodyDetailTesting.vue | 10 ++++++++-- .../src/components/testing/CatalogTest.vue | 17 +++++++++++++---- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/front/src/components/testing/BodyDetailTesting.vue b/src/front/src/components/testing/BodyDetailTesting.vue index 551929c05..46bab2575 100644 --- a/src/front/src/components/testing/BodyDetailTesting.vue +++ b/src/front/src/components/testing/BodyDetailTesting.vue @@ -9,7 +9,7 @@ { 'border-b-thin': !isDialog, 'pa-0': isDialog } ]">
-

{{ data?.description }}

+
@@ -84,9 +84,15 @@ export default { return 'минут'; }); + const formatDescription = (text) => { + if (!text) return ''; + return text.replace(/\r?\n/g, '
'); + }; + return { isExamMode, - timeWordDeclension + timeWordDeclension, + formatDescription }; } }; diff --git a/src/front/src/components/testing/CatalogTest.vue b/src/front/src/components/testing/CatalogTest.vue index 4890db2ba..1e0e9b087 100644 --- a/src/front/src/components/testing/CatalogTest.vue +++ b/src/front/src/components/testing/CatalogTest.vue @@ -32,9 +32,7 @@
{{ cardValue.name }}
-
- {{ cardValue.description }} -
+
@@ -152,7 +150,13 @@ export default { return val; }; - return { search, searchTest, momenter, activeTabIcon, baseURL }; + const formatDescription = (text) => { + if (!text) return ''; + // Заменяем \r\n и \n на
+ return text.replace(/\r?\n/g, '
'); + }; + + return { search, searchTest, momenter, activeTabIcon, baseURL, formatDescription }; }, }; @@ -197,4 +201,9 @@ export default { background: rgba(0, 0, 0, 0.02); border-radius: 8px; } + +.test-description { + white-space: pre-wrap; + word-wrap: break-word; +}