update at 2026-02-11 19:39:59
This commit is contained in:
@@ -69,6 +69,10 @@ const visiblePreviewItems = computed(() => {
|
||||
return previewItems.value.slice(0, renderedPreviewCount.value)
|
||||
})
|
||||
|
||||
const hasRenderableInput = computed(() => {
|
||||
return inputText.value.trim() !== '' && activePreviewFonts.value.length > 0
|
||||
})
|
||||
|
||||
const previewTriggerIndex = computed(() => {
|
||||
if (!hasMorePreviewItems.value || visiblePreviewItems.value.length <= 0) {
|
||||
return -1
|
||||
@@ -470,6 +474,8 @@ async function regeneratePreviews() {
|
||||
|
||||
if (!inputText.value || inputText.value.trim() === '' || nextPreviewFonts.length === 0) {
|
||||
isGenerating.value = false
|
||||
isBatchGenerating.value = false
|
||||
batchOwnerToken = null
|
||||
return
|
||||
}
|
||||
|
||||
@@ -477,6 +483,14 @@ async function regeneratePreviews() {
|
||||
|
||||
try {
|
||||
await loadNextPreviewBatch(generationToken)
|
||||
if (
|
||||
!isStaleGeneration(generationToken) &&
|
||||
previewItems.value.length === 0 &&
|
||||
processedFontCount.value < activePreviewFonts.value.length &&
|
||||
!isBatchGenerating.value
|
||||
) {
|
||||
await loadNextPreviewBatch(generationToken)
|
||||
}
|
||||
if (
|
||||
!isStaleGeneration(generationToken) &&
|
||||
previewItems.value.length === 0 &&
|
||||
@@ -571,9 +585,9 @@ defineExpose({
|
||||
previewErrorMessage
|
||||
? previewErrorMessage
|
||||
: (
|
||||
inputText.trim() === '' || previewFonts.length === 0
|
||||
inputText.trim() === '' || activePreviewFonts.length === 0
|
||||
? '请选择字体并输入内容'
|
||||
: '暂无可显示预览'
|
||||
: (hasRenderableInput ? '暂无可显示预览' : '请选择字体并输入内容')
|
||||
)
|
||||
)
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user