Why is my global reference to the mint-ui framework invalid?

install module:

npm install mint-ui -S

mains.js:

import Mint from "mint-ui";
import "mint-ui/lib/style.css"
Vue.use(Mint);

I want to use the toash component now
using the toash component in xx.vue he will prompt that he cannot find
if I add this sentence: import {Toast} from "mint-ui" you can

Q:
but I have already referenced it globally in main.js. Why do I have to quote it locally once

?

multiple import, will only be introduced once, don't worry. As for why you have to import, many times or there are no variable references, you must have reported an error.


you are right to write this, but individual ones such as toast, Indicator, etc. (those that do not need to be Vue.use (xxx) on the page) need to be introduced separately, or you can directly this.$toast ({})

.
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-1bee3a5-31bbd.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-1bee3a5-31bbd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?