瀏覽代碼

fix: show scripts immediately

tophf 2 年之前
父節點
當前提交
d924446564
共有 1 個文件被更改,包括 7 次插入5 次删除
  1. 7 5
      src/options/views/tab-installed.vue

+ 7 - 5
src/options/views/tab-installed.vue

@@ -359,15 +359,17 @@ async function onHashChange() {
     if (script) {
       state.code = await sendCmdDirectly('GetScriptCode', id);
     } else {
+      // Strip the invalid id from the URL so |App| can render the aside,
+      // which was hidden to avoid flicker on initial page load directly into the editor.
+      if (id) setRoute(tab, true);
       // First time showing the list we need to tell v-if to keep it forever
       if (!state.canRenderScripts) {
-        await loadData();
         state.canRenderScripts = true;
+        renderScripts();
+        loadData();
+      } else {
+        debouncedRender();
       }
-      debouncedRender();
-      // Strip the invalid id from the URL so |App| can render the aside,
-      // which was hidden to avoid flicker on initial page load directly into the editor.
-      if (id) setRoute(tab, true);
     }
     state.script = script;
   }