show.vue 532 B

123456789101112131415161718192021222324252627
  1. <template>
  2. <div>
  3. <SpinnerModal
  4. v-if="isLoading"
  5. :visible="true"
  6. />
  7. <CharacterEditor
  8. v-else
  9. action="view"
  10. :characterId="characterId"
  11. :initialValue="character"
  12. />
  13. </div>
  14. </template>
  15. <script setup>
  16. definePageMeta({
  17. name: "characterView",
  18. path: "/show/:characterId(\\d+)"
  19. })
  20. const characterId = _toString(useRoute("characterEdit").params?.characterId)
  21. const { data: character, isLoading } = useQuery(() => characterByIdQuery(characterId))
  22. </script>
  23. <style scoped></style>