启用pinia集成 在main.js | main.ts中导入pinia的配置文件。 // useSocketStore为pinia的socket配置文件import{useSocketStoreWithOut}from'./useSocketStore';conststore=useSocketStoreWithOut();app.use(VueNativeSock,"",{store:store})
对Pinia进行兼容处理(感谢@chuck所提供的兼容代码)插件安装yarn add vue-native-websocket-vue3 # or npm install vue-native-websocket-vue3 --save插件使用如果你的项目启用了TypeScript,则在main.ts文件中导入并使用插件。没有启用就在main.js中导入并使用。使用插件时,第二个参数为必填项,是你的websocket服务...
A free, fast, and reliable CDN for vue-native-websocket-vue3. 支持vue3和vuex、pinia的websocket插件
支持vue3的websocket插件. Contribute to likaia/vue-native-websocket-vue3 development by creating an account on GitHub.