form.vue 966 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <script setup lang="ts">
  2. defineOptions({
  3. name: 'AuthenticationFormView',
  4. });
  5. defineProps<{
  6. dataSide?: 'bottom' | 'left' | 'right' | 'top';
  7. }>();
  8. </script>
  9. <template>
  10. <div
  11. class="relative flex-col-center bg-background px-6 py-10 lg:flex-initial lg:px-8 dark:bg-background-deep"
  12. >
  13. <slot></slot>
  14. <!-- Router View with Transition and KeepAlive -->
  15. <RouterView v-slot="{ Component, route }">
  16. <Transition appear mode="out-in" name="slide-right">
  17. <KeepAlive :include="['Login']">
  18. <component
  19. :is="Component"
  20. :key="route.fullPath"
  21. class="side-content mt-6 w-full sm:mx-auto md:max-w-md"
  22. :data-side="dataSide"
  23. />
  24. </KeepAlive>
  25. </Transition>
  26. </RouterView>
  27. <!-- Footer Copyright -->
  28. <div
  29. class="absolute bottom-3 flex text-center text-xs text-muted-foreground"
  30. >
  31. <slot name="copyright"> </slot>
  32. </div>
  33. </div>
  34. </template>