chore:【搜索框】的样式设置中的“背景颜色”可以控制搜索框的"背景颜色"和搜索框的“上下左右边距”的颜色
This commit is contained in:
@@ -243,7 +243,7 @@ const localDevConfig = ({
|
|||||||
// })['local-11']; // 选择要使用的环境配置
|
// })['local-11']; // 选择要使用的环境配置
|
||||||
// })['2811']; // 本地
|
// })['2811']; // 本地
|
||||||
//})['5g-317']; // 电磁兼容
|
//})['5g-317']; // 电磁兼容
|
||||||
})['192.168.8.118-1']; //
|
})['5g-312']; //
|
||||||
// })['local-2']; // 本地
|
// })['local-2']; // 本地
|
||||||
// })['local-11']; // 本地
|
// })['local-11']; // 本地
|
||||||
// })['1-test']; // test
|
// })['1-test']; // test
|
||||||
|
|||||||
@@ -377,7 +377,13 @@ export default {
|
|||||||
: index + 1;
|
: index + 1;
|
||||||
|
|
||||||
if (newItem.componentName !== 'Search' || newItem.positionWay !== 'fixed') {
|
if (newItem.componentName !== 'Search' || newItem.positionWay !== 'fixed') {
|
||||||
newItem.pageStyle = `background-color:${newItem.pageBgColor};`;
|
// PR-DIY-SEARCH-MARGIN-COLOR (2026-09-17): 搜索组件的上下左右边距区域颜色
|
||||||
|
// 与搜索框背景色(componentBgColor, 后台自定义)保持一致, 使边距和搜索框融为一体;
|
||||||
|
// 兼容旧数据: 未配置 componentBgColor 时回退 pageBgColor。其余组件仍用 pageBgColor。
|
||||||
|
const wrapBgColor = (newItem.componentName === 'Search' && newItem.componentBgColor)
|
||||||
|
? newItem.componentBgColor
|
||||||
|
: newItem.pageBgColor;
|
||||||
|
newItem.pageStyle = `background-color:${wrapBgColor};`;
|
||||||
|
|
||||||
if (newItem.margin) {
|
if (newItem.margin) {
|
||||||
newItem.pageStyle += `padding-top:${newItem.margin.top * 2}rpx;`;
|
newItem.pageStyle += `padding-top:${newItem.margin.top * 2}rpx;`;
|
||||||
|
|||||||
Reference in New Issue
Block a user