From 585c9b7bf8048eca46102d688d677f18807979ae Mon Sep 17 00:00:00 2001 From: liamzi Date: Mon, 16 Dec 2024 15:22:18 +0800 Subject: [PATCH] fix --- src/pages/resource/bucket/index.jsx | 33 +++++++++++++++++------------ 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/src/pages/resource/bucket/index.jsx b/src/pages/resource/bucket/index.jsx index 34e7310..f38256d 100644 --- a/src/pages/resource/bucket/index.jsx +++ b/src/pages/resource/bucket/index.jsx @@ -1,6 +1,6 @@ import React, { useState, useEffect, useMemo } from 'react'; import { supabase } from '@/config/supabase'; -import { Card, Upload, Button, message, List, Switch, Space, Input, Select, Tag, Pagination, Modal, Image } from 'antd'; +import { Upload, Button, message, List, Switch, Space, Input, Tag, Pagination, Modal, Image, Popconfirm } from 'antd'; import { UploadOutlined, FileTextOutlined, FileImageOutlined, FileMarkdownOutlined, FilePdfOutlined, FileWordOutlined, FileExcelOutlined, InboxOutlined, SearchOutlined, EditOutlined } from '@ant-design/icons'; @@ -65,9 +65,8 @@ const StorageManager = () => { const { data, error } = await supabase.storage .from('file') .list('', { - sortBy: { column: 'created_at', order: 'desc' } + sortBy: { column: 'created_at', order: 'desc' } // 按创建时间倒序 }); - if (error) throw error; setAllFiles(data || []); } catch (error) { @@ -299,7 +298,7 @@ const handleDelete = async (fileName) => {

-

点击��拖拽文件到此区域上传

+

点击或者拖拽文件到此区域上传

支持单个或批量上传,文件大小不超过50MB

@@ -348,17 +347,25 @@ const handleDelete = async (fileName) => { }`} onClick={() => previewFile(file)} actions={[ - + + ]} > { )} /> - {/* 分页器 - 只在非搜索状态下显示 */} + {/* 分页器 - 只��非搜索状态下显示 */} {!searchText && (