extjs 5 Ext.draw.Container



我想在extjs5中编写一个简单的示例并使用Draw Package。根据sencha文档,我的代码是:

1. index . html

<head>
<script type="text/javascript">
    var contextPath = '<%=context%>';
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<%--extJS--%>
<link rel="stylesheet" type="text/css" href="<%= context%>/js/ext5/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css"/>
<script type="text/javascript" src="<%= context%>/js/ext5/build/ext-all.js"></script>
<script type="text/javascript" src="<%=context%>/js/extjspages/app.js"></script>

2. app.js

Ext.require("Ext.draw.Container");

Ext.application ({名称:"MyApp",启动:function () {

    Ext.create('Ext.draw.Container', {
        sprites: [{
            type: 'circle',
            fillStyle: 'red',
            r: 100,
            cx: 100,
            cy: 100
        }],
        height:205,
        width:205,
        renderTo:Ext.getBody()
    });
}

});

但是我抓住了

得到…/Ext/画/Container.js吗?_dc=1403991476236 404 (Not Found) error

我错在哪里?谢谢你

我不知道如何使用sencha cmd。但是你可以在index.html代码中添加"sencha-charts":

<script type="text/javascript" src="<%= context%>/js/ext5/build/packages/sencha-charts/build/sencha-charts-debug.js"></script>

最新更新