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.
- Host: GitHub
- URL: https://github.com/ztrehagem/nuxt-thin-modal
- Owner: ztrehagem
- Created: 2020-01-02T15:17:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-20T00:24:34.000Z (about 4 years ago)
- Last Synced: 2025-03-04T06:48:04.335Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 911 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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))