focus-content.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <div class="focus-content-com">
  3. <div class="focus-content-com_bg"></div>
  4. <div class="focus-content-com_slot">
  5. <slot/>
  6. </div>
  7. </div>
  8. </template>
  9. <script lang="ts">
  10. import {
  11. defineComponent,
  12. computed,
  13. onMounted,
  14. ref,
  15. reactive,
  16. watch,
  17. getCurrentInstance,
  18. ComponentInternalInstance,
  19. toRefs,
  20. nextTick
  21. } from 'vue'
  22. import {useStore} from 'vuex'
  23. import {useRouter, useRoute} from 'vue-router'
  24. import {ElMessage, ElMessageBox} from "element-plus";
  25. export default defineComponent({
  26. name: '',
  27. components: {},
  28. props: {
  29. title: {}
  30. },
  31. setup(props, {emit}) {
  32. const store = useStore();
  33. const router = useRouter();
  34. const route = useRoute();
  35. const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
  36. const state = reactive({
  37. expend: true
  38. })
  39. onMounted(() => {
  40. })
  41. return {
  42. ...toRefs(state),
  43. }
  44. },
  45. })
  46. </script>
  47. <style scoped lang="scss">
  48. .focus-content-com {
  49. width: 100%;
  50. position: relative;
  51. .focus-content-com_bg {
  52. position: absolute;
  53. z-index: 1;
  54. width: 100%;
  55. height: 100%;
  56. top: 0;
  57. left: 0;
  58. background: #FFFFFF;
  59. border: 1px solid #D6D6D6;
  60. }
  61. .focus-content-com_slot {
  62. position: absolute;
  63. z-index: 2;
  64. width: 100%;
  65. height: 100%;
  66. top: 0;
  67. left: 0;
  68. }
  69. }
  70. </style>