diff --git a/pages/diy/components/diy/header.vue b/pages/diy/components/diy/header.vue index 71d512c4..9897ab15 100644 --- a/pages/diy/components/diy/header.vue +++ b/pages/diy/components/diy/header.vue @@ -331,8 +331,8 @@ }, // 封装公共逻辑函数 get_up_slide_style(defaultColor, customColor, opacityValue) { - const opacityStr = opacityValue > 0 ? `opacity: ${opacityValue};` : ''; - const color = customColor === '' ? defaultColor : opacityValue <= 0 ? defaultColor : customColor; + const opacityStr = customColor === '' ? '' : opacityValue > 0 ? `opacity: ${opacityValue};` : ''; + const color = (customColor === '' || opacityValue <= 0) ? defaultColor : customColor; return `color: ${color};${opacityStr}`; }, // 定位设置