+
+
+ ,
+ unSelect: (text: string) =>
+ }} list={typeList.value.filter(val => val.attr === selectAttr.value)} selectType={selectType.value} onUpdate:type={(e) => {
+ selectType.value = e
+ }}>
+
+
+
+
+
+
+
+
+
+
+ {
+ wallpaperAttrList.map((item, index) => (
+
{
+ if (index === 2) {
+
+ if (!userStore.isLogin) {
+ router.go('global-login')
+ }
+ return
+ }
+ selectAttr.value = index
+
+ }}
+ class={clsx("px-8 py-2 rounded-[8px]",
+ index === selectAttr.value ? "bg-white text-[#333]" : "cursor-pointer text-white hover:bg-white/[.4]")}>{item}
+ ))
+ }
-
-
-
diff --git a/src/utils/CategoryTab.tsx b/src/utils/CategoryTab.tsx
index a279ed1..9317599 100644
--- a/src/utils/CategoryTab.tsx
+++ b/src/utils/CategoryTab.tsx
@@ -1,7 +1,7 @@
import type { BackgroundType } from "@/layout/background/BackgroundSwtich";
import clsx from "clsx";
import gsap from "gsap";
-import { defineComponent, reactive, ref, watch } from "vue";
+import { defineComponent, reactive, ref, watch, type SlotsType, type VNode } from "vue";
export default defineComponent({
props: {
@@ -13,15 +13,12 @@ export default defineComponent({
type: String,
required: true,
},
- selectNode: {
- type: Node,
- required: true,
- },
- unSelectNode: {
- type: Object,
- required: true,
- }
+
},
+ slots: {} as SlotsType<{
+ select?: (text: string) => VNode[]
+ unSelect?: (text: string) => VNode[]
+ }>,
emits: ['update:type'],
setup(props, ctx) {
const tabRefs = ref<(Element | null)[]>([])
@@ -30,6 +27,8 @@ export default defineComponent({
const tweened = reactive({
number: 0
})
+
+
watch(number, (n) => {
gsap.to(tweened, {
number: n,
@@ -77,22 +76,15 @@ export default defineComponent({
{
props.list.map((item, index) => (
-