SuperAPI AI 工具集

pinia

通用与其它

查看项目

更新于 10-16 05:50

技能介绍

用途:该技能用于在 Vue 3 应用中搭建和使用 Pinia 状态管理,覆盖创建 store、管理 state、getters、actions、插件、SSR、测试以及从 Vuex 迁移等任务。

主要能力:按 Pinia 官方文档结构组织内容,分为介绍、核心概念、食谱、SSR 与 API 参考。核心概念包含 defining-a-store、state、getters、actions、plugins、outside-component-usage;食谱包含 composables、composing-stores、hot-module-replacement、options-api、testing、vscode-snippets 及 v1-v2、v2-v3、Vuex 迁移;SSR 包含 index 与 nuxt;API 参考覆盖 createPinia、defineStore、acceptHMRUpdate、disposePinia、getActivePinia、mapActions、mapState、mapStores、mapWritableState、setMapStoreSuffix 等函数,以及 Store、StoreState、StoreGetters、StoreActions 等接口,另含 @pinia/nuxt 与 @pinia/testing 的 API。

使用方式:先根据用户请求判断主题,再加载 examples/ 或 api/ 下对应文件,按其中的语法、结构与最佳实践执行;必要时参考官方文档链接。

适用场景:Vue 3 组件间共享状态、组合式与选项式 API、SSR/Nuxt、插件持久化、store 测试、Vuex 迁移。

限制:资料未提供安装命令、版本要求、收费与价格信息,暂未提供。