缓存 - 删除缓存

删除缓存

#removeStorage
  • 示例代码:
<template>
    <div class="wrapper">
        <text @click="cacheHandler">removeStorage: 移除缓存</text>
    </div>
</template>
<script>
export default {
    data:()=> ({
        name: 'removeStorage',
    }),
    methods: {
        removeStorage() {
            //移除缓存
            this
            .$storage
            .removeStorage('name')
            .then((res)=> {
                this.$toast(res)
            })
        }
    }
}
</script>
<style scoped>
.wrapper{
    background-color: #ffffff;
}
</style>

#参数

  • 参数详情:
Params Type Required default Value
key String Y - 要移除的key值
posted on 2024-12-13 09:19  AtlasLapetos  阅读(11)  评论(0)    收藏  举报