feat: 本次提交更新内容如下

存一下样式
This commit is contained in:
笔记本里的永平
2025-07-22 16:24:30 +08:00
parent ac9aae9200
commit 47f85ee35a

View File

@@ -1,6 +1,6 @@
import React, { useEffect, useRef, useState, useCallback } from "react";
import { NavBar, Popup, Tabs, Toast, SpinLoading, Dialog } from "antd-mobile";
import { Button, Input, Pagination } from "antd";
import { Button, Input, Pagination, Checkbox } from "antd";
import { useNavigate } from "react-router-dom";
import { AddOutline, DeleteOutline } from "antd-mobile-icons";
import {
@@ -191,11 +191,11 @@ const Devices: React.FC = () => {
right={
<Button
size="small"
color="primary"
type="primary"
onClick={() => setAddVisible(true)}
>
<AddOutline />
<span style={{ marginLeft: 4, fontSize: 12 }}></span>
</Button>
}
>
@@ -223,7 +223,7 @@ const Devices: React.FC = () => {
</Button>
</div>
{/* 筛选和删除 */}
<div style={{ display: "flex", gap: 8, marginBottom: 12 }}>
<div style={{ display: "flex", gap: 8 }}>
<Tabs
activeKey={status}
onChange={(k) => setStatus(k as any)}
@@ -233,15 +233,18 @@ const Devices: React.FC = () => {
<Tabs.Tab title="在线" key="online" />
<Tabs.Tab title="离线" key="offline" />
</Tabs>
<Button
size="small"
color="danger"
icon={<DeleteOutline />}
disabled={!selected.length}
onClick={() => setDelVisible(true)}
>
</Button>
<div style={{ paddingTop: 8 }}>
<Button
size="small"
type="primary"
danger
icon={<DeleteOutline />}
disabled={selected.length === 0}
onClick={() => setDelVisible(true)}
>
</Button>
</div>
</div>
</div>
</>
@@ -279,8 +282,7 @@ const Devices: React.FC = () => {
}}
onClick={() => goDetail(device.id!)}
>
<input
type="checkbox"
<Checkbox
checked={selected.includes(device.id)}
onChange={(e) => {
e.stopPropagation();
@@ -297,13 +299,13 @@ const Devices: React.FC = () => {
<div style={{ fontWeight: 600, fontSize: 16 }}>
{device.memo || "未命名设备"}
</div>
<div style={{ fontSize: 12, color: "#888", marginTop: 2 }}>
<div style={{ fontSize: 14, color: "#999", marginTop: 2 }}>
IMEI: {device.imei}
</div>
<div style={{ fontSize: 12, color: "#888", marginTop: 2 }}>
<div style={{ fontSize: 14, color: "#999", marginTop: 2 }}>
: {device.wechatId || "未绑定"}
</div>
<div style={{ fontSize: 12, color: "#888", marginTop: 2 }}>
<div style={{ fontSize: 14, color: "#999", marginTop: 2 }}>
: {device.totalFriend ?? "-"}
</div>
</div>
@@ -359,8 +361,7 @@ const Devices: React.FC = () => {
{addTab === "scan" && (
<div style={{ textAlign: "center", minHeight: 200 }}>
<Button
color="primary"
type="primary"
type="error"
onClick={handleGetQr}
loading={qrLoading}
icon={<QrcodeOutlined />}
@@ -426,7 +427,7 @@ const Devices: React.FC = () => {
key: "confirm",
text: "确认删除",
danger: true,
loading: delLoading,
// loading: delLoading, // antd-mobile Dialog.Action 不支持 loading 属性,去掉
},
{ key: "cancel", text: "取消" },
]}