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

View File

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

View File

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

View File

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