Function app.use()
Installs a plugin
interface App {
use(plugin: Plugin, ...options: any[]): this
}
The plugin can either be an object with an
install()
method, or just a function that will
be used as the install()
method.
When app.use()
is called on the same plugin
multiple times, the plugin will be installed
only once.
import { createApp } from 'vue'
import MyPlugin from './plugins/MyPlugin'
const app = createApp({
/* ... */
})
app.use(MyPlugin)