Why does vue introduce mintUI in the portal file but not use it in the component?

Why do I still prompt "Toast" is not defined " when I have introduced it globally in the entry file?

import Mint from "mint-ui"
import "mint-ui/lib/style.css"
Vue.use(Mint)
test () {
  Toast("")
}
Jan.08,2022

I haven't used Mint-UI either. But the UI framework should be pretty much the same.
you can try
if main.js is introduced globally, you can try using this.$Toast ('prompt') in the subcomponents.

if you insist on using Toast directly ('.') If so, first introduce Toast into the component.
import {Toast} from 'mint-ui'


if you look at the source code below, Vue.use actually calls this install function, in which Toast is hung on the prototypes of Vue and Vue, so the calling method should be in the following ways:

this.$toastVue
Vue.$toast
Vue.prototype.$toast

cannot call Toast, directly unless you deconstruct and import Toast separately where you use it.
clipboard.png

Menu