- uni-app 获取缓存数据,修改数据会自动更新缓存(默认为异步获取缓存数据)
pnpm add uni-use-cache
yarn add uni-use-cache
npm install uni-use-cache
import useCache from 'uni-use-cache'
const data = useCache('key', ref())
const data1 = useCache('key1', ref(), true)
const data2 = useCache('key2', reactive({}))