From a6f45eda3cd9e1a972bf267d1a413181da7b2de9 Mon Sep 17 00:00:00 2001 From: wally <18603454788@163.com> Date: Tue, 7 Sep 2021 16:14:36 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=B8=85=E7=A9=BA=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E5=90=8C=E6=AD=A5=EF=BC=9B=E5=88=A0=E9=99=A4=E4=B8=8D?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E7=9A=84package.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 ++- src/package.json | 37 ------------------------------------- src/utils/storage.js | 10 ++-------- 3 files changed, 4 insertions(+), 46 deletions(-) delete mode 100644 src/package.json diff --git a/CHANGELOG.md b/CHANGELOG.md index ec522b0..142c79d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 0.1.0 (2021-09-06) +# 0.1.0 (2021-09-07) ### 🌟 新功能 范围|描述|commitId @@ -225,6 +225,7 @@ - | env host修改 | a79a4a5 - | merge globals | b0957cc - | merge wrr | 5ccc7a5 + - | merge wrr lucky | 959ae05 - | mock | 51c24a5 node-sass | 替换node-sass为sass(dart-sass) | c33169d package manifest | 去掉了摇树 | f7c1dd4 diff --git a/src/package.json b/src/package.json deleted file mode 100644 index 743d5c5..0000000 --- a/src/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "pages": [ - { - "path": "pages/index/index", - "style": { - "navigationStyle": "custom" , - "navigationBarTextStyle": "white" - } - }, - { - "path": "pages/project/project", - "style": { - "navigationStyle": "custom" , - "navigationBarTextStyle": "white" - } - }, - { - "path": "pages/test/test", - "style": { - "navigationBarTitleText": "测试" - } - } - ], - "globalStyle": { - "navigationBarTextStyle": "black", - "navigationBarTitleText": "TALL", - "navigationBarBackgroundColor": "#F8F8F8", - "backgroundColor": "#F8F8F8" - }, - "easycom": { - "autoscan": true, - "custom": { - "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue", - "^p-(.*)": "@/plugins/p-$1/p-$1.vue" - } - } -} diff --git a/src/utils/storage.js b/src/utils/storage.js index ea672d6..e3c3bce 100644 --- a/src/utils/storage.js +++ b/src/utils/storage.js @@ -92,20 +92,14 @@ export default { }); }, - /** - * 清楚全部数据 异步 - */ - clearStorage() { - uni.clearStorage(); - }, - // 检测local Storage容量 超出容量清空数据缓存 checkCapacity() { /* #ifdef H5 */ const capacity = JSON.stringify(localStorage).length; let max = 1024 * 1024 * 4; + console.log('capacity: ', capacity, max); if (capacity >= max) { - uni.$t.storage.clearStorage(); + uni.clearStorageSync(); } /* #endif */ },