Commit 4fee34f2 authored by 郭志伟's avatar 郭志伟

fix(editor): 问题修复

parent 68ecd8f6
...@@ -6,7 +6,7 @@ const hostMap = { ...@@ -6,7 +6,7 @@ const hostMap = {
kdspHost: `${protocol}//talos-test1.liangkebang.net`, kdspHost: `${protocol}//talos-test1.liangkebang.net`,
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`, shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`,
mallHost: `${protocol}://mall-test1.liangkebang.net`, mallHost: `${protocol}://mall-test1.liangkebang.net`,
test: false test: true
}; };
if (EASY_ENV_IS_BROWSER) { if (EASY_ENV_IS_BROWSER) {
......
...@@ -137,12 +137,12 @@ export default { ...@@ -137,12 +137,12 @@ export default {
window.location.href = `${cfg.mallHost}/common/launch?jumpUrl=${jumpUrl}&terminal=${shareOpenMethod}&extraInfo=${encodeURIComponent(JSON.stringify({ url }))}`; window.location.href = `${cfg.mallHost}/common/launch?jumpUrl=${jumpUrl}&terminal=${shareOpenMethod}&extraInfo=${encodeURIComponent(JSON.stringify({ url }))}`;
} }
}, },
handleBackTopClick(e) { handleBackTopClick(e = {}) {
// ! 此处以1.3为准,但需要对齐分享功能 // ! 此处以1.3为准,但需要对齐分享功能
registeredEvents('PD_WUXIEC_H5ActivityPageSuspendedBtnClick', { registeredEvents('PD_WUXIEC_H5ActivityPageSuspendedBtnClick', {
activity_id: this.pageInfo.uuid, activity_id: this.pageInfo.uuid,
jump_url: e.url, jump_link: e.url,
navigation_name: e.name, window_name: e.name,
}); });
if (e && e.persets === '分享') { if (e && e.persets === '分享') {
if (this.tipTimer) { if (this.tipTimer) {
......
...@@ -105,6 +105,7 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab ...@@ -105,6 +105,7 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab
} }
}); });
} }
this.layoutReadyEvent();
} }
fetchApi(options) { fetchApi(options) {
const { store, route } = options; const { store, route } = options;
...@@ -152,12 +153,6 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab ...@@ -152,12 +153,6 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab
return targetEl; return targetEl;
}); });
} }
setGridItemTransform(index, status) {
// console.log('setGridItemTransform', index, status);
const elements = JSON.parse(JSON.stringify(this.pageData?.elements));
elements[index].noTransforms = status;
this.setPageElement(elements);
}
layoutUpdatedEvent() { layoutUpdatedEvent() {
// console.log('layoutUpdatedEvent'); // console.log('layoutUpdatedEvent');
// 高度更新时重新计算导航组件样式 // 高度更新时重新计算导航组件样式
......
<template> <template>
<div class="activity" :style="transformStyle(pageData.commonStyle)"> <div class="activity" :style="transformStyle(pageData.commonStyle)">
<template v-if="!noPageData"> <template v-if="!noPageData">
<grid-layout <div class="layout">
:layout.sync="layout" <div :style="transformStyle(item.commonStyle, item.point)" v-for="(item, index) in pageData.elements"
:isDraggable="false"
:isResizable="false"
:col-num="12"
:row-height="rowHeight"
:margin="[0, 0]"
:is-draggable="true"
:is-resizable="true"
:is-mirrored="false"
:vertical-compact="true"
:use-css-transforms="true"
@layout-mounted="layoutReadyEvent"
@layout-updated="layoutUpdatedEvent"
>
<grid-item :style="transformStyle(item.commonStyle)" v-for="(item, index) in pageData.elements"
:x="item.point.x"
:y="item.point.y"
:w="item.point.w"
:h="item.point.h"
:i="item.point.i"
:key="item.point.i" :key="item.point.i"
:no-transforms="item.noTransforms" :id="`item_${item.id}`"
@click.native="dot(item.title)" @click="dot(item.title)"
@touchend.native="disTouch" @touchend="disTouch"
> >
<component :data-index="index" :id="item.id" :containerIndex="index" :childItem="item" :is="item.name" :key="item.id" :sa-info="getSaInfo(item)" v-bind="item.props"></component> <component :data-index="index" :containerIndex="index" :component-data="item" :childItem="item" :is="item.name" :sa-info="getSaInfo(item)" v-bind="item.props"></component>
</grid-item> </div>
<grid-item <div
v-if="pageData.props.showPageBottomTip" v-if="pageData.props.showPageBottomTip"
:x="bottomInfo.x" :id="bottomInfo.i + pageData.elements.length"
:y="bottomInfo.y"
:w="bottomInfo.w"
:h="bottomInfo.h"
:i="bottomInfo.i"
:static="true"
:key="bottomInfo.i + pageData.elements.length" :key="bottomInfo.i + pageData.elements.length"
> >
<page-bottom-tip /> <page-bottom-tip />
</grid-item> </div>
</grid-layout> </div>
<back-top v-if="showBackTop" :show-back-top="showBackTop" ref="backTop" /> <back-top v-if="showBackTop" :show-back-top="showBackTop" ref="backTop" />
</template> </template>
<empty-state v-else /> <empty-state v-else />
......
...@@ -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, element = {}) { transformStyle(styleObj, point = {}) {
const style = { const style = {
backgroundRepeat: 'no-repeat', backgroundRepeat: 'no-repeat',
backgroundSize: 'cover' backgroundSize: 'cover'
...@@ -22,7 +22,8 @@ export default class TransformStyleMixin extends Vue { ...@@ -22,7 +22,8 @@ export default class TransformStyleMixin extends Vue {
style.backgroundImage = `url(${style.backgroundImage})`; style.backgroundImage = `url(${style.backgroundImage})`;
} }
} }
style.zIndex = 2; style.minHeight = point?.h ? `${(point.h / 37.5).toFixed(2)}rem` : null;
// 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