GithubHelp home page GithubHelp logo

Comments (7)

hjl19911127 avatar hjl19911127 commented on May 10, 2024 1

Thanks for your feedback.I'm trying to confirm this problem.

from vue-drawer-layout.

sbefort avatar sbefort commented on May 10, 2024 1

It does not work with Nuxt because Nuxt is for both server-side and client-side rendering. The component references the window object, which is not available on the server. We can fix this by adding conditions to check whether or not the component has been loaded on the server or client.

What is the purpose of this code?

window.addEventListener("test", null, opts);

It's on line 23 of DrawerLayout.vue.

from vue-drawer-layout.

sbefort avatar sbefort commented on May 10, 2024 1

I don't think your code should reference the window object until the mounted life cycle hook is called. That will guarantee that the component has been loaded in the browser rather than the server. If you can do that, your component will work with server-side rendering frameworks like Nuxt.

mounted() is only executed on the client side.

from vue-drawer-layout.

hjl19911127 avatar hjl19911127 commented on May 10, 2024

Would you mind offering me more information about this problem ?Looks like your problem is about a variable named 'middleware' .Could you show me some source code around this problem?

from vue-drawer-layout.

hjl19911127 avatar hjl19911127 commented on May 10, 2024

It a detection of passive event.

from vue-drawer-layout.

hjl19911127 avatar hjl19911127 commented on May 10, 2024

I found that it is wrapped in try..catch block. Will it still be wrong? So do you got any suggestion about the question?

from vue-drawer-layout.

hjl19911127 avatar hjl19911127 commented on May 10, 2024

I publish v0.3.5 that put it in mounted hook.Hope you try it.:)

from vue-drawer-layout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.