Some questions about the source code of the teleport component(vue 3.5.14) #13538
              
                Unanswered
              
          
                  
                    
                      mealcomes
                    
                  
                
                  asked this question in
                Help/Questions
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Above is a portion of the Teleport component. Why when moving children, the parameter we pass to the
movefunction isparentAnchor?At the same time, when themoveTypeisTARGET_CHANGE, why we just update thetargetAnchorwithouttargetStart?Now I write some code like above. When the teleport is updated. The
targetAnchorofvnodemoves will be the start of the chilren.AndtargetStartis still belong to the old target andvnode.targetStart[Symbol(_vte)]is not updated.Is this OK?
And for the first question, why not change it to something like this when moving children in
moveTeleport?Beta Was this translation helpful? Give feedback.
All reactions