EXTJS7 自定义组件 IFRAME

Ext.define('PSR.Iframe', {
    extend: 'Ext.Component',
    xtype: 'psr-iframe',
    config: {
        src: null
    },
    element: {
        reference: 'element',
        children: [{
            reference: 'iframe', tag: 'iframe', frameborder: "0", width: "100%", height: "100%"
        }]
    },
    updateSrc: function (newSrc) {
        this.iframe.dom.setAttribute('src', Ext.isString(newSrc) ? newSrc : '');
    },
});

posted on 2020-04-07 10:43  路过君  阅读(74)  评论(0编辑  收藏  举报

导航