function dynamicLoadScript(src) {
return new Promise((resolve, reject) => {
if(src.type === 'js'){
const script = document.createElement('script');
script.src = src.url;
script.onload = function () {
resolve(src.url);
};
vue 动态加载js
最新推荐文章于 2024-07-16 16:55:06 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)