Browse Source

treelist -> treepanel

zhuth 6 năm trước cách đây
mục cha
commit
6818a90b65
3 tập tin đã thay đổi với 9 bổ sung6 xóa
  1. 2 2
      app/controller/Global.js
  2. 3 1
      app/view/main/Main.js
  3. 4 3
      app/view/main/NavigationTree.js

+ 2 - 2
app/controller/Global.js

@@ -81,8 +81,8 @@ Ext.define('uas.controller.Global', {
         Ext.resumeLayouts(true);
     },
 
-    onTreeNavSelectionChange: function(treelist, record, eOpts) {
-        let target = record.get('target');
+    onTreeNavSelectionChange: function(tree, selected, eOpts) {
+        let target = selected[0].get('target');
         if(target) {
             this.redirectTo(target);
         }

+ 3 - 1
app/view/main/Main.js

@@ -19,9 +19,11 @@ Ext.define('uas.view.main.Main', {
         region: 'west',
         collapsible: true,
         title: '目录',
-        width: 150,
+        width: 260,
         split:true,
+        layout: 'border',
         items: [{
+            region: 'center',
             xtype: 'navigation-tree'
         }]
     }, {

+ 4 - 3
app/view/main/NavigationTree.js

@@ -1,12 +1,13 @@
 Ext.define('uas.view.main.NavigationTree', {
-    extend: 'Ext.list.Tree',
+    extend: 'Ext.tree.Panel',
     xtype: 'navigation-tree',
 
     id: 'navigation-tree',
 
     store: 'Navigation',
-
-    autoScroll:true,
+    rootVisible: false,
+    hideHeaders: true,
+    autoScroll: true,
 
     bind: {
         selection: '{selectedNode}'