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

在nuxt3项目中如何使用 #56

Open
const-undefined-man opened this issue Nov 22, 2024 · 0 comments
Open

在nuxt3项目中如何使用 #56

const-undefined-man opened this issue Nov 22, 2024 · 0 comments

Comments

@const-undefined-man
Copy link

如题,我定义了一个插件:

import SeamlessScroll from 'vue3-seamless-scroll'
export default defineNuxtPlugin({
  name: 'vue3-seamless-scroll',
  async setup (nuxtApp) {
    nuxtApp.vueApp.use(SeamlessScroll, { name: 'vue3-seamless-scroll' })
  },
  env: {
    islands: true
  }
})

然后在nuxt.config.ts文件配置了一下

plugins: [
    {
      src: '@/plugins/vue-seamless-scroll',
      ssr: false
    }
  ]

然后在页面正常使用,就会报错:
image

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