Skip to content

Commit b6ff5fc

Browse files
committed
Merge branch 'dev' into next
2 parents 0c7e614 + ddac6af commit b6ff5fc

19 files changed

+160
-100
lines changed

.prettierrc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# .prettierrc or .prettierrc.yaml
2-
# printWidth: 80
2+
printWidth: 120
33
tabWidth: 2
44
semi: false
55
singleQuote: true

README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ yarn add vue-final-modal
8484
```js
8585
import VueFinalModal from 'vue-final-modal'
8686

87-
Vue.use(VueFinalModal)
87+
Vue.use(VueFinalModal())
8888
```
8989

9090
### Nuxt
@@ -95,7 +95,7 @@ Vue.use(VueFinalModal)
9595
// plugins/vue-final-modal.js
9696
import VueFinalModal from 'vue-final-modal/lib'
9797

98-
Vue.use(VueFinalModal)
98+
Vue.use(VueFinalModal())
9999
```
100100

101101
- **Add plugin into `nuxt.config.js`**
@@ -152,6 +152,33 @@ export default {
152152
this.$vfm.show('example')
153153
```
154154

155+
## **Configuration**
156+
157+
> Only work in v0.18+
158+
159+
Configuration options can be passed as a second argument to `Vue.use`.
160+
161+
```js
162+
import VueFinalModal from 'vue-final-modal'
163+
164+
Vue.use(VueFinalModal(), { ... })
165+
```
166+
167+
### `componentName`
168+
169+
- Type: `String`
170+
- default: `'VueFinalModal'`
171+
172+
Changes component name from "VueFinalModal" to any other string value. It is useful when there is already a global "modal" component.
173+
174+
### `key`
175+
176+
- Type: `String`
177+
- default: `'$vfm'`
178+
179+
Changes API name from "$vfm" to any other string value. It is useful when you use `vue-final-modal` as spinner, toast, notify, etc.
180+
181+
155182
## **API**
156183

157184
Plugin API can be called within any component through `this.$vfm`.

dist/VueFinalModal.esm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/VueFinalModal.esm.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/VueFinalModal.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/VueFinalModal.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/content/en/index.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Introduction
33
description: 'Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.'
44
position: 0
55
category: Getting Start
6-
version: 0.17
6+
version: 0.18
77
features:
88
- Support Vue 3 and Vue 2
99
- Tailwind CSS friendly
@@ -100,7 +100,7 @@ npm install vue-final-modal
100100
```js[main.js]
101101
import VueFinalModal from 'vue-final-modal'
102102
103-
Vue.use(VueFinalModal)
103+
Vue.use(VueFinalModal())
104104
```
105105

106106
### Nuxt
@@ -110,7 +110,7 @@ Vue.use(VueFinalModal)
110110
```js[plugins/vue-final-modal.js]
111111
import VueFinalModal from 'vue-final-modal/lib'
112112
113-
Vue.use(VueFinalModal)
113+
Vue.use(VueFinalModal())
114114
```
115115

116116
- **Add plugin into `nuxt.config.js`**
@@ -166,6 +166,32 @@ export default {
166166
this.$vfm.show('example')
167167
```
168168

169+
## **Configuration**
170+
171+
<badge>v0.18+</badge>
172+
173+
Configuration options can be passed as a second argument to `Vue.use`.
174+
175+
```js
176+
import VueFinalModal from 'vue-final-modal'
177+
178+
Vue.use(VueFinalModal(), { ... })
179+
```
180+
181+
### `componentName`
182+
183+
- Type: `String`
184+
- default: `'VueFinalModal'`
185+
186+
Changes component name from "VueFinalModal" to any other string value. It is useful when there is already a global "modal" component.
187+
188+
### `key`
189+
190+
- Type: `String`
191+
- default: `'$vfm'`
192+
193+
Changes API name from "$vfm" to any other string value. It is useful when you use `vue-final-modal` as spinner, toast, notify, etc.
194+
169195
## **API**
170196

171197
<badge>v0.15+</badge>

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"@nuxt/content-theme-docs": "^0.6.1",
1313
"nuxt": "^2.14.1",
14-
"vue-final-modal": "^0.16.0"
14+
"vue-final-modal": "^0.18.0"
1515
},
1616
"devDependencies": {
1717
"@nuxtjs/google-analytics": "^2.4.0",

docs/plugins/global.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Vue from 'vue'
22

33
import VueFinalModal from 'vue-final-modal/lib'
44

5-
Vue.use(VueFinalModal)
5+
Vue.use(VueFinalModal())
66

77
import components from '../../example/src/components/index.js'
88
Object.keys(components).forEach(name => {

docs/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9899,10 +9899,10 @@ vue-client-only@^2.0.0:
98999899
resolved "https://registry.yarnpkg.com/vue-client-only/-/vue-client-only-2.0.0.tgz#ddad8d675ee02c761a14229f0e440e219de1da1c"
99009900
integrity sha512-arhk1wtWAfLsJyxGMoEYhoBowM87/i6HLSG2LH/03Yog6i2d9JEN1peMP0Ceis+/n9DxdenGYZZTxbPPJyHciA==
99019901

9902-
vue-final-modal@^0.16.0:
9903-
version "0.16.0"
9904-
resolved "https://registry.yarnpkg.com/vue-final-modal/-/vue-final-modal-0.16.0.tgz#9dc0a9246a8da25f6bceff6e5f78ff2a292d9a88"
9905-
integrity sha512-JJQQxo2b5xnqX5cqN239cUZZ+83AFrp1eM+rpw+DfmWX1UvxcIu83n8TK3//N8mGHNQiXVvWHSv4JeW9716EDA==
9902+
vue-final-modal@^0.18.0:
9903+
version "0.18.0"
9904+
resolved "https://registry.yarnpkg.com/vue-final-modal/-/vue-final-modal-0.18.0.tgz#8525133d68b9f7e63af38610d1ee5f59deae4646"
9905+
integrity sha512-yeso4SfPXg0wpLNc42YwZnbG0BTNfDLPgmWE8OIsFBHtRq/+gdd+vj1kJNefJbiv+1f6r0xe6Ac54C+DlGo/Eg==
99069906

99079907
vue-hot-reload-api@^2.3.0:
99089908
version "2.3.4"

0 commit comments

Comments
 (0)