basic card display

This commit is contained in:
2024-04-05 18:48:37 +02:00
parent 3657d6a888
commit 05d711644d
4 changed files with 15 additions and 13 deletions
+3 -3
View File
@@ -1,12 +1,12 @@
<script setup lang="ts">
import { reactive, ref } from 'vue';
const cards = reactive<{ [key: string]: any }>({})
import { ref } from 'vue';
const cards = useState<{ [key: string]: any }>('cards', () => ({}))
let game = ref<any>({})
const socket = new WebSocket("ws://127.0.0.1:8765")
const createObject = {
"card": (data: any) => {
cards[data.uuid] = data
cards.value[data.uuid] = data
},
"player": () => { },
"game": (data: any) => { game.value = data },