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 2022-04-11 22:40  路过君  阅读(28)  评论(0编辑  收藏  举报

导航