【问题标题】:Object doesn't support property or method "_super" in igGrid对象不支持 igGrid 中的属性或方法“_super”
【发布时间】:2016-04-26 10:36:13
【问题描述】:

我在我的应用程序中使用了infragisticsigGrid,但出现javascript 错误

对象不支持属性或方法“_super”

我知道这可以避免,但出于某些原因,我想给它一个虚假的实现(或真正的答案,可能会添加一些缺失的参考)。我尝试关注但没有工作。

var _super = function(a,s,d,f,g,h) {
}

在引用igGrid JS 库之前,我已经编写了上述代码。

在代码中,_super 在调用它时具有可变数量的参数。

【问题讨论】:

    标签: javascript jquery infragistics ignite-ui iggrid


    【解决方案1】:

    您可能引用了一个尚未实现 _super_superApply 的 jQuery UI 版本。尝试引用最新版本,错误应该会消失。

    https://bugs.jqueryui.com/ticket/6861

    【讨论】:

      【解决方案2】:

      如果我理解正确,您正在尝试使用超出范围的_super。您可以像这样在对象范围内使用_super

      (function ($) {
      
          $.ig.RPCDataSource = $.ig.RPCDataSource || $.ig.RESTDataSource.extend({
      
          _processJsonResponse: function (data, context) {
                  try {
                     console.log('my special preprocessing');
                     return this._super(data, context);
                  } catch (e) {
                      console.log(e.message);
                      // my special error handling
                  } 
              },
         });
      }(jQuery));
      

      更新 _super 是来自 jQuery widget factory 的方法。 iG 控件基于 jQuery Widget。因此,_super 是在 jQuery 小部件中定义的。

      【讨论】:

      • 我没有在任何地方使用 super,图书馆在内部使用它。但它没有在任何地方定义
      猜你喜欢
      • 1970-01-01
      • 2019-07-05
      • 2015-04-14
      • 2020-09-03
      • 2015-04-09
      • 2014-01-12
      • 2016-08-20
      • 2013-10-05
      • 1970-01-01
      相关资源
      最近更新 更多