This commit is contained in:
shengchanzhe 2023-10-13 18:26:32 +08:00
parent c3799d8eb7
commit 8e39d23b3b
4 changed files with 60 additions and 32 deletions

View File

@ -3,14 +3,14 @@
<template> <template>
<div class="box"> <div class="box">
<slot></slot> <slot />
</div> </div>
</template> </template>
<style scoped> <style scoped>
.box { .box {
width: 400px; width: 22em;
height: 300px; height: 100%;
border-radius: 20px; border-radius: 20px;
/* background-color: rgba(97, 161, 140, 0.3); */ /* background-color: rgba(97, 161, 140, 0.3); */
/* position: fixed; /* position: fixed;

View File

@ -1,18 +1,32 @@
<template> <template>
<div class="dots"> <div style="position: relative;">
<div /> <div class="dots">
<div /> <div />
<div /> <div />
<div /> <div />
<div /> <div />
<div /> <div />
<div /> <div />
<div /> <div />
<div /> <div />
<div />
</div>
<p class="text">
等待中
</p>
</div> </div>
</template> </template>
<style scoped> <style scoped>
.text{
display: block;
width: 100%;
font-size: 1.5em;
text-align: center;
position: absolute;
left: 0;
bottom: -2em;
}
.dots { .dots {
width: 20em; width: 20em;
height: 20em; height: 20em;

View File

@ -1,13 +1,27 @@
<template> <template>
<div class="div"> <div style="position: relative;">
<span /> <div class="div">
<span /> <span />
<span /> <span />
<span /> <span />
<span />
</div>
<p class="text">
输入中
</p>
</div> </div>
</template> </template>
<style scoped> <style scoped>
.text{
display: block;
width: 100%;
font-size: 1.5em;
text-align: center;
position: absolute;
left: 0;
bottom: -2em;
}
.div { .div {
display: flex; display: flex;
flex-flow: row nowrap; flex-flow: row nowrap;

View File

@ -108,7 +108,7 @@ const conversationList = computed(() =>
const prompt = ref<string>('') const prompt = ref<string>('')
const loading = ref<boolean>(false) const loading = ref<boolean>(false)
const inputRef = ref<Ref | null>(null) const inputRef = ref<Ref | null>(null)
const nowStatus = ref('input') // , input, loding, record, start const nowStatus = ref('record') // , input, loding, record, start
const nowStart = ref(true) // , const nowStart = ref(true) // ,
// PromptStore // PromptStore
@ -589,15 +589,15 @@ const footerClass = computed(() => {
}) })
// //
const changeNowStatus = (e:any)=>{ const changeNowStatus = (e: any) => {
console.log('收到数据',e); console.log('收到数据', e)
if(e!=nowStatus.value){ if (e != nowStatus.value) {
switch(e){ switch (e) {
case 'playing': nowStatus.value = 'record';break; case 'playing': nowStatus.value = 'record'; break
case 'loding': nowStatus.value = 'loding';break; case 'loding': nowStatus.value = 'loding'; break
default: nowStatus.value = 'input';break; default: nowStatus.value = 'input'; break
} }
} }
} }
onMounted(() => { onMounted(() => {
@ -618,9 +618,9 @@ window.addEventListener('test', (e) => {
prompt.value = window.winText prompt.value = window.winText
}) })
setTimeout(() => { // setTimeout(() => {
nowStart.value = false // nowStart.value = false
}, 800) // }, 800)
</script> </script>
<template> <template>
@ -681,7 +681,7 @@ setTimeout(() => {
:inversion="item.inversion" :inversion="item.inversion"
:error="item.error" :error="item.error"
:loading="item.loading" :loading="item.loading"
@changeNowStatus="changeNowStatus" @changeNowStatus="changeNowStatus"
@regenerate="onRegenerate(index)" @regenerate="onRegenerate(index)"
@delete="handleDelete(index)" @delete="handleDelete(index)"
/> />