export default和export

https://blog.csdn.net/Thekingyu/article/details/80713354

  1. When ①import imported function inside the js file directly from the individual name, and then use the alias method on it.
  2. ② direct representation braces
    Here Insert Picture DescriptionHere Insert Picture Description
  3. Global reference in main.js added directly
    Here Insert Picture Description
    Here Insert Picture Description
    used, then it: like this: this.commonMap.initMap ()

This is what I wrote before another global js:This is what I wrote before another global js

There 2.eslint Default Default export export default {}.
A document which can have a default, but can have multiple Export.
* May be understood as a default target
Here Insert Picture Description

Published 98 original articles · won praise 4 · views 20000 +

Guess you like

Origin blog.csdn.net/weixin_42416812/article/details/102727496