update:新增稳定训练

This commit is contained in:
2026-08-26 15:23:02 +08:00
parent 45bc324f70
commit 96b64e4187
15 changed files with 645 additions and 25 deletions
@@ -13,7 +13,20 @@ const props = defineProps({
});
const previewLines = computed(() => {
return props.lines.map((line) => String(line || "").trim()).filter(Boolean);
return props.lines
.map((line) => {
const rawParts = Array.isArray(line?.parts)
? line.parts
: [{ text: line }];
const parts = rawParts
.map((part) => ({
text: String(part?.text ?? part ?? "").trim(),
}))
.filter((part) => part.text);
return { parts };
})
.filter((line) => line.parts.length > 0);
});
</script>
@@ -27,13 +40,16 @@ const previewLines = computed(() => {
<view class="difficulty-preview__content">
<text class="difficulty-preview__title">{{ title }}</text>
<view class="difficulty-preview__copy">
<text
<view
v-for="(line, index) in previewLines"
:key="`${line}-${index}`"
:key="index"
class="difficulty-preview__line"
>
{{ line }}
</text>
<text
v-for="(part, partIndex) in line.parts"
:key="partIndex"
>{{ part.text }}</text>
</view>
</view>
</view>
</view>
@@ -86,6 +102,4 @@ const previewLines = computed(() => {
.difficulty-preview__line {
display: block;
}
</style>