fix [P-246]: абзацы
This commit is contained in:
1 parent
0329bb942a
commit
bc509dff91
2 files changed
+21
-6
No files matched your search
@@ -9,7 +9,7 @@
|
|||||||
{ 'border-b-thin': !isDialog, 'pa-0': isDialog }
|
{ 'border-b-thin': !isDialog, 'pa-0': isDialog }
|
||||||
]">
|
]">
|
||||||
<div class="test-info">
|
<div class="test-info">
|
||||||
<p class="text-body-1 mb-4">{{ data?.description }}</p>
|
<div class="text-body-1 mb-4" v-html="formatDescription(data?.description)"></div>
|
||||||
|
|
||||||
<div class="d-flex align-center mb-3">
|
<div class="d-flex align-center mb-3">
|
||||||
<v-icon icon="mdi-clock-outline" color="teal-darken-2" class="mr-2" />
|
<v-icon icon="mdi-clock-outline" color="teal-darken-2" class="mr-2" />
|
||||||
@@ -84,9 +84,15 @@ export default {
|
|||||||
return 'минут';
|
return 'минут';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const formatDescription = (text) => {
|
||||||
|
if (!text) return '';
|
||||||
|
return text.replace(/\r?\n/g, '<br>');
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
isExamMode,
|
isExamMode,
|
||||||
timeWordDeclension
|
timeWordDeclension,
|
||||||
|
formatDescription
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -32,9 +32,7 @@
|
|||||||
<v-col cols="auto" class="d-flex flex-grow-1">
|
<v-col cols="auto" class="d-flex flex-grow-1">
|
||||||
<div class="d-flex flex-column justify-center flex-grow-1">
|
<div class="d-flex flex-column justify-center flex-grow-1">
|
||||||
<div class="text-h6 font-weight-bold mb-2">{{ cardValue.name }}</div>
|
<div class="text-h6 font-weight-bold mb-2">{{ cardValue.name }}</div>
|
||||||
<div class="text-body-1 text-grey-darken-1 mb-4" style="max-width: 600px">
|
<div class="text-body-1 text-grey-darken-1 mb-4 test-description" style="max-width: 600px" v-html="formatDescription(cardValue.description)"></div>
|
||||||
{{ cardValue.description }}
|
|
||||||
</div>
|
|
||||||
<div class="d-flex flex-wrap gap-4">
|
<div class="d-flex flex-wrap gap-4">
|
||||||
<slot name="results"></slot>
|
<slot name="results"></slot>
|
||||||
<div v-for="icon in activeTabIcon" class="d-inline-flex align-center test-info-item">
|
<div v-for="icon in activeTabIcon" class="d-inline-flex align-center test-info-item">
|
||||||
@@ -152,7 +150,13 @@ export default {
|
|||||||
return val;
|
return val;
|
||||||
};
|
};
|
||||||
|
|
||||||
return { search, searchTest, momenter, activeTabIcon, baseURL };
|
const formatDescription = (text) => {
|
||||||
|
if (!text) return '';
|
||||||
|
// Заменяем \r\n и \n на <br>
|
||||||
|
return text.replace(/\r?\n/g, '<br>');
|
||||||
|
};
|
||||||
|
|
||||||
|
return { search, searchTest, momenter, activeTabIcon, baseURL, formatDescription };
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -197,4 +201,9 @@ export default {
|
|||||||
background: rgba(0, 0, 0, 0.02);
|
background: rgba(0, 0, 0, 0.02);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.test-description {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in new issue
Block a user