Skip to content
This repository has been archived by the owner on Jul 10, 2022. It is now read-only.

[Feature] Global defaults #64

Open
jadell opened this issue Nov 30, 2018 · 2 comments
Open

[Feature] Global defaults #64

jadell opened this issue Nov 30, 2018 · 2 comments

Comments

@jadell
Copy link

jadell commented Nov 30, 2018

We have multiple templates using vuebar, and repeated config in each, even within the same template.

It would be useful to set up global default config when including the mixin in Vue. Of course, options included with the directive in the template should override global defaults.

Something like:

import Vuebar from 'vuebar';
Vue.use(Vuebar, {
  defaults: {
    el1Class: 'foo',
    useScrollbarPseudo: true,
    unselectableBody: false
    // etc...
  }
});

Don't have time to try my hand at this and make a PR right now, but just leaving a note that this would be a useful addition.

@DominikSerafin
Copy link
Owner

Hi @jadell, this looks interesting, thanks! I'll look into incorporating it into upcoming Vuebar 2.0.

@Kenvdb
Copy link

Kenvdb commented May 8, 2019

@DominikSerafin I'm trying to change the default class name, but it looks like it ain't working?

Vue.use(Vuebar, { defaults: { el1Class: 'foo' } });

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants