Main.js 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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: 64,
  22. itemId: 'headerBar',
  23. items: [
  24. {
  25. xtype: 'component',
  26. reference: 'mainLogo',
  27. cls: 'main-logo-wrap',
  28. html: '<div class="main-logo"><img src="resources/images/default/logo-default.png"/><div class="logo-text">优企云服</div></div>',
  29. bind: {
  30. width: '{navWidth}'
  31. }
  32. },
  33. {
  34. margin: '0 0 0 8',
  35. ui: 'header',
  36. iconCls:'x-fa fa-navicon',
  37. id: 'main-navigation-btn',
  38. handler: 'onToggleNavigationSize'
  39. },{
  40. reference: 'mainprofile',
  41. arrowVisible: false,
  42. ui: 'header',
  43. bind: {
  44. tooltip: '{company.name}',
  45. text: '{company.name}'
  46. },
  47. menu: {
  48. items: [{
  49. xtype: 'menuseparator'
  50. }, {
  51. text: '退出',
  52. handler: 'onLogout'
  53. }]
  54. }
  55. },
  56. '->',
  57. {
  58. iconCls:'icon-usoftchina',
  59. ui: 'header',
  60. tooltip: '优软云'
  61. },
  62. {
  63. iconCls:'x-fa fa-question',
  64. ui: 'header',
  65. tooltip: '帮助'
  66. },
  67. {
  68. ui: 'header',
  69. bind: {
  70. tooltip: '{account.realname}',
  71. text: '{account.realname}'
  72. }
  73. },
  74. {
  75. xtype: 'image',
  76. cls: 'header-right-profile-image',
  77. height: 35,
  78. width: 35,
  79. bind: {
  80. src: '{avatarUrl}'
  81. }
  82. }
  83. ]
  84. },
  85. {
  86. xtype: 'maincontainerwrap'
  87. }
  88. ]
  89. });