import{_ as l}from"./plugin-vue_export-helper-c27b6911.js";import{r as o,o as i,c,a,b as t,d as n,w as s,e as r}from"./app-e95fa5d2.js";const p={},d=r(`<p>Get the status value of the plugin</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code>StateObserver<span class="token punctuation">.</span><span class="token function">getState</span><span class="token punctuation">(</span><span class="token punctuation">[</span>force_update<span class="token punctuation">]</span><span class="token punctuation">)</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h2 id="参数" tabindex="-1"><a class="header-anchor" href="#参数" aria-hidden="true">#</a> 参数</h2><ul><li><p>force_update</p><p>The parameter accepts a boolean type of data; whether it is necessary to force the status to be updated;<br> force_update === true will re-read status updates from the system;<br> force_update === false will return the last cached state data;</p></li></ul><h2 id="返回值" tabindex="-1"><a class="header-anchor" href="#返回值" aria-hidden="true">#</a> 返回值</h2>`,5),u=r(`<h2 id="example" tabindex="-1"><a class="header-anchor" href="#example" aria-hidden="true">#</a> Example</h2><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">import</span> <span class="token punctuation">{</span> statusBarPlugin <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&quot;@plaoc/plugins&quot;</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> value <span class="token operator">=</span> statusBarPlugin<span class="token punctuation">.</span>state<span class="token punctuation">.</span><span class="token function">getState</span><span class="token punctuation">(</span><span class="token boolean">true</span><span class="token punctuation">)</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="platform-compatibility" tabindex="-1"><a class="header-anchor" href="#platform-compatibility" aria-hidden="true">#</a> Platform Compatibility</h2><table><thead><tr><th style="text-align:center;">Property/Method/Event</th><th style="text-align:center;">Android</th><th style="text-align:center;">IOS</th><th style="text-align:center;">Desktop-Dev</th><th style="text-align:center;">Desktop</th></tr></thead><tbody><tr><td style="text-align:center;">getState</td><td style="text-align:center;">✅</td><td style="text-align:center;">✅</td><td style="text-align:center;">✅</td><td style="text-align:center;">X</td></tr></tbody></table><h2 id="related-links" tabindex="-1"><a class="header-anchor" href="#related-links" aria-hidden="true">#</a> Related Links</h2>`,5);function h(f,m){const e=o("RouterLink");return i(),c("div",null,[d,a("p",null,[t("A Promise object, resolve fulfills an object that implements part of the "),n(e,{to:"/en/plaoc-plugin/plugin/status-bar/interface/state/"},{default:s(()=>[t("State")]),_:1}),t(" interface;")]),u,a("p",null,[n(e,{to:"/en/plaoc-plugin/plugin/status-bar/interface/state-observer/"},{default:s(()=>[t("StateObserver")]),_:1})])])}const k=l(p,[["render",h],["__file","getState.html.vue"]]);export{k as default};
