| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <template>
- <div :style="style">
- <Header :deviceType="deviceType" :moduleData="moduleData" :data="data" @select="selectedData = $event" />
- <Content :style="{ height: header.show ? 'calc(100% - 30px)' : '100%' }" :moduleData="moduleData" :data="selectedData" />
- </div>
- </template>
- <script lang="ts" setup>
- import Header from '/@/views/vent/home/configurable/components/header.vue';
- import Content from '/@/views/vent/home/configurable/components/content.vue';
- // import ModuleLeft from './original/moduleLeft.vue';
- // import ModuleBottom from './original/moduleBottom.vue';
- import { computed, ref } from 'vue';
- // import { ModuleProps } from '../types';
- const props = defineProps<{
- /** 配置的详细模块信息 */
- moduleData: any;
- /** 配置的详细样式信息 */
- showStyle: any;
- /** 该模块配置中的设备标识符 */
- deviceType: string;
- /** api返回的数据 */
- data: any;
- moduleName: string;
- visible: boolean;
- }>();
- defineEmits(['close', 'click']);
- const { header } = props.moduleData;
- const selectedData = ref();
- const style = computed(() => {
- const size = props.showStyle.size;
- const position = props.showStyle.position;
- return size + position + 'pointer-events: auto;';
- });
- </script>
- <style lang="less" scoped>
- @import '/@/design/theme.less';
- </style>
|