DashboardContainer.vue 965 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <div :class="{ none: !$slots.default}" class="dashboard-container" ref="page">
  3. <slot></slot>
  4. <div v-if="!props.hide" class="wow home-main">
  5. <slot name="center"></slot>
  6. </div>
  7. </div>
  8. </template>
  9. <script setup>
  10. import { onMounted } from 'vue';
  11. import WOW from 'wow.js';
  12. const page = ref(null)
  13. const props = defineProps({
  14. hide: {
  15. type: Boolean,
  16. default: false,
  17. },
  18. });
  19. onMounted(() => {
  20. const wow = new WOW();
  21. wow.init();
  22. });
  23. defineExpose({
  24. getRoot: () => page.value
  25. })
  26. </script>
  27. <style lang="scss" scoped>
  28. .dashboard-container {
  29. position: relative;
  30. width: 100%;
  31. background: url('../../../../assets/images/bg-99b6904c.png');
  32. background-size: 100% 100%;
  33. overflow: auto;
  34. &.none {
  35. .home-main {
  36. padding-top: 20px;
  37. }
  38. }
  39. .home-main {
  40. width: 100%;
  41. padding: 100px 10px 10px;
  42. box-sizing: border-box;
  43. }
  44. }
  45. </style>