@@ -3,44 +3,44 @@ import { watch } from 'vue'
33
44import { cn } from ' @/utils/tailwindUtil'
55
6- const props = defineProps <{
6+ const { label, defaultCollapse } = defineProps <{
77 label? : string
88 defaultCollapse? : boolean
99}>()
1010const isCollapse = defineModel <boolean >(' collapse' , { default: false })
1111
12- if (props . defaultCollapse ) {
12+ if (defaultCollapse ) {
1313 isCollapse .value = true
1414}
1515watch (
16- () => props . defaultCollapse ,
16+ () => defaultCollapse ,
1717 (value ) => (isCollapse .value = value )
1818)
1919 </script >
2020
2121<template >
2222 <div class =" flex flex-col" >
2323 <div
24- class =" sticky top-0 z-10 flex items-center justify-between backdrop-blur-xl min-h-12 "
24+ class =" sticky top-0 z-10 flex items-center justify-between backdrop-blur-xl"
2525 >
2626 <button
2727 class =" group min-h-12 bg-transparent border-0 outline-0 ring-0 w-full text-left flex items-center justify-between pl-4 pr-3 cursor-pointer"
2828 @click =" isCollapse = !isCollapse"
2929 >
3030 <span class =" text-sm font-semibold line-clamp-2" >
3131 <slot name =" label" >
32- {{ props. label ?? '' }}
32+ {{ label ?? '' }}
3333 </slot >
3434 </span >
3535
3636 <i
3737 :class ="
3838 cn(
39- 'icon-[lucide--chevron-down ] size-5 min-w-5 transition-all',
40- isCollapse && 'rotate-90 '
39+ 'icon-[lucide--chevron-up ] size-4 transition-all',
40+ isCollapse && '- rotate-180 '
4141 )
4242 "
43- class =" relative top-px text-xs leading-none text-node-component-header-icon group-hover :text-base-foreground"
43+ class =" text-muted-foreground group-hover: text-base-foreground group-focus :text-base-foreground"
4444 />
4545 </button >
4646 </div >
0 commit comments