From c23c9ba72a2b8b6f7f5060f0b0786ddc1b0eaf0d Mon Sep 17 00:00:00 2001 From: scout <1134087124@qq.com> Date: Fri, 21 Feb 2025 13:58:30 +0800 Subject: [PATCH] readme --- README.md | 50 ++- src/App.vue | 2 +- src/components/AppHeader.vue | 42 --- src/views/companyprofil/size1920/index.vue | 163 ++++++++-- src/views/home/size1440/index.vue | 339 +++++++++++---------- src/views/home/size1920/index.vue | 105 ++++--- 6 files changed, 429 insertions(+), 272 deletions(-) diff --git a/README.md b/README.md index 1511959..017d582 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,49 @@ -# Vue 3 + Vite +# Project Name -This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 ` diff --git a/src/views/companyprofil/size1920/index.vue b/src/views/companyprofil/size1920/index.vue index c1e2183..7df248b 100644 --- a/src/views/companyprofil/size1920/index.vue +++ b/src/views/companyprofil/size1920/index.vue @@ -1,35 +1,60 @@ diff --git a/src/views/home/size1440/index.vue b/src/views/home/size1440/index.vue index a1af360..9a9b6c1 100644 --- a/src/views/home/size1440/index.vue +++ b/src/views/home/size1440/index.vue @@ -6,7 +6,9 @@ import { ScrollTrigger } from 'gsap/ScrollTrigger'; import { useHome } from '@/store/home/index.js'; import { useTransitionComposable } from '@/composables/transition-composable'; import { useI18n } from 'vue-i18n'; +import { useRouter } from "vue-router"; +const router = useRouter(); const { transitionState } = useTransitionComposable(); const main = ref(); const secondImage = ref(null); @@ -21,6 +23,7 @@ const { t } = useI18n(); const handleTabClick = (tab) => { currentTab.value = tab; + router.push('/' + tab); } const goToSection = (i) => { @@ -336,7 +339,7 @@ watch( y: 0, immediateRender: true }); - + // 预先设置所有元素的初始状态 gsap.set([ ".content4 > div:nth-child(1)", @@ -367,35 +370,35 @@ watch( opacity: 1, y: 0, }) - .to(".content4 > div:nth-child(2)", { - opacity: 1, - y: 0, - }, "-=0.4") - .to(".content4 > div:nth-child(3)", { - opacity: 1, - y: 0, - }, "-=0.4") - // 卡片动画 - .to(".content4 .container > div:first-child .card:first-child", { - opacity: 1, - y: 0, - duration: 0.8 - }, "-=0.2") - .to(".content4 .container > .right .card:first-child", { - opacity: 1, - y: 0, - duration: 0.8 - }, "-=0.6") - .to(".content4 .container > div:first-child .card:last-child", { - opacity: 1, - y: 0, - duration: 0.8 - }, "-=0.6") - .to(".content4 .container > .right .card:last-child", { - opacity: 1, - y: 0, - duration: 0.8 - }, "-=0.6"); + .to(".content4 > div:nth-child(2)", { + opacity: 1, + y: 0, + }, "-=0.4") + .to(".content4 > div:nth-child(3)", { + opacity: 1, + y: 0, + }, "-=0.4") + // 卡片动画 + .to(".content4 .container > div:first-child .card:first-child", { + opacity: 1, + y: 0, + duration: 0.8 + }, "-=0.2") + .to(".content4 .container > .right .card:first-child", { + opacity: 1, + y: 0, + duration: 0.8 + }, "-=0.6") + .to(".content4 .container > div:first-child .card:last-child", { + opacity: 1, + y: 0, + duration: 0.8 + }, "-=0.6") + .to(".content4 .container > .right .card:last-child", { + opacity: 1, + y: 0, + duration: 0.8 + }, "-=0.6"); }, onLeave: () => { // 离开第四幕时显示 @@ -406,23 +409,23 @@ watch( ease: "power2.in" } }) - .to(".content4 .container .card", { - opacity: 0, - y: -30, - stagger: { - each: 0.1, - from: "end" - } - }) - .to([ - ".content4 > div:nth-child(3)", - ".content4 > div:nth-child(2)", - ".content4 > div:nth-child(1)" - ], { - opacity: 0, - y: -30, - stagger: 0.1 - }, "-=0.3"); + .to(".content4 .container .card", { + opacity: 0, + y: -30, + stagger: { + each: 0.1, + from: "end" + } + }) + .to([ + ".content4 > div:nth-child(3)", + ".content4 > div:nth-child(2)", + ".content4 > div:nth-child(1)" + ], { + opacity: 0, + y: -30, + stagger: 0.1 + }, "-=0.3"); }, onEnterBack: () => { // 返回第四幕时隐藏 @@ -432,7 +435,7 @@ watch( y: 0, immediateRender: true }); - + gsap.set([ ".content4 > div:nth-child(1)", ".content4 > div:nth-child(2)", @@ -460,34 +463,34 @@ watch( opacity: 1, y: 0, }) - .to(".content4 > div:nth-child(2)", { - opacity: 1, - y: 0, - }, "-=0.4") - .to(".content4 > div:nth-child(3)", { - opacity: 1, - y: 0, - }, "-=0.4") - .to(".content4 .container > div:first-child .card:first-child", { - opacity: 1, - y: 0, - duration: 0.8 - }, "-=0.2") - .to(".content4 .container > .right .card:first-child", { - opacity: 1, - y: 0, - duration: 0.8 - }, "-=0.6") - .to(".content4 .container > div:first-child .card:last-child", { - opacity: 1, - y: 0, - duration: 0.8 - }, "-=0.6") - .to(".content4 .container > .right .card:last-child", { - opacity: 1, - y: 0, - duration: 0.8 - }, "-=0.6"); + .to(".content4 > div:nth-child(2)", { + opacity: 1, + y: 0, + }, "-=0.4") + .to(".content4 > div:nth-child(3)", { + opacity: 1, + y: 0, + }, "-=0.4") + .to(".content4 .container > div:first-child .card:first-child", { + opacity: 1, + y: 0, + duration: 0.8 + }, "-=0.2") + .to(".content4 .container > .right .card:first-child", { + opacity: 1, + y: 0, + duration: 0.8 + }, "-=0.6") + .to(".content4 .container > div:first-child .card:last-child", { + opacity: 1, + y: 0, + duration: 0.8 + }, "-=0.6") + .to(".content4 .container > .right .card:last-child", { + opacity: 1, + y: 0, + duration: 0.8 + }, "-=0.6"); }, onLeaveBack: () => { // 向上离开第四幕时显示 @@ -498,23 +501,23 @@ watch( ease: "power2.in" } }) - .to(".content4 .container .card", { - opacity: 0, - y: 30, - stagger: { - each: 0.1, - from: "end" - } - }) - .to([ - ".content4 > div:nth-child(3)", - ".content4 > div:nth-child(2)", - ".content4 > div:nth-child(1)" - ], { - opacity: 0, - y: 30, - stagger: 0.1 - }, "-=0.3"); + .to(".content4 .container .card", { + opacity: 0, + y: 30, + stagger: { + each: 0.1, + from: "end" + } + }) + .to([ + ".content4 > div:nth-child(3)", + ".content4 > div:nth-child(2)", + ".content4 > div:nth-child(1)" + ], { + opacity: 0, + y: 30, + stagger: 0.1 + }, "-=0.3"); } }); }, main.value); @@ -525,8 +528,24 @@ watch(