feat: init
This commit is contained in:
@@ -1,32 +1,37 @@
|
||||
import MainLayout from "@/layout/main/mainLayout";
|
||||
import { Button, Tabs } from "antd-mobile";
|
||||
import Translate from "./translate";
|
||||
import { useState } from "react";
|
||||
import { Divider, Space } from "antd-mobile";
|
||||
import Translate from "./translate/index";
|
||||
import { Electrocardiogram, Filter, GithubOne } from "@icon-park/react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import "./index.less";
|
||||
|
||||
function Index() {
|
||||
const handleRecordComplete = (audioData: AudioData): void => {
|
||||
console.log("录音完成:", audioData);
|
||||
};
|
||||
const [visible, setVisible] = useState<boolean>(false);
|
||||
const navigate = useNavigate();
|
||||
|
||||
const handleError = (error: Error): void => {
|
||||
console.error("录音错误:", error);
|
||||
const onLink = () => {
|
||||
navigate("/translate/mood");
|
||||
};
|
||||
|
||||
return (
|
||||
<MainLayout>
|
||||
<div className="home">
|
||||
<div className="header">
|
||||
<div className="home-header">
|
||||
<h3>宠物翻译</h3>
|
||||
<div></div>
|
||||
<Space style={{ fontSize: "20px", "--gap": "16px" }}>
|
||||
<Filter theme="outline" fill="#333" strokeWidth={3} strokeLinecap="butt" />
|
||||
<Divider direction="vertical" />
|
||||
<Electrocardiogram
|
||||
theme="outline"
|
||||
fill="#333"
|
||||
strokeWidth={3}
|
||||
strokeLinecap="butt"
|
||||
onClick={onLink}
|
||||
/>
|
||||
<GithubOne theme="outline" fill="#333" strokeWidth={3} strokeLinecap="butt" />
|
||||
</Space>
|
||||
</div>
|
||||
{/* <Tabs stretch={false}>
|
||||
<Tabs.Tab title="宠物翻译" key="1">
|
||||
<Translate />
|
||||
</Tabs.Tab>
|
||||
<Tabs.Tab title="宠物档案" key="2">
|
||||
2
|
||||
</Tabs.Tab>
|
||||
</Tabs> */}
|
||||
<Translate searchVisible={visible} />
|
||||
</div>
|
||||
</MainLayout>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user