background picture of the home page

“没有绝世神功”

一个行者, 不等风, 只追梦

Vue 3组件通信13种方法

本文详细介绍了Vue 3中13种组件通信方法,从基础到高级,帮助开发者选择最适合的通信方式。主要方法包括:父组件向子组件传递数据(Props)、子组件向父组件传递数据(Emit)、兄弟组件通信(Mitt事件总线)、透传Attributes($attrs)、模板引用(Refs)、双向绑定(v-model)、依赖注入(Provide/Inject)、路由传参、Vuex和Pinia状态管理、浏览器存储(localStorage/sessionStorage)、Window对象和全局属性。这些方法覆盖了从简单父子组件到复杂跨组件通信的各种场景,为不同需求提供了灵活的解决方案。

thumbnail of the cover of the post

docker 部署wordpress

安装docker # 安装所需依赖 sudo yum install -y yum-utils device-mapper-persistent-data lvm2 # 添加Docker仓库 sudo yum-config-manager --add-repo https://download.

thumbnail of the cover of the post

微信小程序仿chatGpt流式输出效果

使用wx.request的enableChunked: true,实现流式传输,通过定时器实现聊天交互效果 UI框架使用vant-weapp 重点问题: 1.在流式请求时因为延迟显示打字效果,导致流式数据返回后处理顺序错乱,我们需要一个缓冲队列来保存这些数据 2.输入每个字的时候

thumbnail of the cover of the post