Browse Source

REPORT-66254 【组件商城风格优化】打开商城窗口到商城内容显示出来,期间大概有5秒空白状态,需要优化下

【问题原因】
1. 网络加载时间比较长,从而出现空白画面
2. 前端资源JS中存在相对地址的fetch请求,因而无法将JS缓存到本地使用

为了缓存空白问题,关闭商城窗口时重新加载数据,清除页面状态,同时不清除
窗口内存资源。从而再下次打开时,可以直接展示该窗口对象,提高展示效率。

【改动思路】
同上
bugfix/11.0
Starryi 3 years ago
parent
commit
351275e6fc
  1. 3
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/MiniComponentShopDialog.java
  2. 8
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/MiniComponentShopPane.java

3
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/MiniComponentShopDialog.java

@ -67,8 +67,7 @@ public class MiniComponentShopDialog {
for (WindowListener listener: windowListeners) { for (WindowListener listener: windowListeners) {
listener.windowClosed(e); listener.windowClosed(e);
} }
getInstance().frame = null; shopPane.reload();
shopPane.dispose();
} }
@Override @Override

8
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/MiniComponentShopPane.java

@ -59,13 +59,13 @@ public class MiniComponentShopPane extends JPanel {
loginListener = new Listener<String>() { loginListener = new Listener<String>() {
@Override @Override
public void on(Event event, String param) { public void on(Event event, String param) {
modernUIPane.redirect(OnlineShopUtils.getWebMiniShopPath()); reload();
} }
}; };
logoutListener = new Listener<String>() { logoutListener = new Listener<String>() {
@Override @Override
public void on(Event event, String param) { public void on(Event event, String param) {
modernUIPane.redirect(OnlineShopUtils.getWebMiniShopPath()); reload();
} }
}; };
@ -78,4 +78,8 @@ public class MiniComponentShopPane extends JPanel {
EventDispatcher.stopListen(loginListener); EventDispatcher.stopListen(loginListener);
EventDispatcher.stopListen(logoutListener); EventDispatcher.stopListen(logoutListener);
} }
public void reload() {
modernUIPane.redirect(OnlineShopUtils.getWebMiniShopPath());
}
} }

Loading…
Cancel
Save