修改上浮数组处理

master
于肖磊 2025-05-22 11:52:53 +08:00
parent e0bf380c2b
commit 4acfeb27f3
1 changed files with 3 additions and 1 deletions

View File

@ -225,6 +225,7 @@
data() {
return {
scale_component_list: [ 'carousel', 'custom', 'data-magic', 'img-magic', 'video' ],
subset_scale_component_list: [ 'carousel', 'custom', 'data-magic', 'img-magic', 'video', 'goods-list' ],
//
currency_symbol: app.globalData.currency_symbol(),
//
@ -458,6 +459,7 @@
//
const scaleComponents = new Set(this.scale_component_list);
const subset_scale_component_list = new Set(this.subset_scale_component_list);
//
let scale = sys_width / 390;
// 2
@ -470,7 +472,7 @@
diy_data.forEach((item, index) => {
//
const style = item.com_data?.style?.common_style;
if (style && newMarginTopMap.has(item.id) && scaleComponents.has(diy_data[index - 1].key) && scaleComponents.has(item.key)) {
if (style && newMarginTopMap.has(item.id) && scaleComponents.has(diy_data[index - 1].key) && subset_scale_component_list.has(item.key)) {
item.floating_up = '-' + (style?.floating_up || 0) * scale + 'px;';
} else {
item.floating_up = '-' + (style?.floating_up || 0) * 2 + 'rpx;';