diff --git a/ldcake-ui/index.js b/ldcake-ui/index.js index ffefeca1596ca7a23154f30187bfb8513aabef6b..91a9424d99a59ff2a044004f72a2a66f6a14b8b0 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 c16556bec5a2af83023eda39053f71d9e5558532..f31e73cc463dafcf752bc2e14d73f54e5d144be9 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 36130e1df9a327fedc3e84836b8d71b28ac09bf6..4607d853f1d75e4d607ae52ed948e60a125fdd98 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 929b221599f2f18b115b309823a5077c1212e696..d88cf238a7d44f606f6db12bf3606259a3e1e8fc 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 diff --git a/ldcake-ui/package.json b/ldcake-ui/package.json index 9e607129608cff030cbb31f97ee414d3cdc706c9..7c0bdddd253c10af276826652b15a57a693c7063 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": {