feat: search

This commit is contained in:
2025-09-15 14:48:58 +08:00
parent 2378ad3a40
commit 7296a13e88
2 changed files with 53 additions and 28 deletions

View File

@@ -22,7 +22,13 @@ function Index() {
<div className="home-header"> <div className="home-header">
<h3></h3> <h3></h3>
<Space style={{ fontSize: "20px", "--gap": "16px" }}> <Space style={{ fontSize: "20px", "--gap": "16px" }}>
<Filter theme="outline" fill="#333" strokeWidth={3} strokeLinecap="butt" /> <Filter
theme="outline"
fill={visible ? "#118fff" : "#333"}
strokeWidth={3}
strokeLinecap="butt"
onClick={() => setVisible(!visible)}
/>
<Divider direction="vertical" /> <Divider direction="vertical" />
<Electrocardiogram <Electrocardiogram
theme="outline" theme="outline"

View File

@@ -1,4 +1,4 @@
import { Dropdown, type DropdownRef, Radio, SearchBar, Space } from "antd-mobile"; import { Calendar, Dropdown, type DropdownRef, Radio, SearchBar, Space } from "antd-mobile";
import { RadioValue } from "antd-mobile/es/components/radio"; import { RadioValue } from "antd-mobile/es/components/radio";
import { useRef, useState } from "react"; import { useRef, useState } from "react";
@@ -27,7 +27,7 @@ function SearchCom(props: PropsConfig) {
}} }}
defaultValue={value} defaultValue={value}
/> />
<Dropdown className="all" ref={animenuRef}> <Dropdown key="ani" className="all" ref={animenuRef}>
<Dropdown.Item key="ani" title={aniName}> <Dropdown.Item key="ani" title={aniName}>
<div style={{ padding: 12 }}> <div style={{ padding: 12 }}>
<Radio.Group defaultValue="default" onChange={handleAniSelect}> <Radio.Group defaultValue="default" onChange={handleAniSelect}>
@@ -48,32 +48,51 @@ function SearchCom(props: PropsConfig) {
</Radio.Group> </Radio.Group>
</div> </div>
</Dropdown.Item> </Dropdown.Item>
</Dropdown> <Dropdown.Item key="time" title="时间 ">
{/* <div className="all" onClick={handleAllAni}> <div style={{ padding: 12 }}>
<span>全部宠物</span> <Calendar
<DownOne prevMonthButton={<span></span>}
theme="filled" nextMonthButton={<span></span>}
size="16" prevYearButton={<span></span>}
strokeWidth={3} nextYearButton={<span></span>}
strokeLinecap="butt"
/> />
</div> </div>
<ActionSheet </Dropdown.Item>
visible={visible} <Dropdown.Item key="device" title="设备 ">
actions={actions} <div style={{ padding: 12 }}>
onClose={() => setVisible(false)} <Radio.Group defaultValue="default">
/> */} <Space direction="vertical" block>
{/* <Popup <Radio block value="0">
visible={visible} AXR智能语音项圈
onClose={() => { </Radio>
setVisible(false); <Radio block value="1">
}} XSWL宠物手机
> </Radio>
<div className="popup-head"> </Space>
<span>宠物</span> </Radio.Group>
</div> </div>
11111 </Dropdown.Item>
</Popup> */} <Dropdown.Item key="mood" title="情绪">
<div style={{ padding: 12 }}>
<Radio.Group defaultValue="default">
<Space direction="vertical" block>
<Radio block value="0">
/
</Radio>
<Radio block value="1">
/
</Radio>
<Radio block value="2">
/
</Radio>
<Radio block value="3">
/
</Radio>
</Space>
</Radio.Group>
</div>
</Dropdown.Item>
</Dropdown>
</div> </div>
); );
} }