From 68b648bf185e69a3f72d15ef4a8f6f78643305fe Mon Sep 17 00:00:00 2001 From: Julian Leucker <leuckerj@gmail.com> Date: Wed, 8 Feb 2023 20:58:05 +0100 Subject: [PATCH] Fix example app --- example/src/App.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/example/src/App.vue b/example/src/App.vue index 3e9b92d..52ca46a 100644 --- a/example/src/App.vue +++ b/example/src/App.vue @@ -42,7 +42,7 @@ import CircularCard from "./components/CircularCard.vue"; > <template #item="item"> <CircularCard> - {{ item.key.startsWith("a") ? "X" : "O" }}</CircularCard + {{ item.data.text }}</CircularCard > </template> </DragGrid> @@ -64,7 +64,7 @@ export default { return false; }, randomKey(element) { - if (element.key !== "a" && element !== "b") return; + if (element.key.length !== 1) return; element.key += Math.random().toString(36).replace('0.', ''); }, }, @@ -89,12 +89,12 @@ export default { { x: 5, y: 3, w: 1, h: 1, key: "obj9", data: {} }, ], ticTacToe1: [ - { x: 1, y: 1, w: 1, h: 1, key: "a1", data: {} }, - { x: 3, y: 3, w: 1, h: 1, key: "b1", data: {} }, + { x: 1, y: 1, w: 1, h: 1, key: "a1", data: {text: "X"} }, + { x: 3, y: 3, w: 1, h: 1, key: "b1", data: {text: "O"} }, ], ticTacToe2: [ - { x: 1, y: 1, w: 1, h: 1, key: "a", data: {} }, - { x: 2, y: 1, w: 1, h: 1, key: "b", data: {} }, + { x: 1, y: 1, w: 1, h: 1, key: "a", data: {text: "X"} }, + { x: 2, y: 1, w: 1, h: 1, key: "b", data: {text: "O"} }, ], }; }, -- GitLab