From f57efc09235bace14eb00d1c1f4e803a1238dad5 Mon Sep 17 00:00:00 2001 From: jmal Date: Fri, 6 Jan 2023 11:59:17 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E4=BC=98=E5=8C=96=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=95=8C=E9=9D=A2=E7=9A=84=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ShowFile/ShowFile.vue | 26 +++++++++++++++++--------- src/styles/home-index.scss | 7 +------ src/views/fileType/audio.vue | 2 +- src/views/fileType/document.vue | 2 +- src/views/recently/index.vue | 2 +- 5 files changed, 21 insertions(+), 18 deletions(-) diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index e36830e..e53985f 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -315,7 +315,7 @@ + :style="{'width':'100%','max-height': clientHeight-25+'px','overflow':'auto', 'box-shadow': fileListScrollTop > 0 ? '#a5a7a8 0px 0px 3px' : '#ffffff 0px 0px 0px'}"> @@ -701,7 +701,7 @@ export default { pageLoadCompleteList: [], pagination: { pageIndex: 1, - pageSize: 51, + pageSize: 50, total: 0, pageSizes: [10, 20, 30, 40, 50] }, @@ -862,14 +862,21 @@ export default { // 加载布局 if (this.$route.query.vmode) { this.vmode = this.$route.query.vmode - if (this.vmode === 'list') { - this.grid = false - this.lessClientHeight = 140 + } else { + if (this.defaultGrid) { + this.vmode === 'grid' } else { - this.grid = true - this.lessClientHeight = 106 + this.vmode === 'list' } } + if (this.vmode === 'list') { + this.grid = false + this.lessClientHeight = 140 + } else { + this.grid = true + this.lessClientHeight = 106 + this.containerResize() + } // 加载url上的path if (this.$route.query.path !== '/') { const path = decodeURI(this.$route.query.path) @@ -886,8 +893,6 @@ export default { window.onresize = function () { that.clientHeight = document.documentElement.clientHeight - that.lessClientHeight } - // 画矩形选区 - this.darwRectangle() Bus.$on('msg/file/change', (msg) => this.onmessage(msg)) }, @@ -1024,6 +1029,9 @@ export default { } else { this.showSizeItem = true } + let gridRowNum = Math.round(this.clientHeight/ (clientWidth/this.gridColumnNum)) + this.pagination.pageSize = gridRowNum * this.gridColumnNum + this.gridColumnNum + // 使列表可拖拽 this.rowDrop() this.darwRectangle() diff --git a/src/styles/home-index.scss b/src/styles/home-index.scss index d64d132..d1b6c85 100644 --- a/src/styles/home-index.scss +++ b/src/styles/home-index.scss @@ -9,11 +9,6 @@ } } ->>>.svg-icon { - margin-top: 0.05em; - // vertical-align: unset; -} - .redirect { color: #97a8be; } @@ -288,7 +283,7 @@ } >>> .van-grid { - padding: 20px 0 0 20px; + padding: 0; } >>> .van-grid-item__content .svg-icon{ diff --git a/src/views/fileType/audio.vue b/src/views/fileType/audio.vue index 9950578..2514662 100644 --- a/src/views/fileType/audio.vue +++ b/src/views/fileType/audio.vue @@ -3,7 +3,7 @@