mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
feat: accept graph sent from server
This commit is contained in:
1 parent
45813ebbc0
commit
54592831ee
1 file changed
+9
-1
@@ -1,6 +1,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
import FileNode from './FileNode.vue'
|
import FileNode from './FileNode.vue'
|
||||||
|
import socket from '../utils/socket.js'
|
||||||
|
|
||||||
const graph = ref({
|
const graph = ref({
|
||||||
path: '/',
|
path: '/',
|
||||||
@@ -52,6 +53,13 @@ const graph = ref({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
socket.on('graph', (event) => {
|
||||||
|
// TODO: update graph
|
||||||
|
console.log(event)
|
||||||
|
})
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
Reference in new issue
Block a user