Skip to content

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

@twnaing

Description

@twnaing

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions