form.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <script setup lang="ts">
  2. import { preferences } from '@vben/preferences';
  3. import { Copyright } from '../basic/copyright';
  4. import Toolbar from './toolbar.vue';
  5. defineOptions({
  6. name: 'AuthenticationFormView',
  7. });
  8. </script>
  9. <template>
  10. <div
  11. class="flex-col-center bg-background-deep relative px-6 py-10 lg:flex-initial lg:px-8"
  12. >
  13. <!-- Toolbar Slot -->
  14. <slot name="toolbar">
  15. <Toolbar />
  16. </slot>
  17. <!-- Router View with Transition and KeepAlive -->
  18. <RouterView v-slot="{ Component, route }">
  19. <Transition appear mode="out-in" name="slide-right">
  20. <KeepAlive :include="['Login']">
  21. <component
  22. :is="Component"
  23. :key="route.fullPath"
  24. class="enter-x mt-6 w-full sm:mx-auto md:max-w-md"
  25. />
  26. </KeepAlive>
  27. </Transition>
  28. </RouterView>
  29. <!-- Footer Copyright -->
  30. <div
  31. class="text-muted-foreground absolute bottom-3 flex text-center text-xs"
  32. >
  33. <Copyright
  34. v-if="preferences.copyright.enable"
  35. v-bind="preferences.copyright"
  36. />
  37. </div>
  38. </div>
  39. </template>