Skip to content

Commit

Permalink
deploy: 393df3d
Browse files Browse the repository at this point in the history
  • Loading branch information
kuitos committed Nov 15, 2023
1 parent b540643 commit c0dad96
Show file tree
Hide file tree
Showing 18 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@
}
})();
</script>
<script src="/qiankun/umi.ab1335c5.js"></script>
<script src="/qiankun/umi.043a2721.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion _demos/:uuid/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@
}
})();
</script>
<script src="/qiankun/umi.ab1335c5.js"></script>
<script src="/qiankun/umi.043a2721.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
</span></div><div class="token-line"><span class="token plain"></span><span class="token comment">// Initialize state</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"></span><span class="token keyword">const</span><span class="token plain"> actions</span><span class="token operator">:</span><span class="token plain"> MicroAppStateActions </span><span class="token operator">=</span><span class="token plain"> </span><span class="token function">initGlobalState</span><span class="token punctuation">(</span><span class="token plain">state</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token plain"></span></div><div class="token-line"><span class="token plain">
</span></div><div class="token-line"><span class="token plain">actions</span><span class="token punctuation">.</span><span class="token function">onGlobalStateChange</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token plain">state</span><span class="token punctuation">,</span><span class="token plain"> prev</span><span class="token punctuation">)</span><span class="token plain"> </span><span class="token operator">=&gt;</span><span class="token plain"> </span><span class="token punctuation">{</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"> </span><span class="token comment">// state: new state; prev old state</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"> </span><span class="token builtin">console</span><span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token plain">state</span><span class="token punctuation">,</span><span class="token plain"> prev</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"></span><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token plain"></span></div><div class="token-line"><span class="token plain">actions</span><span class="token punctuation">.</span><span class="token function">setGlobalState</span><span class="token punctuation">(</span><span class="token plain">state</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token plain"></span></div><div class="token-line"><span class="token plain">actions</span><span class="token punctuation">.</span><span class="token function">offGlobalStateChange</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></div></pre></div><p>Slave:</p><div class="__dumi-default-code-block"><pre class="prism-code language-ts"><button class="__dumi-default-icon __dumi-default-code-block-copy-btn" data-status="ready"></button><div class="token-line"><span class="token comment">// get actions from mount</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"></span><span class="token keyword">export</span><span class="token plain"> </span><span class="token keyword">function</span><span class="token plain"> </span><span class="token function">mount</span><span class="token punctuation">(</span><span class="token plain">props</span><span class="token punctuation">)</span><span class="token plain"> </span><span class="token punctuation">{</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"> props</span><span class="token punctuation">.</span><span class="token function">onGlobalStateChange</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token plain">state</span><span class="token punctuation">,</span><span class="token plain"> prev</span><span class="token punctuation">)</span><span class="token plain"> </span><span class="token operator">=&gt;</span><span class="token plain"> </span><span class="token punctuation">{</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"> </span><span class="token comment">// state: new state; prev old state</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"> </span><span class="token builtin">console</span><span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token plain">state</span><span class="token punctuation">,</span><span class="token plain"> prev</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"> </span><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"> props</span><span class="token punctuation">.</span><span class="token function">setGlobalState</span><span class="token punctuation">(</span><span class="token plain">state</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token plain"></span></div><div class="token-line"><span class="token plain">
</span></div><div class="token-line"><span class="token plain"> </span><span class="token comment">// It will trigger when slave umount, not necessary to use in non special cases.</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"> props</span><span class="token punctuation">.</span><span class="token function">offGlobalStateChange</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token plain"></span></div><div class="token-line"><span class="token plain">
</span></div><div class="token-line"><span class="token plain"> </span><span class="token comment">// ...</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"></span><span class="token punctuation">}</span></div></pre></div></li></ul></div><div class="__dumi-default-layout-footer-meta"><a target="_blank" rel="noopener noreferrer" href="https://github.com/kuitos/qiankun/edit/master/docs/api/README.md">Edit this doc on GitHub<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="__dumi-default-external-link-icon"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a><span data-updated-text="Last update: ">11/15/2023 08:19:33</span></div></div></div></div>
</span></div><div class="token-line"><span class="token plain"> </span><span class="token comment">// ...</span><span class="token plain"></span></div><div class="token-line"><span class="token plain"></span><span class="token punctuation">}</span></div></pre></div></li></ul></div><div class="__dumi-default-layout-footer-meta"><a target="_blank" rel="noopener noreferrer" href="https://github.com/kuitos/qiankun/edit/master/docs/api/README.md">Edit this doc on GitHub<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="__dumi-default-external-link-icon"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a><span data-updated-text="Last update: ">11/15/2023 08:23:42</span></div></div></div></div>
<script>
window.g_useSSR = true;
window.g_initialProps = {};
Expand Down Expand Up @@ -117,6 +117,6 @@
}
})();
</script>
<script src="/qiankun/umi.ab1335c5.js"></script>
<script src="/qiankun/umi.043a2721.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions cookbook/index.html

Large diffs are not rendered by default.

Loading

0 comments on commit c0dad96

Please sign in to comment.