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

how to use setLayout/loadLayout of runtime/App.js #134

Open
twnaing opened this issue Jul 1, 2021 · 0 comments
Open

how to use setLayout/loadLayout of runtime/App.js #134

twnaing opened this issue Jul 1, 2021 · 0 comments

Comments

@twnaing
Copy link

twnaing commented Jul 1, 2021

I see the abov-mentioned stub methods here

    setLayout (layout) {
      // STUB
    },
    loadLayout (layout) {
      // STUB
    }

I was wondering

  • the methods are already hooked to framework7 app.on('init') event? EDIT: the methods are hooked.
  • how can I use those methods?
    • can I override in pages methods? (I cannot override in page methods)
    • do I have to override the whole App.js? (I have no idea how to do it)

I want to load the theme setting from vuex store (which is persisted). Currently I am trying to do that in every pages' created event (which is clearly not a good idea and produced a lot of duplicate codes).

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