diff --git a/src/components/filebrowser/List.vue b/src/components/filebrowser/List.vue index b4870e93..25100167 100644 --- a/src/components/filebrowser/List.vue +++ b/src/components/filebrowser/List.vue @@ -23,6 +23,9 @@ const emit = defineEmits(['loading', 'pathchanged', 'refreshed', 'filedeleted', // 确认框 const createConfirm = useConfirm() +// 存储空间类型 +const storage = ref(inProps.storage ?? '') + // axios实例 const axiosInstance = ref(inProps.axios ?? axios) @@ -35,14 +38,19 @@ const filter = ref('') // 重命名弹窗 const renamePopper = ref(false) +// 整理弹窗 +const transferPopper = ref(false) + // 新名称 const newName = ref('') // 当前名称 const currentItem = ref() -// 存储空间类型 -const storage = ref(inProps.storage ?? '') +// TODO 文件转移表单 +const transferForm = ref({ + +}) // 目录过滤 const dirs = computed(() => @@ -146,11 +154,6 @@ function getImgLink(path: string) { return `${import.meta.env.VITE_API_BASE_URL}${url_path.slice(1)}&token=${token}` } -// 转移文件 -function transfer(item: FileItem) { - // TODO 转移文件 -} - // 显示重命名弹窗 function showRenmae(item: FileItem) { currentItem.value = item @@ -182,6 +185,17 @@ async function rename() { emit('renamed') } +// 显示整理对话框 +function showTransfer(item: FileItem) { + currentItem.value = item + transferPopper.value = true +} + +// 整理文件 +function transfer() { + // TODO 整理文件 +} + // 监听path变化 watch( () => inProps.path, @@ -208,7 +222,7 @@ onMounted(() => {