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

fix(editor): 问题修复

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