From a44d7b37c5c5d108ec05f87d64324d7a80574b20 Mon Sep 17 00:00:00 2001 From: jmal Date: Tue, 18 Feb 2020 18:04:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 3 +- src/utils/number.js | 4 +- src/views/home/mobile/index.vue | 1056 +++++++------------------------ 3 files changed, 221 insertions(+), 842 deletions(-) diff --git a/src/main.js b/src/main.js index 9d4a1a0..e53b667 100644 --- a/src/main.js +++ b/src/main.js @@ -14,7 +14,7 @@ import store from './store' import router from './router' // import WeVue from 'we-vue' // import 'we-vue/lib/style.css' -import { Button, Cell, CellGroup, Image, List, PullRefresh, SwipeCell, Col, Row, Divider } from 'vant'; +import { Button, Cell, CellGroup, Image, List, PullRefresh, SwipeCell, Col, Row, Divider, Sticky } from 'vant'; import '@/icons' // icon import '@/permission' // permission control @@ -49,6 +49,7 @@ Vue.use(SwipeCell); Vue.use(Col); Vue.use(Row); Vue.use(Divider); +Vue.use(Sticky); Vue.use(uploader) Vue.use(EVueContextmenu) diff --git a/src/utils/number.js b/src/utils/number.js index 32be4ca..556655d 100644 --- a/src/utils/number.js +++ b/src/utils/number.js @@ -98,7 +98,9 @@ export function formatTime(agoTime) { } export function formatSize(size) { - if (size < 1024) { + if (size === 0) { + return '' + } else if (size < 1024) { return size + 'B' } else if (size < 1024 * 1024) { return (size/1024).toFixed(2) + 'k' diff --git a/src/views/home/mobile/index.vue b/src/views/home/mobile/index.vue index 614caba..ee76a08 100644 --- a/src/views/home/mobile/index.vue +++ b/src/views/home/mobile/index.vue @@ -1,866 +1,242 @@ - - -