Przeglądaj źródła

pda-client bug fix

lizw 3 lat temu
rodzic
commit
9b7a999f41
1 zmienionych plików z 4 dodań i 10 usunięć
  1. 4 10
      src/Scope.ts

+ 4 - 10
src/Scope.ts

@@ -198,16 +198,10 @@ export class Scope {
                             if (scopeArr.length > 0) {
                                 const scope = scopeArr[scopeArr.length - 1]
                                 scope._handle.setStyle({'z-index': 1})
-                                let actived = false;
-                                (Ext.Viewport.getItems().items as []).forEach((item, idx) => {
-                                    if (!actived && item === scope._handle) {
-                                        actived = true
-                                        Ext.Viewport.getLayout().setAnimation({type: 'slide', direction: 'right', duration: 300})
-                                        Ext.Viewport.setActiveItem(idx)
-                                        scope._lastShowTime = new Date().getTime()
-                                        // console.log("###### show", idx, Scope.SHOW_PAGE_STACK)
-                                    }
-                                })
+                                Ext.Viewport.getLayout().setAnimation({type: 'slide', direction: 'right', duration: 300})
+                                Ext.Viewport.setActiveItem(scope._handle)
+                                scope._lastShowTime = new Date().getTime()
+                                // console.log("###### show", (scopeArr.length - 1), Scope.SHOW_PAGE_STACK)
                             }
                             // 关闭
                             handle.setStyle({'z-index': 0})