Skip to content

Commit 3eb77c5

Browse files
committed
feat: allow opening a navigator modal
1 parent b58b36b commit 3eb77c5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,16 @@ export default function install(Vue, {routes}) {
7272
back(options, ...args) {
7373
options = Object.assign({frame: 'navigator'}, options)
7474
return this.$navigateBack.call(this, options, ...args)
75+
},
76+
modal(to, options) {
77+
return appRoot.$showModal({
78+
render: h => h(Navigator, {
79+
props: {
80+
id: options.id || 'navigatorModal',
81+
defaultRoute: to
82+
}
83+
})
84+
}, options).catch(err => console.log(`[Navigator] Failed to show modal: ${err}`))
7585
}
7686
},
7787
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy