diff --git a/buyer/src/components/indexDecorate/RowWrapper.vue b/buyer/src/components/indexDecorate/RowWrapper.vue
index 69c91ef89..cbebe7e57 100644
--- a/buyer/src/components/indexDecorate/RowWrapper.vue
+++ b/buyer/src/components/indexDecorate/RowWrapper.vue
@@ -12,7 +12,7 @@
class="component-cell"
- :style="getComponentCellStyle(comp.componentStyle, row.rowStyle, row.components ? row.components.length : 1)"
+ :style="getComponentCellStyle(comp.componentStyle, row.rowStyle, row.components ? row.components.length : 1, comp.type)"
>
@@ -69,6 +69,10 @@ const props = defineProps({
+const hasAutoComp = computed(() => {
+ return Array.isArray(props.row.components) && props.row.components.some(c => ['goodsGrid', 'gridFloor', 'bannerFloor', 'goodsBar', 'channelFloor', 'goodsList', 'recommendFeed', 'articleContent', 'brandWall', 'channelGrid', 'couponList'].includes(c?.type));
+});
+
const rowWrapperStyle = computed(() => {
const s = props.row.rowStyle || {};
const style = {};
@@ -96,8 +100,12 @@ const rowWrapperStyle = computed(() => {
const h = String(s.height).trim();
if (h && Number(h) > 0) {
const hVal = /^\d+$/.test(h) ? `${h}px` : h;
- style.height = hVal;
- style.minHeight = hVal;
+ if (hasAutoComp.value) {
+ style.minHeight = hVal;
+ } else {
+ style.height = hVal;
+ style.minHeight = hVal;
+ }
}
}
@@ -164,8 +172,12 @@ const rowInnerFlexStyle = computed(() => {
const h = String(s.height).trim();
if (h && Number(h) > 0) {
const hVal = /^\d+$/.test(h) ? `${h}px` : h;
- styleObj.height = hVal;
- styleObj.minHeight = hVal;
+ if (hasAutoComp.value) {
+ styleObj.minHeight = hVal;
+ } else {
+ styleObj.height = hVal;
+ styleObj.minHeight = hVal;
+ }
}
}
@@ -175,7 +187,8 @@ const rowInnerFlexStyle = computed(() => {
-function getComponentCellStyle(style, rowStyle = {}, totalComps = 1) {
+function getComponentCellStyle(style, rowStyle = {}, totalComps = 1, compType = '') {
+ const isAutoHeightComp = compType && ['goodsGrid', 'gridFloor', 'bannerFloor', 'goodsBar', 'channelFloor', 'goodsList', 'recommendFeed', 'articleContent', 'brandWall', 'channelGrid', 'couponList'].includes(compType);
if (!style) return { flex: '1 1 0%' };
@@ -185,8 +198,12 @@ function getComponentCellStyle(style, rowStyle = {}, totalComps = 1) {
const rh = String(rowStyle.height).trim();
if (rh && Number(rh) > 0) {
const rhVal = /^\d+$/.test(rh) ? `${rh}px` : rh;
- s.height = rhVal;
- s.minHeight = rhVal;
+ if (isAutoHeightComp) {
+ s.minHeight = rhVal;
+ } else {
+ s.height = rhVal;
+ s.minHeight = rhVal;
+ }
}
}
const gap = Number(rowStyle?.gap) || 0;
diff --git a/buyer/src/components/indexDecorate/components/HotZone.vue b/buyer/src/components/indexDecorate/components/HotZone.vue
index a07e304ba..e3910bd1b 100644
--- a/buyer/src/components/indexDecorate/components/HotZone.vue
+++ b/buyer/src/components/indexDecorate/components/HotZone.vue
@@ -7,10 +7,10 @@
:key="idx"
class="zone-link"
:style="{
- top: `${zone.top || 0}%`,
- left: `${zone.left || 0}%`,
- width: `${zone.width || 10}%`,
- height: `${zone.height || 10}%`
+ top: `${zone.top !== undefined ? zone.top : ((zone.topPer || 0) * 100)}%`,
+ left: `${zone.left !== undefined ? zone.left : ((zone.leftPer || 0) * 100)}%`,
+ width: `${zone.width !== undefined ? zone.width : ((zone.widthPer || 0.1) * 100)}%`,
+ height: `${zone.height !== undefined ? zone.height : ((zone.heightPer || 0.1) * 100)}%`
}"
:title="zone.title"
@click="handleClickZone(zone)"
@@ -68,7 +68,7 @@ const customStyle = computed(() => {
});
function handleClickZone(zone) {
- const url = zone?.url ? String(zone.url).trim() : '';
+ const url = (zone?.url || zone?.link) ? String(zone.url || zone.link).trim() : '';
if (!url) return;
if (/^https?:\/\//i.test(url)) {
window.open(url, '_blank');
diff --git a/buyer/src/components/indexDecorate/presets/double11Preset.js b/buyer/src/components/indexDecorate/presets/double11Preset.js
index edb8b6ba9..e5bc34c99 100644
--- a/buyer/src/components/indexDecorate/presets/double11Preset.js
+++ b/buyer/src/components/indexDecorate/presets/double11Preset.js
@@ -724,7 +724,7 @@ export const DOUBLE11_PAGE_DOCUMENT = {
0,
0
],
- "height": 180
+ "height": 220
},
"components": [
{
@@ -901,6 +901,7 @@ export const DOUBLE11_PAGE_DOCUMENT = {
"backgroundColor": "transparent"
},
"options": {
+ "height": 450,
"elements": [
{
"type": "badge",
@@ -979,7 +980,7 @@ export const DOUBLE11_PAGE_DOCUMENT = {
16
],
"borderRadius": "8px",
- "height": 560
+ "height": ""
},
"components": [
{
@@ -1061,7 +1062,7 @@ export const DOUBLE11_PAGE_DOCUMENT = {
16
],
"borderRadius": "8px",
- "height": 560
+ "height": ""
},
"components": [
{
@@ -1140,7 +1141,7 @@ export const DOUBLE11_PAGE_DOCUMENT = {
16
],
"borderRadius": "8px",
- "height": 620
+ "height": ""
},
"components": [
{
@@ -1249,7 +1250,7 @@ export const DOUBLE11_PAGE_DOCUMENT = {
16
],
"borderRadius": "8px",
- "height": 420
+ "height": ""
},
"components": [
{
@@ -1404,7 +1405,7 @@ export const DOUBLE11_PAGE_DOCUMENT = {
16
],
"borderRadius": "8px",
- "height": 360
+ "height": 450
},
"components": [
{
@@ -1417,6 +1418,7 @@ export const DOUBLE11_PAGE_DOCUMENT = {
},
"options": {
"videoUrl": "https://vjs.zencdn.net/v/oceans.mp4",
+ "height": 450,
"coverUrl": "https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/video/video_cover.png",
"url": "/goodsList?brand=1",
"title": "双11全球狂欢发布盛典 · 年度旗舰好物真实开箱测评",
@@ -1481,7 +1483,7 @@ export const DOUBLE11_PAGE_DOCUMENT = {
16
],
"borderRadius": "8px",
- "height": 220
+ "height": ""
},
"components": [
{
@@ -1656,7 +1658,7 @@ export const DOUBLE11_PAGE_DOCUMENT = {
16
],
"borderRadius": "8px",
- "height": 980
+ "height": ""
},
"components": [
{
@@ -1810,7 +1812,7 @@ export const DOUBLE11_PAGE_DOCUMENT = {
16
],
"borderRadius": "8px",
- "height": 1270
+ "height": ""
},
"components": [
{
diff --git a/manager/src/components/hotzone/index.vue b/manager/src/components/hotzone/index.vue
index 041b65fbf..bb45056b0 100644
--- a/manager/src/components/hotzone/index.vue
+++ b/manager/src/components/hotzone/index.vue
@@ -1,7 +1,7 @@
+
+
+ 绘制热区
+
更换底图
@@ -46,6 +50,9 @@
热区列表 ({{ options.zones?.length || 0 }})
-
暂无热区,请点击右上角“添加热区”
+
暂无热区,可点击“绘制热区”在底图上拖拽画热区
+
-
+
+
+
+