缓存 - 获取所有缓存key值

获取所有缓存key值

#getAllKeys
  • 示例代码:
<template>
    <div class="wrapper">
        <text @click="cacheHandler">getAllKeys: 获取所有缓存key值</text>
    </div>
</template>
<script>
export default {
    data:()=> ({
        name: 'getAllKeys',
    }),
    methods: {
        cacheHandler() {
            //获取所有缓存key值
            this
            .$storage
            .getAllKeys()
            .then((res)=> {
                this.$toast(res)
            })
        }
    }
}
</script>
<style scoped>
.wrapper{
    background-color: #ffffff;
}
</style>
posted on 2024-12-13 09:19  AtlasLapetos  阅读(13)  评论(0)    收藏  举报