Skip to content

Commit 7b3918f

Browse files
committed
Merge branch 'dev' into feature/dynamic-modal
2 parents 327caa2 + b2e85ee commit 7b3918f

File tree

10 files changed

+24
-14
lines changed

10 files changed

+24
-14
lines changed

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ Calculate `z-index` automatically with zIndexBase. If zIndex is set, `zIndexAuto
502502

503503
Set specific `z-index` to root of the modal element. If zIndex is set, `zIndexAuto`, `zIndexBase` will be ignored.
504504

505-
### `focusRemain`
505+
### `focusRetain`
506506

507507
- Type: `Boolean`
508508
- Default: `true`

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.8",
14-
"vue-final-modal": "^0.21.1"
14+
"vue-final-modal": "^0.21.3"
1515
},
1616
"devDependencies": {
1717
"@nuxtjs/google-analytics": "^2.4.0",

docs/yarn.lock

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

9951-
vue-final-modal@^0.21.1:
9952-
version "0.21.1"
9953-
resolved "https://registry.yarnpkg.com/vue-final-modal/-/vue-final-modal-0.21.1.tgz#ae869a06eeaf727cb6810b4c4c2ca806acba6a9b"
9954-
integrity sha512-BdvqIb7pHCLTOlf+ldP8VcUg3/rm9Sk1fXCa3fuR9buTceIT+rtKsVLoTPFSVwI7wYwVv9ZBwHNjDRiyj2ydCQ==
9951+
vue-final-modal@^0.21.3:
9952+
version "0.21.3"
9953+
resolved "https://registry.yarnpkg.com/vue-final-modal/-/vue-final-modal-0.21.3.tgz#74a2ae88d6d0c7afc9f822c3bfbe7a99c4c8014d"
9954+
integrity sha512-8l1uMi+k8TSFtIJobtl1J3pYabD4AjgtavTxflDHckVI+XI7nwvMWotMbWCAs+rHQ83Hnz4QGq/Z1JefA/ZsqA==
99559955

99569956
vue-hot-reload-api@^2.3.0:
99579957
version "2.3.4"

lib/PluginCore.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ function createVfm(Vue, options) {
6161
return this.modals.filter(modal => modal.name === name)
6262
},
6363
dynamicModals: [],
64-
get openedModals() {
65-
return this.modals.filter(modal => modal.value)
66-
},
64+
openedModals: [],
6765
modals: []
6866
}
6967
return Vue.observable(vfm)

lib/VueFinalModal.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,13 @@ export default {
193193
if (target || this.attach === false) {
194194
this.attach !== false && target.appendChild(this.$el)
195195
196+
let index = this.api.openedModals.findIndex(vm => vm === this)
197+
if (index !== -1) {
198+
// if this is already exist in modalStack, delete it
199+
this.api.openedModals.splice(index, 1)
200+
}
201+
this.api.openedModals.push(this)
202+
196203
this.modalStackIndex = this.api.openedModals.length - 1
197204
198205
this.handleLockScroll()
@@ -216,6 +223,11 @@ export default {
216223
}
217224
},
218225
close() {
226+
let index = this.api.openedModals.findIndex(vm => vm === this)
227+
if (index !== -1) {
228+
// remove this in modalStack
229+
this.api.openedModals.splice(index, 1)
230+
}
219231
if (this.api.openedModals.length > 0) {
220232
// If there are still nested modals opened
221233
const $_vm = this.api.openedModals[this.api.openedModals.length - 1]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-final-modal",
3-
"version": "0.21.1",
3+
"version": "0.21.3",
44
"description": "Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.",
55
"private": false,
66
"main": "dist/VueFinalModal.umd.js",

0 commit comments

Comments
 (0)