From 20d34cbb12a7ebd420fd9b67b7b6e04d9c84eedb Mon Sep 17 00:00:00 2001 From: expdsn <18111002318@163.com> Date: Mon, 30 Sep 2024 18:31:24 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=A3=81=E7=BA=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + public/bg/gameModel.png | Bin 0 -> 43665 bytes src/GlobalModal.tsx | 39 ++++--- src/layout/background/BackgroundPage.tsx | 2 +- src/layout/background/BackgroundSwtich.tsx | 119 +++++++++++++++++++-- src/main.css | 27 +++++ src/utils/CategoryTab.tsx | 93 ++++++++++++++++ 7 files changed, 254 insertions(+), 27 deletions(-) create mode 100644 public/bg/gameModel.png create mode 100644 src/utils/CategoryTab.tsx diff --git a/package.json b/package.json index 96260bd..1c1b3ae 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "ant-design-vue": "4.x", "clsx": "^2.1.1", "dayjs": "^1.11.13", + "gsap": "^3.12.5", "localforage": "^1.10.0", "lunar-typescript": "^1.7.5", "oh-vue-icons": "^1.0.0-rc3", diff --git a/public/bg/gameModel.png b/public/bg/gameModel.png new file mode 100644 index 0000000000000000000000000000000000000000..0261d01ff9e3223f186409a8bab26a036718ac52 GIT binary patch literal 43665 zcmeHvd03KZ_kUxHO_nxoR&LGIWad^`xr?n%T54KqxL{Leii$gKK<1=VmX4!h=7MEt znz*Eh8&G3rVM=bGBH+FuE~tPD@MC7)#@=_B?_a+^-uJrbpPmb^=YGz8&gY!-Irnnz z+ge*}*|c}lnl)>-T=?Ov-I_J)53O0Vu5{xD@h|-L=i9{peHCP9ae7U0i}LuIHT%|F zID6_!nA;>BmZB028=YlNGrnE7N@4uaKQ}xidw_~f5fNwCBw(%CdlvmDHsgzyp;%7VL72a(9wVH>+ zZ}(q&5bpT{!SsQyaDb1WtA@Jqsmr~_IOGr_FCS`B5VFgSv0=EvuBQNo z2dwDV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YolMge;Yrz`=5}~2T=dT68!)==}%0FWyO70wcKN2pWeHvAnCUK4D#qw(~S?Y8zw+K!zAU&Hnv{6`KPxNB?DDf8tu z<1x=<@9KYbO?{V}BAIvdz_zZ;pjR?7qOU{;_NF{;qGzlT|GRL``fTxO_q+cO!q91< literal 0 HcmV?d00001 diff --git a/src/GlobalModal.tsx b/src/GlobalModal.tsx index 303062b..55239d6 100644 --- a/src/GlobalModal.tsx +++ b/src/GlobalModal.tsx @@ -7,8 +7,9 @@ import widgetList from '@/widgets' addIcons(MdClose, MdOpeninfull, MdClosefullscreen) const SearchPage = asyncLoader(() => import('@/layout/header/search/SearchPage')) const AdderPage = asyncLoader(() => import('@/layout/adder/AdderPage')) +const BackgroundSwtich = asyncLoader(() => import('@/layout/background/BackgroundSwtich')) -const noFullList: RouteStr[] = ['global-search', 'global-adder'] +const noFullList: RouteStr[] = ['global-search', 'global-adder', 'global-background'] export default defineComponent(() => { const router = useRouterStore() @@ -16,7 +17,8 @@ export default defineComponent(() => { () => router.path.startsWith('widget-') || router.path === 'global-search' || - router.path === 'global-adder' + router.path === 'global-adder' || + router.path === 'global-background' ) const full = ref(false) watch(router, () => { @@ -80,21 +82,24 @@ export default defineComponent(() => { ) : router.path === 'global-adder' ? ( - ) : router.path.startsWith('widget-') ? ( - (() => { - const name = router.path.split('-')[1] - const selected = widgetList.find((el) => el.name === name) - if (!selected) - return ( -
- 组件维护中 -
- ) - const compo = selected.modal - console.log(compo) - return - })() - ) : null} + ) : router.path === 'global-background' ? ( + + ) : + router.path.startsWith('widget-') ? ( + (() => { + const name = router.path.split('-')[1] + const selected = widgetList.find((el) => el.name === name) + if (!selected) + return ( +
+ 组件维护中 +
+ ) + const compo = selected.modal + console.log(compo) + return + })() + ) : null} diff --git a/src/layout/background/BackgroundPage.tsx b/src/layout/background/BackgroundPage.tsx index d909187..edb4cb3 100644 --- a/src/layout/background/BackgroundPage.tsx +++ b/src/layout/background/BackgroundPage.tsx @@ -60,7 +60,7 @@ export default defineComponent(() => {
- ) - } -}) \ No newline at end of file + + + ) +}) diff --git a/src/main.css b/src/main.css index 8c3b320..869890c 100644 --- a/src/main.css +++ b/src/main.css @@ -157,3 +157,30 @@ body { scrollbar-width: none; -ms-overflow-style: none; } +@layer utilities { + .scrollbar-transparent::-webkit-scrollbar { + width: 0; + height: 0; + } + .scrollbar-hide::-webkit-scrollbar { + width: 0; + height: 0; + } + + .scrollbar-hide { + -ms-overflow-style: none; /* Internet Explorer 10+ */ + scrollbar-width: none; /* Firefox */ + } + .scrollbar-transparent::-webkit-scrollbar-thumb { + background-color: transparent; + } + + .scrollbar-transparent::-webkit-scrollbar-track { + background-color: transparent; + } + + .scrollbar-transparent { + scrollbar-width: thin; + scrollbar-color: transparent transparent; + } +} \ No newline at end of file diff --git a/src/utils/CategoryTab.tsx b/src/utils/CategoryTab.tsx new file mode 100644 index 0000000..268a7d8 --- /dev/null +++ b/src/utils/CategoryTab.tsx @@ -0,0 +1,93 @@ +import type { BackgroundType } from "@/layout/background/BackgroundSwtich"; +import clsx from "clsx"; +import gsap from "gsap"; +import { defineComponent, reactive, ref, watch } from "vue"; + +export default defineComponent({ + props: { + list: { + type: Array, + required: true + }, + selectType: { + type: String, + required: true, + + } + }, + emits: ['update:type'], + setup(props, ctx) { + const tabRefs = ref<(Element | null)[]>([]) + const parentRef = ref(null) + const number = ref(0) + const tweened = reactive({ + number: 0 + }) + watch(number, (n) => { + gsap.to(tweened, { + number: n, + duration: .5, + onUpdate: () => { + if (parentRef.value) + parentRef.value.scrollLeft = tweened.number + }, + }); + }) + watch(() => [props.selectType], () => { + const idx = props.list.findIndex((item) => item.id === props.selectType) + if (idx === -1) return + if (tabRefs.value[idx]) { + const childRef = tabRefs.value[idx] + if (!childRef) return + if (!childRef.parentElement) return + const parentRect = childRef.parentElement.getBoundingClientRect() + const childRect = childRef.getBoundingClientRect() + const distance = childRect.left - parentRect.left + if (!parentRef.value) return + if (idx > 3) { + number.value = distance - 350 + } else { + number.value = 0 + + } + } else { + number.value = 0 + + } + } + ) + return () => ( +
{ + e.preventDefault() + if (parentRef.value) + parentRef.value.scrollLeft += e.deltaY + + }}> + < div class="w-full flex gap-x-2 " > + { + props.list.map((item, index) => ( + + )) + } +
+ + ) + }, +}) \ No newline at end of file From a5b0f47e8ac6a1befd02a826fd2484482c49df55 Mon Sep 17 00:00:00 2001 From: expdsn <18111002318@163.com> Date: Tue, 8 Oct 2024 14:29:31 +0800 Subject: [PATCH 2/3] change --- src/layout/background/BackgroundSwtich.tsx | 8 ++++---- src/utils/CategoryTab.tsx | 11 ++++++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/layout/background/BackgroundSwtich.tsx b/src/layout/background/BackgroundSwtich.tsx index befe532..1f82202 100644 --- a/src/layout/background/BackgroundSwtich.tsx +++ b/src/layout/background/BackgroundSwtich.tsx @@ -61,12 +61,12 @@ export default defineComponent(() => { }) return () => (
+ } : null}>
壁纸库 @@ -75,7 +75,7 @@ export default defineComponent(() => {