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

Diff for: index.js

+10
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)