Commit ebcc36e9 authored by 郭志伟's avatar 郭志伟

fix: 定位问题修复

parent bfa656ec
<template>
<div class="Pb-container">
<div class="Pb-container" :style="bgColor">
<span class="Pb-text" :style="style">{{ txt }}</span>
</div>
</template>
......@@ -16,6 +16,12 @@ export default {
return {
color: this.pageData.props.pageBottomColor
};
},
// TODO 这样不太好
bgColor() {
return {
'backgroundColor': this.pageData.commonStyle.backgroundColor
};
}
}
}
......@@ -24,6 +30,7 @@ export default {
.Pb {
&-container {
height: 60px;
width: 100%;
text-align: center;
display: flex;
align-items: center;
......
......@@ -24,26 +24,23 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin) {
h: 60,
i: 'page-bottom-top'
};
layout: object = [];
isLayoutComReady = false;
showBackTop = false;
targetEle: HTMLElement | null = null;
loading: boolean = true;
modfiTabsStyleDebounce = debounce(this.modfiTabsStyle, 300);
get layout() {
return this.pageData && this.pageData.elements.map(v => v.point) || [];
}
get backTopList() {
return this.pageData && this.pageData.props.showShopCart ? [
{
icon: 'shopping-cart-o',
url: 'xyqb://shoppingCartTab'
}
] : [];
return this.pageData && this.pageData.props.showShopCart ? this.pageData.props.backTopAttachInfo : [];
}
@Watch('pageData')
@Watch('layout')
onLayoutChange(val) {
const layout = this.pageData && this.pageData.elements.map(v => v.point) || [];
const lastGridItemPoint = layout[layout.length - 1];
const lastGridItemPoint = val[val.length - 1];
if (lastGridItemPoint.w) {
this.bottomInfo = {
x: 0,
......@@ -55,8 +52,6 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin) {
if (lastGridItemPoint.w > this.bottomInfo.w) { this.bottomInfo.w = lastGridItemPoint.w; }
this.bottomInfo.y = this.bottomInfo.y + lastGridItemPoint.y + lastGridItemPoint.h;
}
layout.push(this.bottomInfo);
this.layout = layout;
}
@Watch('pageName', { immediate: true })
......
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