Vue -help vue is installed - peek, no,
Step
1. Define globalFun. Js registered global function
Exports. Install=function (Vue) {
Vue. Prototype. $G_IsMobile=function () {
.
Return flag;
};
};
2. Main. Js introduced inside the
The import globalFun from "@ utils/globalFun. Js";
Vue. Use (globalFun);//register custom global function
3. The vue files inside use
This $G_IsMobile ()
CodePudding user response:
Give it a try after VScode corresponding expand your download