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

fix(components): [InfiniteScroll] error caused by value of el[SCOPE] #16686

Merged
merged 4 commits into from Apr 30, 2024

Conversation

YiMo1
Copy link
Contributor

@YiMo1 YiMo1 commented Apr 27, 2024

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow contributing guide English | (中文 | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer to relative issues for your PR.

resolves #14776
resolves #14775

复现步骤

  1. 创建五个文件:

    • App.vue:

      <RouterLink to="/pageA/subA">PageA</RouterLink>
      <RouterLink to="/pageB/subB">PageB</RouterLink>
      <RouterView v-slot="{ Component }">
        <KeepAlive>
          <component :is="Component" />
        </KeepAlive>
      </RouterView>
    • PageA.vue:

      <div>
        PageA
        <router-view />
      </div>
    • PageB.vue:

      <div>
        PageB
        <router-view />
      </div>
    • subPageA.vue:

      <div v-infinite-scroll="fn"></div>
    • subPageB.vue:

      <div v-infinite-scroll="fn"></div>
  2. 配置路由结构:

    {
      path: "/pageA",
      component: PageA.vue,
      children: [{  path: "subA",component: subPageA.vue } ],
    },
    {
      path: "/pageB",
      component:  PageB.vue,
      children: [{  path: "subB",component: subPageB.vue } ],
    }
  3. 来回点击两个路由链接即可。

控制台报错信息

image

Copy link

👋 @YiMo1, seems like this is your first time contribution to element-plus.

  • Please make sure that you have read our guidelines and code of conduct before making a contribution.
  • You can comment with /label Components:[component_name] to add a label for which component you are working on.
  • You may join our Discord for staying tuned.

@pull-request-triage pull-request-triage bot added 1st contribution Their very first contribution Needs Review labels Apr 27, 2024
Copy link

Hello @YiMo1, thank you for contributing to element-plus, please see our guideline to see how to make contribution

Copy link

github-actions bot commented Apr 27, 2024

@github-actions github-actions bot added the CommitMessage::Qualified Qualified commit message label Apr 28, 2024
Copy link

github-actions bot commented Apr 28, 2024

🧪 Playground Preview: https://element-plus.run/?pr=16686
Please comment the example via this playground if needed.

@kooriookami kooriookami merged commit 982640d into element-plus:dev Apr 30, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Component] [infinite-scroll] 当 v-infinite-scroll 释放的时候, SCOPE 不存在导致的错误
3 participants