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

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b41f00-2c5e6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b41f00-2c5e6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?