【问题标题】:ExtJS4 MessageBox Throws ErrorExtJS4 消息框抛出错误
【发布时间】:2014-01-07 05:04:15
【问题描述】:

使用以下函数:

function showError(ptitle,perror){
    Ext.Msg.show({
        title: ptitle,
        icon: Ext.MessageBox.ERROR,
        msg: perror,
        buttons: Ext.MessageBox.OK
    });
}

我收到以下错误:

Uncaught TypeError: Cannot read property 'ERROR' of undefined 

我看不出这个代码有问题。任何帮助,将不胜感激。

【问题讨论】:

    标签: extjs4 runtime-error


    【解决方案1】:

    相同的代码在我的地方工作, 只需尝试 Ext.Msg.ERROR 而不是 Ext.MessageBox.ERROR。

    【讨论】:

      【解决方案2】:

      这应该可行:

      Ext.MessageBox.show({
          title: ptitle,
          icon: Ext.MessageBox.ERROR,
          msg: perror,
          buttons: Ext.MessageBox.OK
      });
      

      【讨论】:

        猜你喜欢
        • 2017-11-26
        • 1970-01-01
        • 2016-03-04
        • 1970-01-01
        • 1970-01-01
        • 2017-11-23
        • 2019-04-08
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多