@steedos/service-pages 2.5.0-beta.20 → 2.5.0-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -801,7 +801,13 @@
801
801
  }
802
802
 
803
803
  Steedos.Page.Header.render = function(appId, tabId){
804
- let app = _.find(Session.get('app_menus'), {id: appId}) || {}
804
+
805
+ const defApps = Session.get('app_menus'); //触发 autorun
806
+
807
+ const apps = Tracker.nonreactive(()=>{
808
+ return Session.get('_app_menus') || defApps || []
809
+ })
810
+ let app = _.find(apps, {id: appId}) || {}
805
811
  if(_.isEmpty(app)){
806
812
  return ;
807
813
  }
@@ -854,7 +860,17 @@
854
860
  "type": "steedos-global-header",
855
861
  "logoSrc": logoSrc
856
862
  },
857
- ]
863
+ ],
864
+ onEvent: {
865
+ "@appsLoaded": {
866
+ "actions": [
867
+ {
868
+ "actionType": "custom",
869
+ "script": "Session.set('_app_menus', event.data.apps)"
870
+ }
871
+ ]
872
+ }
873
+ }
858
874
  }
859
875
  }
860
876
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/service-pages",
3
- "version": "2.5.0-beta.20",
3
+ "version": "2.5.0-beta.21",
4
4
  "main": "package.service.js",
5
5
  "scripts": {},
6
6
  "license": "MIT",
@@ -8,7 +8,7 @@
8
8
  "publishConfig": {
9
9
  "access": "public"
10
10
  },
11
- "gitHead": "830af95dcc46ba3ac1abf237943d23e627feabaf",
11
+ "gitHead": "ed406927d05038a1b0655f7ff5c374e78233dd44",
12
12
  "dependencies": {
13
13
  "ejs": "^3.1.8"
14
14
  }