stream returns
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
2025-09-24 18:28:42 +08:00
parent 0a9d49b526
commit 0b652aa301
6 changed files with 197 additions and 29 deletions

View File

@@ -1,25 +1,27 @@
<template>
<n-spin :show="aiStore.loading.ai">
<div>AI 小助手友情提醒</div>
<div class="container">
<MdPreview :model-value="aiStore.mdContent" />
</div>
</n-spin>
</template>
<script setup lang="ts">
import { useAIStore } from "~/oj/store/ai"
import { MdPreview } from "md-editor-v3"
import "md-editor-v3/lib/preview.css"
const aiStore = useAIStore()
watch(
() => [
aiStore.loading.details,
aiStore.loading.weekly,
],
(newVal, oldVal) => {
if (!oldVal) return
const loaded = newVal.some((val, idx) => val === false && oldVal[idx] === true)
if (loaded) {
() => [aiStore.loading.details, aiStore.loading.weekly],
(newVal) => {
if (newVal.every((val) => val === false)) {
aiStore.fetchAIAnalysis()
}
},
{ immediate: true },
)
</script>
<style scoped>
.container {
min-height: 200px;
}
</style>