From 41f31a0ced5567608726f58942d1fecb28efbf6c Mon Sep 17 00:00:00 2001 From: Julian Leucker <leuckerj@gmail.com> Date: Wed, 8 Feb 2023 18:34:54 +0100 Subject: [PATCH] Rename Grid to DragGrid --- docs/.vuepress/config.js | 2 +- docs/components/DragGrid.md | 7 +++++++ docs/components/grid.md | 7 ------- example/src/App.vue | 14 +++++++------- src/{Grid.vue => DragGrid.vue} | 2 +- src/components.js | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) create mode 100644 docs/components/DragGrid.md delete mode 100644 docs/components/grid.md rename src/{Grid.vue => DragGrid.vue} (99%) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 3eee8fc..2cda3b8 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -7,7 +7,7 @@ module.exports = { title: 'Components', collapsable: false, children: [ - '/components/grid.md', + '/components/DragGrid.md', ] } ] diff --git a/docs/components/DragGrid.md b/docs/components/DragGrid.md new file mode 100644 index 0000000..e8fe7d0 --- /dev/null +++ b/docs/components/DragGrid.md @@ -0,0 +1,7 @@ +# DragGrid + +`DragGrid` is a cool component. Here's how to use it... + +<template> + <DragGrid :rows="5" :cols="5" v-model="items"></DragGrid> +</template> \ No newline at end of file diff --git a/docs/components/grid.md b/docs/components/grid.md deleted file mode 100644 index bbf8e0e..0000000 --- a/docs/components/grid.md +++ /dev/null @@ -1,7 +0,0 @@ -# component - -`Component` is a cool component. Here's how to use it... - -<template> - <component /> -</template> \ No newline at end of file diff --git a/example/src/App.vue b/example/src/App.vue index 4adf162..bb1db44 100644 --- a/example/src/App.vue +++ b/example/src/App.vue @@ -1,23 +1,23 @@ <script setup> -import Grid from "../../src/Grid.vue"; +import DragGrid from "../../src/DragGrid.vue"; import CircularCard from "./components/CircularCard.vue"; </script> <template> <div id="app"> - <Grid :rows="5" :cols="5" :pos-validation="blockField" v-model="items"> + <DragGrid :rows="5" :cols="5" :pos-validation="blockField" v-model="items"> <div id="blocker"> This field is blocked because it's filled, the next one programmatically </div> <template #item="item"> <div class="container">{{ item }}</div> </template> - </Grid> - <Grid :rows="3" :cols="3" v-model="ticTacToe" class="tic-tac-toe"> + </DragGrid> + <DragGrid :rows="3" :cols="3" v-model="ticTacToe" class="tic-tac-toe"> <template #item="item"> - <CircularCard> {{ item.key.startsWith("a") ? "X" : "O"}}</CircularCard> + <CircularCard> {{ item.key.startsWith("a") ? "X" : "O" }}</CircularCard> </template> - </Grid> + </DragGrid> </div> </template> @@ -59,7 +59,7 @@ export default { { x: 3, y: 3, w: 1, h: 1, key: "b1", data: {} }, { x: 1, y: 2, w: 1, h: 1, key: "b2", data: {} }, { x: 3, y: 1, w: 1, h: 1, key: "b3", data: {} }, - ] + ], }; }, }; diff --git a/src/Grid.vue b/src/DragGrid.vue similarity index 99% rename from src/Grid.vue rename to src/DragGrid.vue index 1a8512a..ee31af1 100644 --- a/src/Grid.vue +++ b/src/DragGrid.vue @@ -38,7 +38,7 @@ import DragContainer from "./DragContainer.vue"; export default { - name: "Grid", + name: "DragGrid", components: { DragContainer, }, diff --git a/src/components.js b/src/components.js index e87f7cc..b8ed057 100644 --- a/src/components.js +++ b/src/components.js @@ -1,4 +1,4 @@ import DragContainer from "./DragContainer.vue"; -import Grid from "./Grid.vue"; +import DragGrid from "./DragGrid.vue"; -export default { DragContainer, Grid }; +export default { DragContainer, DragGrid }; -- GitLab