aboutsummaryrefslogtreecommitdiffstats
path: root/components/Control/ItemStackForm.vue
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2024-03-10 01:31:42 +0000
committerLeonardo Bishop <me@leonardobishop.com>2024-03-10 01:31:42 +0000
commit71e4ad2c71efea471923ea47f01bfda841387f81 (patch)
treef08293fdc56b4eb2e3d0e520b79b4d8aad78924c /components/Control/ItemStackForm.vue
parent4495c02c41b95ce6df0c34dbf6ac62f7addae7a3 (diff)
Use nuxt auto import magic
Diffstat (limited to 'components/Control/ItemStackForm.vue')
-rw-r--r--components/Control/ItemStackForm.vue50
1 files changed, 0 insertions, 50 deletions
diff --git a/components/Control/ItemStackForm.vue b/components/Control/ItemStackForm.vue
deleted file mode 100644
index 250e8c9..0000000
--- a/components/Control/ItemStackForm.vue
+++ /dev/null
@@ -1,50 +0,0 @@
-<script setup lang="ts">
-import { computed } from 'vue';
-import materials from '@/lib/materials';
-
-const model = defineModel<any>();
-
-if (typeof model.value !== 'object' || model.value === null) {
- model.value = {};
-}
-
-const itemName = computed({
- get() {
- return model.value.name;
- },
- set(newValue: string) {
- model.value.name = newValue;
- },
-});
-
-const itemType = computed({
- get() {
- return model.value.type || model.value.material || model.value.item;
- },
- set(newValue: string) {
- if (model.value.material) {
- model.value.material = newValue;
- } else if (model.value.item) {
- model.value.item = newValue;
- } else {
- model.value.type = newValue;
- }
- },
-});
-</script>
-
-<template>
- <div class="option-group">
- <label for="itemstack-name">Name</label>
- <input id="itemstack-name" name="itemstack-name" v-model="itemName" placeholder="Enter a display name" />
- </div>
-
- <div class="option-group">
- <label for="itemstack-name">Type</label>
- <multiselect v-model="itemType"
- :options="materials" :searchable="true" placeholder="Choose a material" />
- </div>
-</template>
-
-<style scoped>
-</style> \ No newline at end of file