Main.js 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. Ext.define('saas.view.main.Main', {
  2. extend: 'Ext.container.Container',
  3. xtype: 'main',
  4. requires: [
  5. 'Ext.list.Tree',
  6. 'Ext.Img'
  7. ],
  8. controller: 'main',
  9. viewModel: 'main',
  10. cls: 'main-ct',
  11. id: 'mainView',
  12. itemId: 'mainView',
  13. layout: {
  14. type: 'vbox',
  15. align: 'stretch'
  16. },
  17. items: [
  18. {
  19. xtype: 'toolbar',
  20. cls: 'main-headerbar shadow',
  21. height: 50,
  22. itemId: 'headerBar',
  23. items: [
  24. {
  25. xtype: 'component',
  26. reference: 'mainLogo',
  27. width: 180,
  28. cls: 'main-logo-wrap',
  29. html: '<div class="main-logo"><img src="resources/images/default/logo-default.png"/><div class="logo-text">运营中心</div></div>',
  30. bind: {
  31. width: '{navWidth}'
  32. }
  33. },
  34. {
  35. margin: '0 8 0 8',
  36. padding: '7 0 7 0',
  37. ui: 'header',
  38. iconCls:'x-sa sa-arrows-left',
  39. id: 'main-navigation-toggle-btn',
  40. handler: 'onToggleNavigationSize'
  41. },{
  42. padding: '0 0 0 0',
  43. reference: 'mainprofile',
  44. cls:'x-main-master',
  45. ui: 'header',
  46. bind: {
  47. text: '{company.name}'
  48. }
  49. },
  50. '->',
  51. {
  52. xtype: 'tbtext',
  53. name:'realname',
  54. cls:'sa-nav-button sa-nav-realname',
  55. bind: {
  56. html: '{account.realname}'
  57. }
  58. },
  59. {
  60. cls:' sa-nav-button',
  61. width: 50,
  62. height:50,
  63. bind: {
  64. html:'<img class="x-img x-box-item x-toolbar-item x-img-header" style="height:35px;width:35px;margin-top: 6px;margin-left: 14px;" src="{avatarUrl}" alt="">'
  65. },
  66. menu: {
  67. cls:'x-main-menu2 sa-nav-menu',
  68. items: [{
  69. text: '退出',
  70. iconCls:'x-fa fa-power-off sa-navicon',
  71. handler: 'onLogout'
  72. }]
  73. }
  74. }
  75. ]
  76. },
  77. {
  78. xtype: 'maincontainerwrap'
  79. }
  80. ]
  81. });