From a4854566ea6ffe237348d32c642578882201d4d7 Mon Sep 17 00:00:00 2001 From: jmal Date: Thu, 27 Mar 2025 18:06:20 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SearchDialog/index.vue | 870 ++++++++++++++++++++++---- src/components/ShowFile/ShowFile.vue | 39 +- src/styles/index.scss | 71 +++ 3 files changed, 857 insertions(+), 123 deletions(-) diff --git a/src/components/SearchDialog/index.vue b/src/components/SearchDialog/index.vue index 2bc9fb0..e25f7ff 100644 --- a/src/components/SearchDialog/index.vue +++ b/src/components/SearchDialog/index.vue @@ -1,146 +1,802 @@ diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index 50b7f0b..8d4467f 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -152,7 +152,7 @@ slot="reference" :name="''" @click.native="upload" - style="margin-right: 5px" + style="margin-right: 10px" > @@ -168,9 +168,13 @@ @blur="setInputBlur()" @clear="searchFileEnter(searchFileName)" > - - - +
- +
@@ -1175,6 +1179,9 @@ export default { return '名称' } }, + cmdKey() { + return navigator.platform.startsWith('Mac') ? '⌘' : 'Ctrl' + }, fileClipboard() { return store.getters.fileClipboard }, @@ -1493,13 +1500,11 @@ export default { event.stopPropagation() } // ctrl + P / cmd + P - // if (isCmd && keyCode === 80) { - // if (!this.inputting && this.editingIndex === -1) { - // this.searchDialogVisible = true - // event.preventDefault() - // event.stopPropagation() - // } - // } + if (isCmd && keyCode === 80 && !checkPreviewVisible && !this.inputting) { + this.searchDialogVisible = true + event.preventDefault() + event.stopPropagation() + } }, keyup(event) { const { keyCode } = event @@ -1628,11 +1633,10 @@ export default { }, // 画矩形选区 darwRectangle() { - let scrollDiv = document.querySelector('.el-table__body-wrapper') + let scrollDiv = this.$refs.fileListTableContainer.querySelector('.el-table__body-wrapper') if (this.grid) { - scrollDiv = document.querySelector('.van-grid') + scrollDiv = this.$refs.gridDiv.querySelector('.van-grid') } - // 添加scroll事件 scrollDiv.onscroll = e => { this.tableBodyScroll(null, e) @@ -4456,6 +4460,9 @@ export default { this.specifyPreviewer = 'office' }, checkPreviewVisible() { + if (this.searchDialogVisible) { + return true + } if (this.iframePreviewVisible) { return true } diff --git a/src/styles/index.scss b/src/styles/index.scss index b61433b..6cd004b 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -16,6 +16,77 @@ body { border-width: 0; } } + +.time-filter-dropdown { + min-width: 280px; + padding: 15px; + + .time-picker-container { + padding: 5px; + } + + .time-presets { + display: flex; + flex-wrap: wrap; + gap: 8px; + margin-bottom: 15px; + + .el-button { + margin: 0; + padding: 4px 8px; + font-size: 12px; + flex: 1 0 calc(33% - 8px); + } + } + + .custom-date-range { + margin-top: 10px; + border-top: 1px solid #ebeef5; + padding-top: 10px; + + .date-range-title { + margin: 0 0 10px; + font-size: 12px; + color: #606266; + } + + .modern-date-picker { + width: 100%; + } + } +} + +.size-filter-dropdown { + min-width: 280px; + padding: 15px; + + .size-slider-container { + padding: 5px; + } + + .size-slider-labels { + display: flex; + justify-content: space-between; + margin-bottom: 10px; + color: #606266; + font-size: 12px; + } + + .size-slider-presets { + display: flex; + flex-wrap: wrap; + gap: 8px; + margin-top: 15px; + justify-content: space-between; + + .el-button { + margin: 0; + padding: 4px 8px; + font-size: 12px; + } + } +} + >>>::-webkit-scrollbar { /*滚动条整体样式*/ width: 12px; From 69ca54add70c0e37ebfbc5bad9bf88d79da770ae Mon Sep 17 00:00:00 2001 From: jmal Date: Fri, 28 Mar 2025 18:09:34 +0800 Subject: [PATCH 2/4] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SearchDialog/index.vue | 440 ++++---------------------- src/components/ShowFile/ShowFile.vue | 24 +- 2 files changed, 64 insertions(+), 400 deletions(-) diff --git a/src/components/SearchDialog/index.vue b/src/components/SearchDialog/index.vue index e25f7ff..e8b0608 100644 --- a/src/components/SearchDialog/index.vue +++ b/src/components/SearchDialog/index.vue @@ -2,68 +2,16 @@ + class="file-search-dialog">
- -
-
- 搜索路径:{{ currentPath }} - -
-
- - - :{{ sortText }} - - - - 按相关度升序 - - - 按相关度降序 - - - 修改时间升序 - - - 修改时间降序 - - - 文件大小升序 - - - 文件大小降序 - - - -
-
- -