javascript - How to stop using a plugin in vue?
问题描述
I installed a custom plugin in vue
import Plugin from 'plugin'
if (some condition)
Vue.use(Plugin)
else
// some code.
I imported the plugin and used it using Vue.use(). I wanted to use that plugin based on some condition. In the else block i dont need the plugin.
In the else block also the plugin is available if Vue.use() is executed. Is there any way that i can unset or unuse the cusom plugin?
解决方案
推荐阅读
- python - 如何将 CIFAR 数据集转换为与 MNIST 相同的格式
- python - 对多个变量/列进行分组的最快方法
- mysql - 跨两个表检索数据
- python - 如何使用 spacy 的名称实体识别提供包含元组的关系提取数据集以进行随意推理?
- javascript - 在不同的域上发布表单
- rust - 使用 trait 对象实现可变树结构
- arrays - 如何防止数组在语义 UI 表中连接
- vue.js - vue元素复选框在编辑模式下不起作用
- c++ - 如何修复 Shutting Yard 算法中的运行时错误
- react-select - 如果 onChange 事件没有触发,有没有办法在 React-Selects Select 中获取当前值?