|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<!-- 常用模块 -->
|
|
|
- <ventBox1 class="module-common" :style="style">
|
|
|
+ <ventBox1 :class="getModuleClass(showStyle)" :style="style">
|
|
|
<template v-if="moduleName" #title>
|
|
|
<div :class="{ 'cursor-pointer': !!moduleData.to }" @click="redirectTo">{{ moduleName }}</div>
|
|
|
</template>
|
|
@@ -45,13 +45,14 @@
|
|
|
return size + position + 'position: absolute;';
|
|
|
});
|
|
|
|
|
|
- // 根据配置里的定位判断应该使用哪个module组件
|
|
|
- // function getModuleComponent(position) {
|
|
|
- // if (position === '中下') {
|
|
|
- // return ModuleBottom;
|
|
|
- // }
|
|
|
- // return ModuleLeft;
|
|
|
- // }
|
|
|
+ // 根据配置里的定位判断应该使用哪个class
|
|
|
+ function getModuleClass({ size, position }) {
|
|
|
+ const [_, width] = size.match(/width:([0-9]+)px/) || [];
|
|
|
+ if (position.includes('bottom') || parseInt(width) > 800) {
|
|
|
+ return 'module-common module-common-longer';
|
|
|
+ }
|
|
|
+ return 'module-common';
|
|
|
+ }
|
|
|
|
|
|
function redirectTo() {
|
|
|
const { to } = props.moduleData;
|
|
@@ -59,10 +60,13 @@
|
|
|
openWindow(to);
|
|
|
}
|
|
|
</script>
|
|
|
-<style scoped>
|
|
|
+<style lang="less" scoped>
|
|
|
+ @import '/@/design/theme.less';
|
|
|
+
|
|
|
.module-common .box1-center {
|
|
|
height: calc(100% - 70px);
|
|
|
}
|
|
|
+
|
|
|
:deep(.box1-center) {
|
|
|
height: calc(100% - 70px);
|
|
|
}
|
|
@@ -71,4 +75,24 @@
|
|
|
padding: 0 !important;
|
|
|
width: 100% !important;
|
|
|
}
|
|
|
+ @{theme-deepblue} {
|
|
|
+ .module-common-longer {
|
|
|
+ :deep(.box1-top) {
|
|
|
+ --image-box1-top: url('/@/assets/images/themify/deepblue/vent/border/box2-top-long.png');
|
|
|
+ }
|
|
|
+ :deep(.box1-bottom) {
|
|
|
+ --image-box1-bottom: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .module-common-longer {
|
|
|
+ :deep(.box1-top) {
|
|
|
+ --image-box1-top: url('/@/assets/images/vent/box-top-bg.png');
|
|
|
+ background-image: var(--image-box1-top);
|
|
|
+ }
|
|
|
+ :deep(.box1-bottom) {
|
|
|
+ --image-box1-bottom: url('/@/assets/images/vent/box-bottom-bg.png');
|
|
|
+ background-image: var(--image-box1-bottom);
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|