通过ExtJS运行Wijmo SpreadJS时出错

时间:2015-01-29 13:00:03

标签: extjs spreadsheet wijmo

我编写了一个脚本,使用Wijmo库(spreadJS)创建类似Excel的电子表格。我尝试将此电子表格集成到ExtJS面板中但出现错误:未捕获的TypeError:undefined不是函数

我有两个文件。第一个是index.html,其中包含对库和SpreadJS脚本的所有引用,如下所示:

 <!DOCTYPE html>
 <html>
  <head>

    <link rel="stylesheet" type="text/css" href="ext-5.1.0/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css">
    <script type="text/javascript" src="ext-5.1.0/packages/ext-theme-neptune/build/ext-theme-neptune.js"></script>
    <script type="text/javascript" src="ext-5.1.0/build/ext-all.js"></script>

    <script type ="text/javascript" src="appEx.js"></script>



    <!--jQuery References-->
    <script src="http://code.jquery.com/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js" type="text/javascript"></script>

    <!--Theme-->
    <link href="http://cdn.wijmo.com/themes/aristo/jquery-wijmo.css" rel="stylesheet" type="text/css" title="rocket-jqueryui"/>

    <!--Wijmo Widgets CSS-->
    <link href="http://cdn.wijmo.com/jquery.wijmo-pro.all.3.20131.3.min.css" rel="stylesheet" type="text/css" />

    <!--Wijmo Widgets JavaScript-->
    <script src="http://cdn.wijmo.com/jquery.wijmo-open.all.3.20131.3.min.js" type="text/javascript"></script>
    <script src="http://cdn.wijmo.com/jquery.wijmo-pro.all.3.20131.3.min.js" type="text/javascript"></script>

    <!-- SpreadJS CSS and script -->
    <script src="http://cdn.wijmo.com/spreadjs/jquery.wijmo.wijspread.all.1.20131.1.min.js" type="text/javascript"></script>
    <link href="http://cdn.wijmo.com/spreadjs/jquery.wijmo.wijspread.1.20131.1.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">
$(document).ready(function () {
            $("#ss").wijspread({ sheetCount: 2 }); // create wijspread widget instance
            var spread = $("#ss").wijspread("spread"); // get instance of wijspread widget
            var sheet = spread.getActiveSheet(); // get active worksheet of the wijspread widget
            // initialize spreadJS
        });
    </script>
</head>
<body>

</body>

第二个文件是appEx.js,我有我的ExtJS应用程序:

Ext.application({
name   : 'MyApp',

launch : function() {

   Ext.create('Ext.Panel', {
        renderTo     : Ext.getBody(),
        width        : 800,
        height       : 600,
        bodyPadding  : 5,
        title        : 'This is EXTJS 5',
        html         : '<div id="ss" style="height:500px;border:solid gray 1px;"/>'
    });

}

});

它们在单独运行时运行良好,但在尝试整合时不会给出结果。

有没有人知道这里的bug在哪里? 谢谢。

1 个答案:

答案 0 :(得分:1)

我可以观察SpreadJS的问题并将其转发给开发团队进行审核。