ExtJS / Javascript - 自动扩展警报 window height/wrap text 文本大小

ExtJS / Javascript - Auto expand alert window height/wrap text text size

正在寻找有关如何让警报 window 在显示其中的数据时自动展开的建议。

警报 window 的工作方式,当我的网格中的一行被双击时,它会在警报 window 中显示存储在 "command_output" 中的数据。

我面临的问题是,有时 command_output 可以是 5000 个字符,其中没有任何空格。当警报 window 弹出时,它保持默认宽度并且只显示适合一行的字符,其余的被剪掉。

如何让我的警报 window 在换行文本时自动扩展高度?

我正在使用 ExtJS 5.0.1

Popup window

    onDoubleClick: function(grid, record) {
    Ext.Msg.show({
        title : 'Copy the Dossier',
        msg : record.get('command_output'),
        closable : false,
        buttons : Ext.Msg.YESNO,
        buttonText : 
            {
                            yes : 'I copied the dossier - lets continue',
                            no : "Oops this isn't the dossier - lets go back"
            },
                    icon : Ext.Msg.INFO
                    });
       }

我设法使用 CSS 解决了这个问题。

css

.msg-wrap {
word-wrap: break-word !important;
white-space: normal !important;

}

函数

onDoubleClick: function(grid, record) {
    Ext.Msg.show({
        xtype: 'panel',
        title : 'Copy the Dossier',
        message : record.get('command_output'),
        width: 600,
        cls: 'msg-wrap',
        buttons : Ext.Msg.YESNO,
        multiline: false,
        buttonText : 
            {
                            yes : 'I copied the dossier - lets continue',
                            no : "Oops this isn't the dossier - lets go back"
            },
                    icon : Ext.Msg.INFO
                    });
       }