From 938dde4c1cc524fe9c2a294eed227ec643ab51fe Mon Sep 17 00:00:00 2001 From: Miao_Spring <539943419@qq.com> Date: Sun, 1 Sep 2024 04:18:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B1=8F=E8=94=BDmiaoDirectory?= =?UTF-8?q?=E5=BA=95=E9=83=A8=E5=B7=A5=E5=85=B7=E6=A0=8F=EF=BC=8C=E6=9B=B4?= =?UTF-8?q?=E6=96=B0readme=E8=AE=A1=E5=88=92=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 ++++-- src/views/miaoDirectory.vue | 37 ++++++++++++++++++++++++++++++------- 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 552e37c..a874206 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,15 @@ ## TODO list: -| 任务 | 状态 | +| 计划 | 状态 | |---|---| | 拆分miaoDirectory | ✅ | | 完善视频插件 | ✅ | | 完善PDF插件 | ✅ | | 完善Code插件 | ✅ | -| 实现miaoDirectory的搜索功能 | ❌ | +| 实现miaoDirectory的搜索功能 | ✅ | | 完善miaoDirectory的搜索功能 | ❌ | +| 实现miaoDirectory的排序功能 | ❌ | | 完善图片浏览插件 | ❌ | | VirtualDirectory更新时更新文件信息 | ❌ | +| 创建音乐播放器组件(仿QQ音乐移动端吧) | ❌ | | miaoDirectory的复制文件/文件夹功能 | ❌ | \ No newline at end of file diff --git a/src/views/miaoDirectory.vue b/src/views/miaoDirectory.vue index aa2425a..c142689 100644 --- a/src/views/miaoDirectory.vue +++ b/src/views/miaoDirectory.vue @@ -14,7 +14,7 @@ @item-drag-start="handleItemDragStart" @item-rename="handleItemRename" @item-select="handleItemSelect" /> - @@ -44,8 +44,10 @@ import MiaoDropHandler from '@/components/miaoDropHandler.vue' import { NIcon } from 'naive-ui' import { CloseOutline, SearchOutline, FilterOutline, CheckmarkDoneOutline, - DocumentText, - FileTray + DocumentText, ExtensionPuzzleOutline, + FileTray, + AddOutline, + CloudUploadOutline } from '@vicons/ionicons5' import usePluginCenter from '@/hooks/usePluginCenter' @@ -145,6 +147,16 @@ const showData_files = computed(() => { const topBarMenuOption = computed(() => { return [ + { + label: '新建', + key: 'create', + icon: renderIcon(AddOutline) + }, + { + label: '上传', + key: 'upload', + icon: renderIcon(CloudUploadOutline) + }, { label: '搜索', key: 'search', @@ -177,10 +189,17 @@ const topBarMenuOption = computed(() => { ], icon: renderIcon(FilterOutline) }, - ...pluginCenter.getUsablePlugin([currentDirectories.value[0]], []).map(v => ({ - label: `插件:${v.name}`, - key: `plugin:${v.key}` - })), + { + label: '插件', + key: 'plugin', + children: [ + ...pluginCenter.getUsablePlugin([currentDirectories.value[0]], []).map(v => ({ + label: `${v.name}`, + key: `plugin:${v.key}` + })), + ], + icon: renderIcon(ExtensionPuzzleOutline) + }, { label: '关闭', key: 'close', @@ -242,6 +261,10 @@ const handleTopBarMenuSelect = (key: string) => { emit('exit') } else if (key === 'search') { handleSearch() + } else if (key === 'upload') { + handlePickFilesUpload() + } else if (key === 'create') { + handleAddNewItem() } else if (key === 'searchReset') { handleSearchReset() } else if (key === 'selectedItemReset') {