As shown above, how to use SvgInjector in mounted?React The party expressed some doubts. . .
SvgInjector
mounted
React
Put it directly into the static folder in the vue root directory,
to
<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
You introduced SvgInjector
Then you use SVGInjector when mounted...
You definitely won’t need it. .
You spelled it wrong, pay attention to capitalization
Put it directly into the static folder in the vue root directory,
Addto
indexThen 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
You introduced SvgInjector
Then you use SVGInjector when mounted...
You definitely won’t need it. .