当前位置: 首页 > news >正文

网站产品管理模块/seo工资待遇 seo工资多少

网站产品管理模块,seo工资待遇 seo工资多少,县城做网站的多么,网站备案制作uni-app之数据缓存数据缓存uni.setStorageuni.setStorageSyncuni.getStorageuni.getStorageSyncuni.removeStorageuni.removeStorageSync数据缓存 uni.setStorage 官方文档 将数据存储在本地缓存中指定的 key 中,会覆盖掉原来该 key 对应的内容,这是一…

uni-app之数据缓存

  • 数据缓存
    • uni.setStorage
    • uni.setStorageSync
    • uni.getStorage
    • uni.getStorageSync
    • uni.removeStorage
    • uni.removeStorageSync

数据缓存

uni.setStorage

官方文档

将数据存储在本地缓存中指定的 key 中,会覆盖掉原来该 key 对应的内容,这是一个异步接口。

代码演示

<template><view><button type="primary" @click="setStor">存储数据</button></view>
</template><script>export default {methods: {setStor () {uni.setStorage({key: 'id',data: 100,success () {console.log('存储成功')}})}}}
</script><style>
</style>

uni.setStorageSync

将 data 存储在本地缓存中指定的 key 中,会覆盖掉原来该 key 对应的内容,这是一个同步接口。

代码演示

<template><view><button type="primary" @click="setStor">存储数据</button></view>
</template><script>export default {methods: {setStor () {uni.setStorageSync('id',100)}}}
</script><style>
</style>

uni.getStorage

从本地缓存中异步获取指定 key 对应的内容。

代码演示

<template><view><button type="primary" @click="getStorage">获取数据</button></view>
</template>
<script>export default {data () {return {id: ''}},methods: {getStorage () {uni.getStorage({key: 'id',success:  res=>{this.id = res.data}})}}}
</script>

uni.getStorageSync

从本地缓存中同步获取指定 key 对应的内容。

代码演示

<template><view><button type="primary" @click="getStorage">获取数据</button></view>
</template>
<script>export default {methods: {getStorage () {const id = uni.getStorageSync('id')console.log(id)}}}
</script>

uni.removeStorage

从本地缓存中异步移除指定 key。

代码演示

<template><view><button type="primary" @click="removeStorage">删除数据</button></view>
</template>
<script>export default {methods: {removeStorage () {uni.removeStorage({key: 'id',success: function () {console.log('删除成功')}})}}}
</script>

uni.removeStorageSync

从本地缓存中同步移除指定 key。

代码演示

<template><view><button type="primary" @click="removeStorage">删除数据</button></view>
</template>
<script>export default {methods: {removeStorage () {uni.removeStorageSync('id')}}}
</script>
http://www.lbrq.cn/news/1298251.html

相关文章:

  • 延安网站建设/seo是指什么职位
  • 网站如何改字体/市场营销案例100例
  • 做网站要准备的资料/营销策略是什么意思
  • 百度网站建设是什么意思/衡水今日头条新闻
  • 网站建设怎么做网站/站长工具官网
  • 网站建设与推广是什么/免费推广网站大全下载
  • 自贡网站建设/seo的优化方向
  • 做网站公司 营销/网站排名优化怎样做
  • 工商服务平台/太原seo优化公司
  • 做设计必看十大网站/seo自动优化软件
  • 网站建设 目的 意义 政策/厦门seo新站策划
  • axure怎么做网站原型/下载百度2024最新版
  • 如何k掉网站/宁波seo推广方式排名
  • wordpress后台修改默认主题/优化大师免费安装下载
  • 对口网站怎么做/槐荫区网络营销seo
  • 网站建设方面书籍/seo关键字优化教程
  • 网站名称大全/网络营销题库案例题
  • 网站建设硬件需求/杭州seo网站建设靠谱
  • wordpress内网和外网/seo 视频
  • 金融网站框架模板/黑帽seo是什么
  • 厦门做商城网站/网站建设需要啥
  • 网站的维护与更新/线上营销策划案例
  • 做游戏网站用什么软件/东莞网络推广系统
  • 湛江网站建设/网站优化工具
  • 婚庆网站模板/打开网站搜索
  • 求可以做问卷测试的网站/黄页88网站推广方案
  • 网站建设需要平台/百度西安
  • 常用网站图标/如何优化关键词
  • 江苏建科建设监理有限公司网站/网络营销的未来发展趋势论文
  • 三亚网站制/优化大师电脑版官网
  • CS231n-2017 Lecture3线性分类器、最优化笔记
  • STM32-CAN
  • 25数据库三级备考自整理笔记
  • 跨域问题及解决方案
  • QML vscode语法高亮和颜色区分。
  • Spring学习笔记:Spring SPEL表达式语言深入的学习和使用