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

为什么 layout 组件里的 onPageScroll 不触发 #46

Open
4 tasks done
elkon028 opened this issue Aug 17, 2024 · 0 comments
Open
4 tasks done

为什么 layout 组件里的 onPageScroll 不触发 #46

elkon028 opened this issue Aug 17, 2024 · 0 comments

Comments

@elkon028
Copy link

描述问题

布局组件 src/layouts/default.vue 里的 onPageScroll 不触发

复现

  • src/layouts/default.vue
<script setup lang="ts">
onPageScroll((event) => {
  console.log(event) // 未触发
})
</script>

<template>
  <slot>main</slot>
</template>

系统信息

基础环境信息:

  • os: macOS 14.6.1
  • node: 20.16.0
  • packageManager: pnpm
  • vscode: 1.92.2
  • volar: 2.0.28

基础依赖信息:

  • vue: 3.4.38
  • vite: 5.4.1
  • @dcloudio/uni-app: 3.0.0-4020420240722002

uni-helper依赖信息:

  • @uni-helper/vite-plugin-uni-layouts: 0.1.10

使用的包管理器

pnpm

核对

  • 遵循我们的 行为准则
  • 检查是否已经有一个报告相同错误的问题,以避免重复创建。
  • 这是一个具体的错误。请开启 GitHub 讨论你的疑问。
  • 所提供的复现是这个问题的 最小复现
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant