As shown above, how to use SvgInjector
in mounted
?React
The party expressed some doubts. . .
曾经蜡笔没有小新2017-06-26 10:53:54
Put it directly into the static folder in the vue root directory,
Addto
index<script src="/static/xxx.min.js"></script>
//注意是绝对路径
Then follow the official documentation
Just use it directly
Here is why it is best to use it this way,
Because if you import too many third-party libraries, they will be packaged into the final js loaded for the first time.
will make him big,
The first loading will be slow
伊谢尔伦2017-06-26 10:53:54
You introduced SvgInjector
Then you use SVGInjector when mounted...
You definitely won’t need it. .