zoukankan      html  css  js  c++  java
  • Vue文件 引入.js文件 的组件

    Vue.component('remote-script', {
    
        render: function (createElement) {
            var self = this;
            return createElement('script', {
                attrs: {
                    type: 'text/javascript',
                    src: this.src
                },
                on: {
                    load: function (event) {
                        self.$emit('load', event);
                    },
                    error: function (event) {
                        self.$emit('error', event);
                    },
                    readystatechange: function (event) {
                        if (this.readyState == 'complete') {
                            self.$emit('load', event);
                        }
                    }
                }
            });
        },
    
        props: {
            src: {
                type: String,
                required: true
            }
        }
    });
  • 相关阅读:
    Codeforces 526D Om Nom and Necklace (KMP)
    HDU
    HDU
    Codeforces 219D
    HDU
    HDU
    POJ
    HDU
    HDU
    第二次作业
  • 原文地址:https://www.cnblogs.com/likewpp/p/9554576.html
Copyright © 2011-2022 走看看