瀏覽代碼

解决构建问题

hy 6 年之前
父節點
當前提交
f2bd515753

+ 1 - 1
app/Application.js

@@ -2,7 +2,7 @@
  * @Description: 
  * @Author: hy
  * @Date: 2019-08-12 17:59:33
- * @LastEditTime: 2019-08-14 18:21:37
+ * @LastEditTime: 2019-08-16 15:37:37
  */
 Ext.define('uas.Application', {
     extend: 'Ext.app.Application',

+ 1 - 1
app/controller/Global.js

@@ -2,7 +2,7 @@
  * @Description: 
  * @Author: hy
  * @Date: 2019-08-12 17:59:33
- * @LastEditTime: 2019-08-15 10:46:59
+ * @LastEditTime: 2019-08-16 14:47:58
  */
 Ext.define('uas.controller.Global', {
     extend: 'Ext.app.Controller',

+ 6 - 0
app/data/Company.js

@@ -1,3 +1,9 @@
+/*
+ * @Description: 
+ * @Author: hy
+ * @Date: 2019-08-13 11:39:00
+ * @LastEditTime: 2019-08-16 15:39:39
+ */
 Ext.define('uas.data.Company', {
     requires: [
         'uas.data.Init'

+ 1 - 1
app/data/DataList.js

@@ -2,7 +2,7 @@
  * @Description: 
  * @Author: hy
  * @Date: 2019-08-14 17:41:15
- * @LastEditTime: 2019-08-14 17:41:15
+ * @LastEditTime: 2019-08-16 15:39:47
  */
 Ext.define('uas.data.DataList', {
     requires: [

+ 6 - 0
app/model/Company.js

@@ -1,3 +1,9 @@
+/*
+ * @Description: 
+ * @Author: hy
+ * @Date: 2019-08-13 11:39:00
+ * @LastEditTime: 2019-08-16 15:32:34
+ */
 Ext.define('uas.model.Company', {
     extend: 'uas.model.Base',
     requires: [

+ 1 - 4
app/store/DataListGridStore.js

@@ -2,15 +2,12 @@
  * @Description: 列表store
  * @Author: hy
  * @Date: 2019-08-12 18:34:16
- * @LastEditTime: 2019-08-15 08:54:04
+ * @LastEditTime: 2019-08-16 15:14:33
  */
 Ext.define('uas.store.DataListGridStore', {
     extend: 'Ext.data.Store',
     alias: 'store.dataListGridStore',
     model: 'uas.model.DataListGridModel',
-    requires: [
-        'uas.data.DataList'
-    ],
     proxy: {
         type: 'ajax',
         url: '/uas/DataList',

+ 6 - 7
app/view/grid/basic/Panel.js

@@ -1,15 +1,14 @@
+/*
+ * @Description: 
+ * @Author: hy
+ * @Date: 2019-08-13 11:39:00
+ * @LastEditTime: 2019-08-16 15:14:40
+ */
 Ext.define('uas.view.grid.basic.Panel', {
     extend: 'Ext.grid.Panel',
     xtype: 'basic-grid',
     controller: 'basic-grid',
 
-    requires: [
-        'uas.view.grid.basic.PanelController',
-        'uas.data.Company',
-        'uas.model.Company',
-        'uas.store.Companies'
-    ],
-
     stateful: true,
     multiSelect: true,
     stateId: 'stateGrid',

+ 1 - 3
app/view/grid/dataList/DataListPanel.js

@@ -2,13 +2,11 @@
  * @Description: 数据列表
  * @Author: hy
  * @Date: 2019-08-12 18:33:04
- * @LastEditTime: 2019-08-15 10:55:22
+ * @LastEditTime: 2019-08-16 17:13:17
  */
 Ext.define('uas.view.grid.dataList.DataListPanel', {
     extend: 'Ext.grid.Panel',
     xtype: 'dataListPanel',
-    requires: [
-    ],
 
     plugins: {
         gridHeaderFilter: true

+ 6 - 4
app/view/grid/expander/Panel.js

@@ -1,3 +1,9 @@
+/*
+ * @Description: 
+ * @Author: hy
+ * @Date: 2019-08-15 10:27:49
+ * @LastEditTime: 2019-08-16 17:13:30
+ */
 /**
  * This is an example of using the grid with a RowExpander plugin that adds the ability
  * to have a column in a grid which enables a second row body which expands/contracts.
@@ -7,12 +13,8 @@
  */
 Ext.define('uas.view.grid.expander.Panel', {
     extend: 'Ext.grid.Panel',
-
     xtype: 'grid-expander-panel',
 
-    requires: [
-    ],
-
     bind: '{companies}',
     viewModel: {
         stores: {

+ 6 - 4
app/view/grid/grouped/Panel.js

@@ -1,3 +1,9 @@
+/*
+ * @Description: 
+ * @Author: hy
+ * @Date: 2019-08-15 09:28:19
+ * @LastEditTime: 2019-08-16 17:13:37
+ */
 /**
  * This example shows how to use the grouping feature of the Grid.
  */
@@ -5,10 +11,6 @@ Ext.define('uas.view.grid.grouped.Panel', {
     extend: 'Ext.grid.Panel',
     xtype: 'grouped-grid',
     controller: 'grouped-grid',
-
-    requires: [
-    ],
-
     bind: '{restaurants}',
 
     columns: [{

+ 0 - 9
app/view/grid/headerFilter/Panel.js

@@ -1,9 +0,0 @@
-Ext.define('uas.view.grid.headerFilter.Panel', {
-    extend: 'Ext.panel.Panel',
-    xtype: 'grid-header-filter',
-
-    controller: 'grid-header-filter',
-    viewModel: 'grid-header-filter',
-    
-    html: 'HeaderFilter'
-});

+ 0 - 4
app/view/grid/headerFilter/PanelController.js

@@ -1,4 +0,0 @@
-Ext.define('uas.view.grid.headerFilter.PanelController', {
-    extend: 'Ext.app.ViewController',
-    alias: 'controller.grid-header-filter',
-});

+ 0 - 4
app/view/grid/headerFilter/PanelModel.js

@@ -1,4 +0,0 @@
-Ext.define('uas.view.grid.headerFilter.PanelModel', {
-    extend: 'Ext.app.ViewModel',
-    alias: 'viewmodel.grid-header-filter',
-});

+ 59 - 0
app/view/grid/mergeColumn/MergeColumnGrid.js

@@ -0,0 +1,59 @@
+/*
+ * @Description: 
+ * @Author: hy
+ * @Date: 2019-08-12 17:59:33
+ * @LastEditTime: 2019-08-15 14:24:07
+ */
+Ext.define('uas.view.grid.mergeColumn.MergeColumnGrid', {
+    extend: 'Ext.grid.Panel',
+    xtype: 'mergeColumnGrid',
+    columnLines: true,
+
+    store: {
+        type: 'companies',
+        sorters: {
+            property: 'name',
+            direction: 'DESC'
+        }
+    },
+
+    columns: [{
+        text: 'Company',
+        dataIndex: 'name',
+
+        flex: 1,
+        sortable: true
+    }, {
+        text: 'Stock Price',
+
+        columns: [{
+            text: 'Price',
+            dataIndex: 'price',
+
+            width: 75,
+            sortable: true,
+            formatter: 'usMoney'
+        }, {
+            text: 'Change',
+            dataIndex: 'priceChange',
+
+            width: 80,
+            sortable: true,
+            renderer: 'renderChange'
+        }, {
+            text: '% Change',
+            dataIndex: 'priceChangePct',
+
+            width: 100,
+            sortable: true,
+            renderer: 'renderPercent'
+        }]
+    }, {
+        text: 'Last Updated',
+        dataIndex: 'priceLastChange',
+
+        width: 115,
+        sortable: true,
+        formatter: 'date("m/d/Y")'
+    }]
+});

+ 0 - 9
app/view/grid/mergeColumn/Panel.js

@@ -1,9 +0,0 @@
-Ext.define('uas.view.grid.mergeColumn.Panel', {
-    extend: 'Ext.panel.Panel',
-    xtype: 'grid-merge-column',
-
-    controller: 'grid-merge-column',
-    viewModel: 'grid-merge-column',
-
-    html: 'MergeColumn'
-});

+ 0 - 4
app/view/grid/mergeColumn/PanelController.js

@@ -1,4 +0,0 @@
-Ext.define('uas.view.grid.mergeColumn.PanelController', {
-    extend: 'Ext.app.ViewController',
-    alias: 'controller.grid-merge-column',
-});

+ 0 - 4
app/view/grid/mergeColumn/PanelModel.js

@@ -1,4 +0,0 @@
-Ext.define('uas.view.grid.mergeColumn.PanelModel', {
-    extend: 'Ext.app.ViewModel',
-    alias: 'viewmodel.grid-merge-column',
-});

+ 6 - 0
app/view/grid/summary/Summary1.js

@@ -1,3 +1,9 @@
+/*
+ * @Description: 
+ * @Author: hy
+ * @Date: 2019-08-13 11:39:00
+ * @LastEditTime: 2019-08-16 15:38:27
+ */
 /**
  * 位置联动合计栏
  * 使用原生的summary

+ 6 - 0
app/view/grid/summary/Summary2.js

@@ -1,3 +1,9 @@
+/*
+ * @Description: 
+ * @Author: hy
+ * @Date: 2019-08-14 16:23:05
+ * @LastEditTime: 2019-08-16 15:38:04
+ */
 /**
  * 位置固定合计栏
  * 原生合计栏添加参数fixed: true

+ 1 - 5
app/view/plugins/gridHeaderFilter/GridHeaderFilter.js

@@ -2,7 +2,7 @@
  * @Description: 列表筛选头
  * @Author: hy
  * @Date: 2019-07-29 15:22:51
- * @LastEditTime: 2019-08-15 11:40:36
+ * @LastEditTime: 2019-08-16 15:15:34
  */
 Ext.define('uas.view.plugins.gridHeaderFilter.GridHeaderFilter', {
     extend: 'Ext.plugin.Abstract',
@@ -10,10 +10,6 @@ Ext.define('uas.view.plugins.gridHeaderFilter.GridHeaderFilter', {
     mixins: [
         'Ext.util.StoreHolder'
     ],
-    requires: [
-        'Ext.grid.filters.filter.*',
-        'uas.view.plugins.gridHeaderFilter.field.*'
-    ],
     id: 'gridHeaderFilter',
     /**
      * @property {Object} defaultFilterTypes

+ 0 - 193
resources/json/DataListData.json

@@ -1,193 +0,0 @@
-{
-    "total": "27",
-    "data": [{
-        "id": "1",
-        "price": "71.72",
-        "company": "3m Co",
-        "date": "2007-09-01",
-        "size": "large",
-        "visible": "1"
-    }, {
-        "id": "2",
-        "price": "31.61",
-        "company": "AT&T Inc.",
-        "date": "2008-02-01",
-        "size": "extra large",
-        "visible": "0"
-    }, {
-        "id": "3",
-        "price": "29.01",
-        "company": "Aloca Inc",
-        "date": "2007-08-01",
-        "size": "medium",
-        "visible": "0"
-    }, {
-        "id": "4",
-        "price": "83.81",
-        "company": "Altria Group Inc",
-        "date": "2007-08-03",
-        "size": "large",
-        "visible": "0"
-    }, {
-        "id": "5",
-        "price": "52.55",
-        "company": "American Express Company",
-        "date": "2008-01-04",
-        "size": "extra large",
-        "visible": "1"
-    }, {
-        "id": "6",
-        "price": "64.13",
-        "company": "American International Group Inc.",
-        "date": "2008-03-04",
-        "size": "small",
-        "visible": "1"
-    }, {
-        "id": "7",
-        "price": "75.43",
-        "company": "Boeing Co.",
-        "date": "2008-01-01",
-        "size": "large",
-        "visible": "1"
-    }, {
-        "id": "8",
-        "price": "67.27",
-        "company": "Caterpillar Inc.",
-        "date": "2007-12-03",
-        "size": "medium",
-        "visible": "1"
-    }, {
-        "id": "9",
-        "price": "49.37",
-        "company": "Citigroup, Inc.",
-        "date": "2007-11-24",
-        "size": "large",
-        "visible": "1"
-    }, {
-        "id": "10",
-        "price": "40.48",
-        "company": "E.I. du Pont de Nemours and Company",
-        "date": "2007-05-09",
-        "size": "extra large",
-        "visible": "0"
-    }, {
-        "id": "11",
-        "price": "68.1",
-        "company": "Exxon Mobile Corp",
-        "date": "2007-12-12",
-        "size": "large",
-        "visible": "1"
-    }, {
-        "id": "12",
-        "price": "34.14",
-        "company": "General Electric Company",
-        "date": "2008-06-16",
-        "size": "extra large",
-        "visible": "1"
-    }, {
-        "id": "13",
-        "price": "30.27",
-        "company": "General Motors Corporation",
-        "date": "2006-12-07",
-        "size": "medium",
-        "visible": "1"
-    }, {
-        "id": "14",
-        "price": "36.53",
-        "company": "Hewlett-Packard Co.",
-        "date": "2007-05-13",
-        "size": "large",
-        "visible": "1"
-    }, {
-        "id": "15",
-        "price": "38.77",
-        "company": "Honweywell Intl Inc",
-        "date": "2006-11-07",
-        "size": "medium",
-        "visible": "0"
-    }, {
-        "id": "16",
-        "price": "19.88",
-        "company": "Intel Corporation",
-        "date": "2007-01-09",
-        "size": "small",
-        "visible": "1"
-    }, {
-        "id": "17",
-        "price": "81.41",
-        "company": "International Business Machines",
-        "date": "2005-01-21",
-        "size": "extra large",
-        "visible": "1"
-    }, {
-        "id": "18",
-        "price": "64.72",
-        "company": "Johnson & Johnson",
-        "date": "2008-01-10",
-        "size": "extra large",
-        "visible": "1"
-    }, {
-        "id": "19",
-        "price": "45.73",
-        "company": "JP Morgan & Chase & Co",
-        "date": "2008-02-20",
-        "size": "large",
-        "visible": "0"
-    }, {
-        "id": "20",
-        "price": "36.76",
-        "company": "McDonald's Corporation",
-        "date": "2007-06-12",
-        "size": "large",
-        "visible": "1"
-    }, {
-        "id": "21",
-        "price": "27.96",
-        "company": "Pfizer Inc",
-        "date": "2007-12-30",
-        "size": "small",
-        "visible": "0"
-    }, {
-        "id": "22",
-        "price": "45.07",
-        "company": "The Coca-Cola Company",
-        "date": "2007-01-30",
-        "size": "medium",
-        "visible": "0"
-    }, {
-        "id": "23",
-        "price": "34.64",
-        "company": "The Home Depot, Inc",
-        "date": "2006-12-31",
-        "size": "small",
-        "visible": "1"
-    }, {
-        "id": "24",
-        "price": "61.91",
-        "company": "The Procter & Gamble Company",
-        "date": "2007-04-08",
-        "size": "extra large",
-        "visible": "1"
-    }, {
-        "id": "25",
-        "price": "63.26",
-        "company": "United Technologies Corporation",
-        "date": "2006-06-04",
-        "size": "medium",
-        "visible": "1"
-    }, {
-        "id": "26",
-        "price": "35.57",
-        "company": "Verizon Communications",
-        "date": "2005-07-09",
-        "size": "small",
-        "visible": "0"
-    }, {
-        "id": "27",
-        "price": "45.45",
-        "company": "Wal-Mart Stores, Inc",
-        "date": "2006-09-09",
-        "size": "large",
-        "visible": "1"
-    }]
-}