Vue 组件内引入外部在线js、css

参考:https://blog.csdn.net/u010881899/article/details/80895661

例:引入element-ui

js:

mounted() {
    const oScript = document.createElement('script');
    oScript.type = 'text/javascript';
    oScript.src = 'https://unpkg.com/[email protected]/lib/index.js';
    document.body.appendChild(oScript);
}

css:


你可能感兴趣的:(Vue 组件内引入外部在线js、css)