Main.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. {
  41. margin: '0 0 0 8',
  42. xtype: 'tbtext',
  43. bind: {
  44. html: '{company.name}'
  45. }
  46. },
  47. '->',
  48. {
  49. iconCls:'x-fa fa-search',
  50. ui: 'header',
  51. tooltip: '搜索'
  52. },
  53. {
  54. iconCls:'x-fa fa-bell',
  55. ui: 'header',
  56. tooltip: '消息'
  57. },
  58. {
  59. iconCls:'x-fa fa-question',
  60. ui: 'header',
  61. tooltip: '帮助'
  62. },
  63. {
  64. reference: 'mainprofile',
  65. iconCls:'x-fa fa-th-large',
  66. arrowVisible: false,
  67. ui: 'header',
  68. tooltip: '账户',
  69. bind: {
  70. text: '{account.realname}'
  71. },
  72. menu: {
  73. items: [{
  74. xtype: 'menuseparator'
  75. }, {
  76. text: '退出',
  77. handler: 'onLogout'
  78. }]
  79. }
  80. },
  81. {
  82. xtype: 'image',
  83. cls: 'header-right-profile-image',
  84. height: 35,
  85. width: 35,
  86. bind: {
  87. src: '{avatarUrl}'
  88. }
  89. }
  90. ]
  91. },
  92. {
  93. xtype: 'maincontainerwrap'
  94. }
  95. ]
  96. });