VueUse会话存储

VueUse session storage

使用VueUse时如何指定存储是本地存储还是会话存储?它似乎没有在文档中提到它 https://vueuse.org/core/usestorage/

useStorage() 的第三个参数指定要使用的存储。它默认使用 window.localStorage

要使用会话存储,请将 window.sessionStorage 作为存储参数传递:

useStorage(
  'my-storage-key',
  myInitialValue,
  window.sessionStorage, 
)