我们在我们的项目中使用vue-js-modal,我想从不在vue组件中的代码中打开一个模式。这些文档只说明如何从组件中使用API。有一种方法可以从任何地方操作vue-js-modal?
X问题,当router.onError((error)=>...)中出现路由器错误时,我想用弹出警告用户
发布于 2020-08-10 15:56:11
实例化一个新的Vue对象,允许访问$modal API入口点:
const vue = new Vue();
vue.$modal.show({template:'<div>Error during loading...</div>'});https://stackoverflow.com/questions/63343204
复制相似问题