From 9dd7f236d57b0e70647a84ba01fa4fc6d5e88e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B0=8F=E6=9C=AF?= Date: Mon, 12 Apr 2021 15:15:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9C=A8=20=E6=9B=B4=E6=96=B0=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ldcake-ui/index.js | 7 +++---- ldcake-ui/libs/utils/cache.js | 7 +++++++ ldcake-ui/libs/utils/common.js | 6 ++++++ ldcake-ui/libs/utils/storage.js | 8 ++++++++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ldcake-ui/index.js b/ldcake-ui/index.js index ffefeca..91a9424 100644 --- a/ldcake-ui/index.js +++ b/ldcake-ui/index.js @@ -3,12 +3,11 @@ import color from './libs/config/color.js' import common from './libs/utils/common.js' import cache from './libs/utils/cache.js' import storage from './libs/utils/storage.js' - const $c = { color, - common, - storage, - cache, + ...common, + ...storage, + ...cache, } const install = Vue => { diff --git a/ldcake-ui/libs/utils/cache.js b/ldcake-ui/libs/utils/cache.js index c16556b..f31e73c 100644 --- a/ldcake-ui/libs/utils/cache.js +++ b/ldcake-ui/libs/utils/cache.js @@ -67,3 +67,10 @@ export const clearCache = () => { const getCacheKey = (k) => { return `${k}`.toUpperCase() } + +export default { + setCache, + getCache, + removeCache, + clearCache +} \ No newline at end of file diff --git a/ldcake-ui/libs/utils/common.js b/ldcake-ui/libs/utils/common.js index 36130e1..4607d85 100644 --- a/ldcake-ui/libs/utils/common.js +++ b/ldcake-ui/libs/utils/common.js @@ -11,4 +11,10 @@ export const px2rpx = (px) => { // 判断数据是否为空 export const isEmpty = (val) => { return !(!!val ? typeof val === 'object' ? Array.isArray(val) ? !!val.length : !!Object.keys(val).length : true : false); +} + +export default { + rpx2px, + px2rpx, + isEmpty, } \ No newline at end of file diff --git a/ldcake-ui/libs/utils/storage.js b/ldcake-ui/libs/utils/storage.js index 929b221..d88cf23 100644 --- a/ldcake-ui/libs/utils/storage.js +++ b/ldcake-ui/libs/utils/storage.js @@ -25,3 +25,11 @@ export const clearStorage = () => { const getStorageKey = (k) => { return `${config['name']}_${k}`.toUpperCase() } + +export default { + getStorageInfo, + setStorage, + getStorage, + removeStorage, + clearStorage +} \ No newline at end of file -- Gitee From a73cfd68d5dcacebd0e0a6d2ada2fddd3bdc0626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B0=8F=E6=9C=AF?= Date: Mon, 12 Apr 2021 15:16:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=AA=90=20=E6=9B=B4=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ldcake-ui/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldcake-ui/package.json b/ldcake-ui/package.json index 9e60712..7c0bddd 100644 --- a/ldcake-ui/package.json +++ b/ldcake-ui/package.json @@ -1,6 +1,6 @@ { "name": "ldcake-ui", - "version": "1.0.7", + "version": "1.0.8", "description": "基于uni-app的UI组件库", "main": "index.js", "scripts": { -- Gitee