Commit 3dea9918 authored by 郭志伟's avatar 郭志伟

fix(free-container): 自由容器点击修复

parent d5953fe9
......@@ -22,4 +22,4 @@ export default class ActivityController extends Controller {
}
ctx.body = body;
}
}
\ No newline at end of file
}
......@@ -162,7 +162,7 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab
hideBottomBtns(state) {
this.showBackTop = state;
}
// 计算商品导航组件位置
// 处理页面隐藏
pageVisibilityChange() {
if (EASY_ENV_IS_NODE) { return; }
let hidden = 'hidden';
......
......@@ -2,7 +2,7 @@
<div class="activity" :style="transformStyle(pageData.commonStyle)">
<template v-if="!noPageData">
<div class="layout">
<div :style="transformStyle(item.commonStyle, item.point)" v-for="(item, index) in pageData.elements"
<div :style="transformStyle(item.commonStyle, item.point, item.name)" v-for="(item, index) in pageData.elements"
:key="item.point.i"
:id="`item_${item.id}`"
@click="dot(item.title)"
......
......@@ -6,7 +6,7 @@ import { Mutation } from 'vuex-class';
export default class TransformStyleMixin extends Vue {
@Mutation('SET_ELEMENT_POINT') setElementPoint;
transformStyle(styleObj, point = {}) {
transformStyle(styleObj, point = {}, name) {
const style = {
backgroundRepeat: 'no-repeat',
backgroundSize: 'cover'
......@@ -22,7 +22,9 @@ export default class TransformStyleMixin extends Vue {
style.backgroundImage = `url(${style.backgroundImage})`;
}
}
style.minHeight = point?.h ? `${(point.h / 37.5).toFixed(2)}rem` : null;
if (name === 'freedom-container') {
style.height = point?.h ? `${(point.h / 37.5).toFixed(2)}rem` : null;
}
// style.zIndex = 2;
return style;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment