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

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

parent d5953fe9
...@@ -162,7 +162,7 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab ...@@ -162,7 +162,7 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab
hideBottomBtns(state) { hideBottomBtns(state) {
this.showBackTop = state; this.showBackTop = state;
} }
// 计算商品导航组件位置 // 处理页面隐藏
pageVisibilityChange() { pageVisibilityChange() {
if (EASY_ENV_IS_NODE) { return; } if (EASY_ENV_IS_NODE) { return; }
let hidden = 'hidden'; let hidden = 'hidden';
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="activity" :style="transformStyle(pageData.commonStyle)"> <div class="activity" :style="transformStyle(pageData.commonStyle)">
<template v-if="!noPageData"> <template v-if="!noPageData">
<div class="layout"> <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" :key="item.point.i"
:id="`item_${item.id}`" :id="`item_${item.id}`"
@click="dot(item.title)" @click="dot(item.title)"
......
...@@ -6,7 +6,7 @@ import { Mutation } from 'vuex-class'; ...@@ -6,7 +6,7 @@ import { Mutation } from 'vuex-class';
export default class TransformStyleMixin extends Vue { export default class TransformStyleMixin extends Vue {
@Mutation('SET_ELEMENT_POINT') setElementPoint; @Mutation('SET_ELEMENT_POINT') setElementPoint;
transformStyle(styleObj, point = {}) { transformStyle(styleObj, point = {}, name) {
const style = { const style = {
backgroundRepeat: 'no-repeat', backgroundRepeat: 'no-repeat',
backgroundSize: 'cover' backgroundSize: 'cover'
...@@ -22,7 +22,9 @@ export default class TransformStyleMixin extends Vue { ...@@ -22,7 +22,9 @@ export default class TransformStyleMixin extends Vue {
style.backgroundImage = `url(${style.backgroundImage})`; 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; // style.zIndex = 2;
return style; 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