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; +}