ModuleCommon.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <ventBox1 class="module-common" :style="style">
  3. <template #title>
  4. <div>{{ moduleName }}</div>
  5. </template>
  6. <template #container>
  7. <slot></slot>
  8. </template>
  9. </ventBox1>
  10. </template>
  11. <script lang="ts" setup>
  12. // import ModuleLeft from './original/moduleLeft.vue';
  13. // import ModuleBottom from './original/moduleBottom.vue';
  14. import { computed } from 'vue';
  15. import { ShowStyle } from '../../../deviceManager/configurationTable/types';
  16. import ventBox1 from '/@/components/vent/ventBox1.vue';
  17. const props = defineProps<{
  18. showStyle: ShowStyle;
  19. moduleName: string;
  20. visible: boolean;
  21. }>();
  22. defineEmits(['close']);
  23. const style = computed(() => {
  24. const size = props.showStyle.size;
  25. const position = props.showStyle.position;
  26. return size + position + 'position: absolute;';
  27. });
  28. // 根据配置里的定位判断应该使用哪个module组件
  29. // function getModuleComponent(position) {
  30. // if (position === '中下') {
  31. // return ModuleBottom;
  32. // }
  33. // return ModuleLeft;
  34. // }
  35. </script>
  36. <style scoped>
  37. .module-common .box1-center {
  38. height: calc(100% - 70px);
  39. }
  40. :deep(.box1-center) {
  41. height: calc(100% - 70px);
  42. }
  43. :deep(.box1-center > .box-container) {
  44. height: 100%;
  45. padding: 0 !important;
  46. width: 100% !important;
  47. }
  48. </style>