feat: 停止生成
This commit is contained in:
@@ -73,6 +73,7 @@
|
||||
<span>{{ content.webAddress?.length }} web pages have been retrieved.</span>
|
||||
</div>
|
||||
</div>
|
||||
<Pause v-show="showStop && isLast" />
|
||||
<div
|
||||
v-show="!content.streaming"
|
||||
class="operate flex"
|
||||
@@ -108,14 +109,15 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, computed, watch } from 'vue'
|
||||
import { ref, onMounted, onUnmounted, computed, watch } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import gsap from 'gsap'
|
||||
import userThumb from '@/assets/images/user-thumb.jpg'
|
||||
import agentThumb from '@/assets/images/agent-thumb.png'
|
||||
import Card from './ReportCard.vue'
|
||||
import Url from './UrlCard.vue'
|
||||
import Sketch from './SketchCard.vue'
|
||||
import Pause from './Pause.vue'
|
||||
import gsap from 'gsap'
|
||||
import { VueMarkdown } from '@crazydos/vue-markdown'
|
||||
import type { CustomAttrs } from '@crazydos/vue-markdown'
|
||||
import rehypeRaw from 'rehype-raw'
|
||||
@@ -269,6 +271,21 @@
|
||||
const handleClickSketch = () => {
|
||||
MyEvent.emit('openSketch')
|
||||
}
|
||||
|
||||
const showStop = ref(false)
|
||||
const handleStopChat = () => {
|
||||
if (props.isLast) {
|
||||
showStop.value = true
|
||||
}
|
||||
|
||||
// props.content.loading = false
|
||||
}
|
||||
onMounted(() => {
|
||||
MyEvent.add('stopChat', handleStopChat)
|
||||
})
|
||||
onUnmounted(() => {
|
||||
MyEvent.remove('stopChat', handleStopChat)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
Reference in New Issue
Block a user