feat: 修改bug
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { Avatar, Divider, Image, Space, SpinLoading, Toast } from "antd-mobile";
|
||||
import { Avatar, Divider, Space, SpinLoading, Toast } from "antd-mobile";
|
||||
import { VoiceIcon } from "@workspace/shared";
|
||||
import dogSvg from "@/assets/translate/dog.svg";
|
||||
import catSvg from "@/assets/translate/cat.svg";
|
||||
import pigSvg from "@/assets/translate/pig.svg";
|
||||
import { Message } from "../../../types";
|
||||
import "./index.less";
|
||||
import { Refresh } from "@icon-park/react";
|
||||
@@ -75,10 +72,10 @@ function Index(props: DefinedProps) {
|
||||
default:
|
||||
console.warn("未知错误");
|
||||
}
|
||||
Toast.show("音频播放失败");
|
||||
Toast.show("音频播放失败1111");
|
||||
setIsPlating(false);
|
||||
};
|
||||
|
||||
console.log("audio play", id);
|
||||
audio
|
||||
.play()
|
||||
.then(() => {
|
||||
@@ -96,6 +93,7 @@ function Index(props: DefinedProps) {
|
||||
audioRefs.current[currentPlayingId].currentTime = 0;
|
||||
setIsPlating(false);
|
||||
setCurrentPlayingId(undefined);
|
||||
return;
|
||||
}
|
||||
|
||||
Object.values(audioRefs.current).forEach((audio) => {
|
||||
@@ -162,7 +160,9 @@ function Index(props: DefinedProps) {
|
||||
|
||||
<div className="rig">
|
||||
<div>
|
||||
<span className="name">{item.petName}</span>
|
||||
<span className="name">
|
||||
{item.isTranslating && !item.isRefresh ? "" : item.petName ?? "未知宠物"}
|
||||
</span>
|
||||
<Divider direction="vertical" style={{ margin: "0px 8px" }} />
|
||||
<span className="">{item.createTime}</span>
|
||||
</div>
|
||||
@@ -204,7 +204,7 @@ function Index(props: DefinedProps) {
|
||||
</div>
|
||||
))}
|
||||
|
||||
<div style={{ height: "130px", width: "100%" }}></div>
|
||||
<div style={{ height: "80px", width: "100%" }}></div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user