1.head优化
parent
a8be02b772
commit
78c626d5fa
|
|
@ -95,18 +95,18 @@ const roll_img_style = computed(() => {
|
||||||
|
|
||||||
const up_slide_style = computed(() => {
|
const up_slide_style = computed(() => {
|
||||||
let style = ``;
|
let style = ``;
|
||||||
if (props.scollTop > 0) {
|
if (props.scollTop > 20) {
|
||||||
const { up_slide_background_color_list, up_slide_background_direction } = new_style.value;
|
const { up_slide_background_color_list, up_slide_background_direction } = new_style.value;
|
||||||
// 渐变
|
// 渐变
|
||||||
const gradient = { color_list: up_slide_background_color_list, direction: up_slide_background_direction };
|
const gradient = { color_list: up_slide_background_color_list, direction: up_slide_background_direction };
|
||||||
style += gradient_computer(gradient) + `opacity: ${props.scollTop / 90 > 1 ? 1 : (props.scollTop / 90).toFixed(2)};`;
|
style += gradient_computer(gradient) + `opacity: ${(props.scollTop - 20) / 90 > 1 ? 1 : ((props.scollTop - 20) / 90).toFixed(2)};`;
|
||||||
}
|
}
|
||||||
return style;
|
return style;
|
||||||
});
|
});
|
||||||
|
|
||||||
const up_slide_img_style = computed(() => {
|
const up_slide_img_style = computed(() => {
|
||||||
let style = ``;
|
let style = ``;
|
||||||
if (props.scollTop > 0) {
|
if (props.scollTop > 20) {
|
||||||
const { up_slide_background_img = '', up_slide_background_img_style = '' } = new_style.value;
|
const { up_slide_background_img = '', up_slide_background_img_style = '' } = new_style.value;
|
||||||
// 背景图
|
// 背景图
|
||||||
const back = { background_img: up_slide_background_img, background_img_style: up_slide_background_img_style };
|
const back = { background_img: up_slide_background_img, background_img_style: up_slide_background_img_style };
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue