diff --git a/buyer/src/components/indexDecorate/RowWrapper.vue b/buyer/src/components/indexDecorate/RowWrapper.vue
index e1b9eba0e..69c91ef89 100644
--- a/buyer/src/components/indexDecorate/RowWrapper.vue
+++ b/buyer/src/components/indexDecorate/RowWrapper.vue
@@ -27,6 +27,8 @@
:component-style="comp.componentStyle || {}"
+ :row-style="row.rowStyle || {}"
+
/>
@@ -93,7 +95,9 @@ const rowWrapperStyle = computed(() => {
if (s.height !== undefined && s.height !== '') {
const h = String(s.height).trim();
if (h && Number(h) > 0) {
- style.minHeight = /^\d+$/.test(h) ? `${h}px` : h;
+ const hVal = /^\d+$/.test(h) ? `${h}px` : h;
+ style.height = hVal;
+ style.minHeight = hVal;
}
}
@@ -136,7 +140,7 @@ const rowInnerFlexStyle = computed(() => {
const s = props.row.rowStyle || {};
- return {
+ const styleObj = {
display: 'flex',
@@ -150,10 +154,23 @@ const rowInnerFlexStyle = computed(() => {
width: '100%',
+ height: '100%',
+
gap: `${s.gap || 0}px`
};
+ if (s.height !== undefined && s.height !== '') {
+ 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;
+ }
+ }
+
+ return styleObj;
+
});
@@ -163,6 +180,15 @@ function getComponentCellStyle(style, rowStyle = {}, totalComps = 1) {
if (!style) return { flex: '1 1 0%' };
const s = {};
+
+ if (rowStyle?.height !== undefined && rowStyle?.height !== '') {
+ 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;
+ }
+ }
const gap = Number(rowStyle?.gap) || 0;
const totalGap = (totalComps > 1 && gap > 0) ? gap * (totalComps - 1) : 0;
@@ -275,12 +301,22 @@ function getComponentCellStyle(style, rowStyle = {}, totalComps = 1) {
box-sizing: border-box;
+ display: flex;
+
+ flex-direction: column;
+
.row-inner-flex {
box-sizing: border-box;
+ flex: 1;
+
+ height: 100%;
+
+ min-height: 0;
+
.component-cell {
@@ -295,6 +331,13 @@ function getComponentCellStyle(style, rowStyle = {}, totalComps = 1) {
height: 100%;
+ > * {
+ flex: 1;
+ height: 100%;
+ width: 100%;
+ box-sizing: border-box;
+ }
+
}
}
diff --git a/buyer/src/components/indexDecorate/components/Carousel.vue b/buyer/src/components/indexDecorate/components/Carousel.vue
index d47014440..e5b0841cf 100644
--- a/buyer/src/components/indexDecorate/components/Carousel.vue
+++ b/buyer/src/components/indexDecorate/components/Carousel.vue
@@ -7,9 +7,10 @@
:style="customStyle"
>
@@ -37,6 +38,10 @@ const props = defineProps({
componentStyle: {
type: Object,
default: () => ({})
+ },
+ rowStyle: {
+ type: Object,
+ default: () => ({})
}
});
@@ -55,48 +60,32 @@ const slidesList = computed(() => {
}));
}
return [
- { title: '出游囤好货', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_1.png', url: '/goodsList?seckill=1' },
- { title: '科技新品', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_2.png', url: '/goodsList?category=1' },
- { title: '原产地直采', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_3.png', url: '/goodsList?category=2' },
- { title: '大牌美妆', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_4.png', url: '/goodsList?category=3' }
+ { title: '潮流数码', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_1.png', url: '/goodsList?category=1' },
+ { title: '奢宠美妆', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_2.png', url: '/goodsList?category=2' },
+ { title: '运动潮流', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_3.png', url: '/goodsList?category=3' },
+ { title: '居家生活', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_4.png', url: '/goodsList?category=4' }
];
});
-function getAspectRatioCss(ratio) {
- if (ratio === '16:9') return '16 / 9';
- if (ratio === '2:1') return '2 / 1';
- if (ratio === '3:1') return '3 / 1';
- if (ratio === 'custom') return null;
- return '2.5 / 1';
-}
-
const customStyle = computed(() => {
const s = props.componentStyle || {};
- const fit = props.options.fitMode || 'contain';
+ const fit = props.options.fitMode || 'cover';
+ const hasRowHeight = Boolean(props.rowStyle?.height && Number(props.rowStyle.height) > 0);
const styleObj = {
- borderRadius: Array.isArray(s.radius)
+ borderRadius: Array.isArray(s.radius) && s.radius.some(r => r > 0)
? `${s.radius[0]}px ${s.radius[1]}px ${s.radius[2]}px ${s.radius[3]}px`
: '8px',
- backgroundColor: s.backgroundColor || '#ffffff',
- '--carousel-fit': fit
+ backgroundColor: (s.backgroundColor && s.backgroundColor !== 'transparent') ? s.backgroundColor : '#ffffff',
+ '--carousel-fit': fit,
+ height: '100%',
+ minHeight: hasRowHeight ? '0' : '420px'
};
- if (props.options.height) {
+ if (props.options.aspectRatio === 'custom' && props.options.height) {
styleObj.height = `${props.options.height}px`;
- styleObj.aspectRatio = 'auto';
- } else {
- const ratio = props.options.aspectRatio || '2.5:1';
- const ratioCss = getAspectRatioCss(ratio);
- if (ratioCss) {
- styleObj.aspectRatio = ratioCss;
- styleObj['--carousel-ratio'] = ratioCss;
- } else {
- styleObj.height = `${s.height || 420}px`;
- styleObj.aspectRatio = 'auto';
- }
+ styleObj.minHeight = `${props.options.height}px`;
}
-
return styleObj;
});
@@ -104,6 +93,7 @@ const customStyle = computed(() => {
diff --git a/buyer/src/components/indexDecorate/components/ChannelFloor.vue b/buyer/src/components/indexDecorate/components/ChannelFloor.vue
index f39ad1c92..dac1e7ece 100644
--- a/buyer/src/components/indexDecorate/components/ChannelFloor.vue
+++ b/buyer/src/components/indexDecorate/components/ChannelFloor.vue
@@ -98,8 +98,21 @@
diff --git a/buyer/src/components/indexDecorate/presets/double11Preset.js b/buyer/src/components/indexDecorate/presets/double11Preset.js
index bc707cb73..edb8b6ba9 100644
--- a/buyer/src/components/indexDecorate/presets/double11Preset.js
+++ b/buyer/src/components/indexDecorate/presets/double11Preset.js
@@ -22,7 +22,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
0,
0,
0
- ]
+ ],
+ "height": 40
},
"components": [
{
@@ -77,7 +78,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
0,
12,
0
- ]
+ ],
+ "height": 120
},
"components": [
{
@@ -99,7 +101,10 @@ export const DOUBLE11_PAGE_DOCUMENT = {
"华为Mate 70",
"五粮液普五",
"耐克碳板跑鞋"
- ]
+ ],
+ "showSearchTypes": true,
+ "defaultSearchType": "goods",
+ "storePlaceholder": "请输入店铺名称"
}
}
]
@@ -120,7 +125,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
0,
0,
0
- ]
+ ],
+ "height": 48
},
"components": [
{
@@ -193,7 +199,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
],
"justifyContent": "space-between",
"alignItems": "stretch",
- "gap": 12
+ "gap": 12,
+ "height": 320
},
"components": [
{
@@ -366,7 +373,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
4,
12
],
- "borderRadius": "8px"
+ "borderRadius": "8px",
+ "height": 40
},
"components": [
{
@@ -427,7 +435,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
16,
14
],
- "borderRadius": "8px"
+ "borderRadius": "8px",
+ "height": 120
},
"components": [
{
@@ -532,7 +541,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
0,
0,
0
- ]
+ ],
+ "height": 48
},
"components": [
{
@@ -569,7 +579,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
0,
0,
0
- ]
+ ],
+ "height": 160
},
"components": [
{
@@ -634,7 +645,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
0,
0,
0
- ]
+ ],
+ "height": 750
},
"components": [
{
@@ -711,7 +723,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
0,
0,
0
- ]
+ ],
+ "height": 180
},
"components": [
{
@@ -771,7 +784,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
0,
0
],
- "justifyContent": "space-between"
+ "justifyContent": "space-between",
+ "height": 360
},
"components": [
{
@@ -874,7 +888,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
14,
20
],
- "borderRadius": "8px"
+ "borderRadius": "8px",
+ "height": 450
},
"components": [
{
@@ -924,7 +939,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
0,
0,
0
- ]
+ ],
+ "height": 48
},
"components": [
{
@@ -962,7 +978,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
16,
16
],
- "borderRadius": "8px"
+ "borderRadius": "8px",
+ "height": 560
},
"components": [
{
@@ -1043,7 +1060,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
16,
16
],
- "borderRadius": "8px"
+ "borderRadius": "8px",
+ "height": 560
},
"components": [
{
@@ -1121,7 +1139,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
16,
16
],
- "borderRadius": "8px"
+ "borderRadius": "8px",
+ "height": 620
},
"components": [
{
@@ -1190,7 +1209,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
0,
0,
0
- ]
+ ],
+ "height": 48
},
"components": [
{
@@ -1203,7 +1223,7 @@ export const DOUBLE11_PAGE_DOCUMENT = {
},
"options": {
"title": "双11爆款必买热销榜",
- "subtitle": "TOP RANKINGS · 亿万买家真实下单好评热选",
+ "subtitle": "TOP RANKINGS · 平台高人气甄选热卖",
"tag": "实时榜单",
"moreText": "查看完整榜单 >",
"moreUrl": "/goodsList"
@@ -1228,7 +1248,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
16,
16
],
- "borderRadius": "8px"
+ "borderRadius": "8px",
+ "height": 420
},
"components": [
{
@@ -1343,7 +1364,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
0,
0,
0
- ]
+ ],
+ "height": 48
},
"components": [
{
@@ -1381,7 +1403,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
16,
16
],
- "borderRadius": "8px"
+ "borderRadius": "8px",
+ "height": 360
},
"components": [
{
@@ -1395,6 +1418,7 @@ export const DOUBLE11_PAGE_DOCUMENT = {
"options": {
"videoUrl": "https://vjs.zencdn.net/v/oceans.mp4",
"coverUrl": "https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/video/video_cover.png",
+ "url": "/goodsList?brand=1",
"title": "双11全球狂欢发布盛典 · 年度旗舰好物真实开箱测评",
"autoplay": false
}
@@ -1417,7 +1441,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
0,
0,
0
- ]
+ ],
+ "height": 48
},
"components": [
{
@@ -1455,7 +1480,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
16,
16
],
- "borderRadius": "8px"
+ "borderRadius": "8px",
+ "height": 220
},
"components": [
{
@@ -1513,7 +1539,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
0,
0,
0
- ]
+ ],
+ "height": 48
},
"components": [
{
@@ -1551,7 +1578,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
20,
24
],
- "borderRadius": "8px"
+ "borderRadius": "8px",
+ "height": ""
},
"components": [
{
@@ -1588,7 +1616,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
0,
0,
0
- ]
+ ],
+ "height": 48
},
"components": [
{
@@ -1626,7 +1655,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
16,
16
],
- "borderRadius": "8px"
+ "borderRadius": "8px",
+ "height": 980
},
"components": [
{
@@ -1740,7 +1770,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
0,
0,
0
- ]
+ ],
+ "height": 48
},
"components": [
{
@@ -1778,7 +1809,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
16,
16
],
- "borderRadius": "8px"
+ "borderRadius": "8px",
+ "height": 1270
},
"components": [
{
@@ -1893,7 +1925,8 @@ export const DOUBLE11_PAGE_DOCUMENT = {
0,
24,
0
- ]
+ ],
+ "height": 450
},
"components": [
{
diff --git a/manager/src/views/page-decoration/pc/config-panel/PanelCarousel.vue b/manager/src/views/page-decoration/pc/config-panel/PanelCarousel.vue
index 04b8724c2..9cacb755e 100644
--- a/manager/src/views/page-decoration/pc/config-panel/PanelCarousel.vue
+++ b/manager/src/views/page-decoration/pc/config-panel/PanelCarousel.vue
@@ -214,7 +214,7 @@ if (props.options.showIndicator === undefined) props.options.showIndicator = tru
if (!props.options.effect) props.options.effect = 'fade';
if (!props.options.fitMode) props.options.fitMode = 'contain';
if (!props.options.aspectRatio) props.options.aspectRatio = '2.5:1';
-if (props.options.height === undefined) props.options.height = 380;
+if (props.options.height === undefined) props.options.height = 420;
if (!Array.isArray(props.options.list)) {
props.options.list = [
{ title: '出游囤好货', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_1.png', url: '/goodsList?seckill=1' },
diff --git a/manager/src/views/page-decoration/pc/config-panel/PanelCategoryMegaMenu.vue b/manager/src/views/page-decoration/pc/config-panel/PanelCategoryMegaMenu.vue
index 774f3adc3..233e8dfd1 100644
--- a/manager/src/views/page-decoration/pc/config-panel/PanelCategoryMegaMenu.vue
+++ b/manager/src/views/page-decoration/pc/config-panel/PanelCategoryMegaMenu.vue
@@ -6,7 +6,7 @@
内容设置
@@ -69,14 +69,26 @@
-
-