john 1 anno fa
parent
commit
cb09b90d4d
2 ha cambiato i file con 19 aggiunte e 5 eliminazioni
  1. 17 4
      src/pages/DuplicateFile/DuplicateFile.tsx
  2. 2 1
      src/types/files.d.ts

+ 17 - 4
src/pages/DuplicateFile/DuplicateFile.tsx

@@ -1,5 +1,5 @@
 import styles from "./DuplicateFile.module.less";
-import { Col, Row, Button, message, Table, Select, Space, Modal, Input, Checkbox, GetProp } from "antd";
+import { Col, Row, Button, message, Table, Select, Space, Modal, Input, Checkbox, GetProp, Progress } from "antd";
 import { useEffect, useState } from "react";
 const { Option } = Select;
 import { open } from "@tauri-apps/api/dialog";
@@ -21,17 +21,20 @@ export default function DuplicateFile() {
     {
       id: 1,
       path:'D:\code\wb_project\bar_association_app',
-      time: '2024-01-23'
+      time: '2024-01-23',
+      progress: 80
     },
     {
       id: 2,
       path:'D:\code\wb_project\bar_association_app',
-      time: '2024-01-23'
+      time: '2024-01-23',
+      progress: 20
     },
     {
       id: 3,
       path:'D:\code\wb_project\bar_association_app',
-      time: '2024-01-23'
+      time: '2024-01-23',
+      progress: 90
     }
   ])
   const [isModalOpen, setIsModalOpen] = useState(false);
@@ -63,10 +66,20 @@ export default function DuplicateFile() {
         <CopyText width="100px" ellipsisLine={1} color="#333" name={record.time}></CopyText>
       ),
     },
+    {
+      title: "进度",
+      dataIndex: "time",
+      key: "time",
+      with: 200,
+      render: (text: string, record: { progress: number }) => (
+        <div style={{width: '200px'}}><Progress percent={record.progress} /></div>
+      ),
+    },
     {
       title: "操作",
       dataIndex: "actions",
       key: "actions",
+      fixed: "right",
       render: () => (
         <Space size="middle">
           <Button  onClick={() => setIsModalOpen(true)} type="default" >修改</Button>

+ 2 - 1
src/types/files.d.ts

@@ -2,7 +2,8 @@ export type insertSearchFilesPasamsType = {
     id: number,
     sourceId?: number|string|any,
     path: string,
-    time: string
+    time: string,
+    progress: number
 }
 
 export type historyListType = {