File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed 
docs/.vitepress/theme/glare-card Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 3030        <div 
3131            v-if =" model" 
3232            class =" fixed z-[110] top-0 left-0 flex justify-center items-center w-full h-screen px-8" 
33-             @click =" () => setCard( false) " 
33+             @click =" model =  false" 
3434        >
3535            <motion .div 
3636                key =" glare" 
7575
7676<script  setup lang="ts">
7777import  { motion , cubicBezier , AnimatePresence  } from  ' motion-v' 
78+ import  { watch  } from  ' vue' 
7879
7980import  Card  from  ' ./card.vue' 
8081
81- const =  defineModel ()
82+ const =  defineModel ({ default:  false  } )
8283
83- const =  (value :  boolean ) =>  {
84-     model .value  =  value  
85-     if  (model .value ) { 
84+ watch (model , (value ) =>  {
85+     if  (value ) { 
8686        document .documentElement .classList .add (' overflow-hidden'  
8787        document .body .classList .add (' overflow-hidden'  
8888    } else  { 
8989        document .documentElement .classList .remove (' overflow-hidden'  
9090        document .body .classList .remove (' overflow-hidden'  
9191    } 
92- } 
92+ }, { immediate:  true  })  
9393script >
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments