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