mirror of
https://github.com/MetinSeylan/Vue-Socket.io.git
synced 2025-04-16 15:21:28 +02:00
cat added
This commit is contained in:
parent
cb5055d51a
commit
b8cea1d589
1 changed files with 9 additions and 3 deletions
12
README.md
12
README.md
|
@ -1,6 +1,6 @@
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/MetinSeylan/Vue-Socket.io" target="_blank">
|
<a href="https://github.com/MetinSeylan/Vue-Socket.io" target="_blank">
|
||||||
<img width="250"src="https://raw.githubusercontent.com/MetinSeylan/Vue-Socket.io/Refactoring3/docs/logo.png">
|
<img width="250" src="https://raw.githubusercontent.com/MetinSeylan/Vue-Socket.io/Refactoring3/docs/logo.png">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ vuex.mutationPrefix|String |`null`|Optional|Prefix for emitting server side vuex
|
||||||
|
|
||||||
#### 🌈 Component Level Usage
|
#### 🌈 Component Level Usage
|
||||||
|
|
||||||
<p>if you want listen socket events from component side, you have to add `sockets` object in Vue component, and every function will start listen events, depends on object key</p>
|
<p>If you want to listen socket events from component side, you need to add `sockets` object in Vue component, and every function will start to listen events, depends on object key</p>
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
new Vue({
|
new Vue({
|
||||||
|
@ -80,7 +80,7 @@ new Vue({
|
||||||
|
|
||||||
##### Dynamic Listenlers
|
##### Dynamic Listenlers
|
||||||
|
|
||||||
<p>if you need consuming events dynamically in runtime, you can use `subscribe` and `unsubscribe` methods in Vue component</p>
|
<p>If you need consuming events dynamically in runtime, you can use `subscribe` and `unsubscribe` methods in Vue component</p>
|
||||||
|
|
||||||
``` javascript
|
``` javascript
|
||||||
this.sockets.subscribe('EVENT_NAME', (data) => {
|
this.sockets.subscribe('EVENT_NAME', (data) => {
|
||||||
|
@ -113,3 +113,9 @@ export default new Vuex.Store({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://github.com/MetinSeylan/Vue-Socket.io" target="_blank">
|
||||||
|
<img src="https://media.giphy.com/media/11jlnltQgUi2mQ/giphy.gif">
|
||||||
|
</a>
|
||||||
|
</p>
|
Loading…
Add table
Reference in a new issue