Home > front end >  How in vue jump to js vscode defined global function?
How in vue jump to js vscode defined global function?

Time:09-15

. Vue file invokes the js configuration inside a global approach, how can in vscode Alt + click to jump to the definition of method?

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
  • Related