Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

前端:修复嵌套布局KeepAlive混乱的问题 #116

Open
lauer3912 opened this issue Jul 4, 2022 · 0 comments
Open

前端:修复嵌套布局KeepAlive混乱的问题 #116

lauer3912 opened this issue Jul 4, 2022 · 0 comments
Labels

Comments

@lauer3912
Copy link
Owner

图片

// 关键源码
 if (mode === 'out-in') {
        // return placeholder node and queue update when leave finishes
        this._leaving = true
        mergeVNodeHook(oldData, 'afterLeave', () => {
          this._leaving = false
          this.$forceUpdate()
        })
        return placeholder(h, rawChild)
      }
// 最终代码
      // handle transition mode
      if (mode === 'out-in') {
        // return placeholder node and queue update when leave finishes
        this._leaving = true
        mergeVNodeHook(oldData, 'afterLeave', () => {
          this._leaving = false
          this.$forceUpdate()
        })
        if (!/\d-keep-alive$/.test(rawChild.tag)) {
          return placeholder(h, rawChild);
        }
      } 
@lauer3912 lauer3912 added 问题解答 技术栈:Vue Vue 技术栈相关 labels Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant