1.head优化

v1.0.0
sws 2024-10-11 14:59:00 +08:00
parent a8be02b772
commit 78c626d5fa
1 changed files with 3 additions and 3 deletions

View File

@ -95,18 +95,18 @@ const roll_img_style = computed(() => {
const up_slide_style = computed(() => {
let style = ``;
if (props.scollTop > 0) {
if (props.scollTop > 20) {
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 };
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;
});
const up_slide_img_style = computed(() => {
let style = ``;
if (props.scollTop > 0) {
if (props.scollTop > 20) {
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 };