首页 > 解决方案 > 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?

标签: javascriptvue.js

解决方案


推荐阅读