Home  >  Article  >  Web Front-end  >  Detailed example of chat room for communication between father and son in vue component

Detailed example of chat room for communication between father and son in vue component

小云云
小云云Original
2017-12-26 13:28:151929browse

This article mainly introduces in detail the creation of a comprehensive practice chat room for parent-child communication in the Vue component. It has a certain reference value. Interested friends can refer to it. I hope it can help everyone.




 
 
 组件父子间通信之综合练习
 
 

{{msg}}

Comprehensive exercise on inter-component communication:
(props down, events up)
There are 2 components: chat-room, user-component
user-component is composed of label input button
chat-room is composed of two user-component and a list

① Call user-component in chat-room to specify the name of the label
② In user-component,
When the button is clicked, the information entered by the current user is sent to the chat-room component, and chat-room receives the data and displays it in the list

Code:





 
 
 

Related recommendations:

How to develop a chat room with PHP

Write multi-person real-time online chat with Node.js Room

How to create a simple chat room using php websocket

The above is the detailed content of Detailed example of chat room for communication between father and son in vue component. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn