An open API service indexing awesome lists of open source software.

https://github.com/ztrehagem/nuxt-thin-modal

Inject $modal of vue-thin-modal into store and context of Nuxt.js.
https://github.com/ztrehagem/nuxt-thin-modal

Last synced: 3 months ago
JSON representation

Inject $modal of vue-thin-modal into store and context of Nuxt.js.

Awesome Lists containing this project

README

        

# @ztrehagem/nuxt-thin-modal

This plugin injects `$modal` of [vue-thin-modal](https://github.com/ktsn/vue-thin-modal) into store and context.

## Installation

```
$ npm install @ztrehagem/nuxt-thin-modal
```

## Usage

Edit your `nuxt.config.js`.

```js
module.exports = {
plugins: [
'@ztrehagem/nuxt-thin-modal'
]
}
```

Then you can access `$modal` in components, stores and context.

```js
// 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 `` component manually. (see [Manually mount portal](https://github.com/ktsn/vue-thin-modal#manually-mount-portal))