@ztrehagem/nuxt-thin-modal
v1.0.1
Published
Inject $modal of vue-thin-modal into store and context of Nuxt.js.
Downloads
2
Maintainers
Readme
@ztrehagem/nuxt-thin-modal
This plugin injects $modal
of vue-thin-modal into store and context.
Installation
$ npm install @ztrehagem/nuxt-thin-modal
Usage
Edit your nuxt.config.js
.
module.exports = {
plugins: [
'@ztrehagem/nuxt-thin-modal'
]
}
Then you can access $modal
in components, stores and context.
// in components and store
this.$modal
// via context object
context.app.$modal
Note that, the auto installing is disabled in this plugin.
In other words, you must mount <modal-portal>
component manually. (see Manually mount portal)