uniapp清除缓存
发表于|更新于
|浏览量:
每一幅作品,都是艺术家对自己生命的延伸。——灵遁者
清楚缓存的函数为uni.clearStorage();
以及还有计算缓存大小的函数
1 | uni.getStorageInfo({ |
success 返回参数说明
| 参数 | 类型 | 说明 |
|---|---|---|
| keys | Array<String> | 当前 storage 中所有的 key |
| currentSize | Number | 当前占用的空间大小, 单位:kb |
| limitSize | Number | 限制的空间大小, 单位:kb |
相关推荐
2022-05-23
mac鱼眼效果
人不能象走兽那样活着,应该追求知识和美德。——但丁 上代码,上效果: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style ...
2024-11-02
typescript-exercises(七)
若我会见到你,事隔经年。我如何和你招呼,以眼泪,以沉默。——《春逝》 题目: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125/*Intro: Filtering was completely removed from the project. It turned out that this feature was just not needed for the end-user and we spent a lot of time just because our offi...
2024-08-18
Apache-ShenYu支持namespace功能(二)
我曾踏足山巅,也曾进入低谷,二者都让我受益良多。——《英雄联盟》瓦洛兰之盾塔里克 上一期:Apache-ShenYu支持namespace功能 喜闻乐见,这是个连续系列,今天主要是给shenyu-dashboard的selector部分添加namespace适配 PR连接: https://github.com/apache/shenyu-dashboard/pull/471 这里有一个知识点 123456import { connect } from "dva";@connect(({ global }) => ({ currentNamespaceId: global.currentNamespaceId,}))class RuleCopy extends Component {} 装饰器语法 @connect 来连接组件与 dva 的状态管理。@connect 是一个高阶函数,通常用于将 Redux store(在 dva 中表现为 model)中的状态映射到组...
2021-11-23
export default和module.exports
我期望理解,但是也慢慢地感受到了一种责任,给予比接受伟大,去爱比被爱伟大。 ——海明威 我们在vue项目中创建两个js 在util.js中写入 123export default { ruben: 'ruben'} 在api.js中写入 123module.exports = { vampire: 'vampire'} 我们再来一个页面中使用两种方式引用 123456789101112131415<script>import util from '@/common/util.js';import api from '@/common/api.js'const util1 = require('@/common/util.js')const api1 = require('@/common/api.js')export default{ created(){ co...
2024-11-07
typescript-exercises(十二)
人民是土壤,它含有要切事物发展所必需的生命汁液;而个人则是这土壤上的花朵与果实。——别林斯基 题目: 123declare module 'stats' { export function getMaxIndex(input: unknown, comparator: unknown): unknown;} 报错: 123456789101112131415index.ts(3,5): error TS2305: Module '"stats"' has no exported member 'getMaxElement'.index.ts(4,5): error TS2724: Module '"stats"' has no exported member 'getMinIndex'. Did you mean 'getMaxIndex'?index.ts(5,5): error TS23...
2022-01-02
图片懒加载
如果你只读每个人都在读的书,你也只能想到每个人都能想到的事。——村上春树 首先贴代码: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566<!DOCTYPE html><html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> .ruben { width: 400px; height: 300px; background-color: #e8e8e8 } .ruben img { width: 100%; height: 100%; } </style> <...
