{"id":3837,"date":"2025-01-02T14:39:30","date_gmt":"2025-01-02T06:39:30","guid":{"rendered":"https:\/\/support.foxitsoftware.cn\/?p=3837"},"modified":"2025-06-03T13:44:30","modified_gmt":"2025-06-03T05:44:30","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8%e8%bf%9b%e5%85%a5%e9%a1%b5%e9%9d%a2%e5%90%8e%ef%bc%8c%e7%bc%ba%e7%9c%81%e6%89%93%e5%bc%80%e6%8c%87%e5%ae%9a%e6%a0%87%e7%ad%be%e9%a1%b5%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/support.fuxinsoft.cn\/?p=3837","title":{"rendered":"\u5982\u4f55\u5728\u8fdb\u5165\u9875\u9762\u540e\uff0c\u7f3a\u7701\u6253\u5f00\u6307\u5b9a\u6807\u7b7e\u9875\uff1f"},"content":{"rendered":"\n<p>\u82e5\u60a8\u60f3\u8981\u6253\u5f00\u6307\u5b9a\u7684\u67d0\u4e2a\u6807\u7b7e\u9875\uff0c\u8bf7\u53c2\u8003\u300a\u5f00\u53d1\u8005\u624b\u518c\u300b\u4e2d\u201c\u7ec4\u4ef6\u201d\u7ae0\u8282\u7684\u201c\u57fa\u7840\u7ec4\u4ef6\u201d-\u201cTab\u7ec4\u4ef6\u201d-\u201cAPI\u201d\u5c0f\u8282\u3002<\/p>\n\n\n\n<p><strong>\u83b7\u53d6\u6307\u5b9a\u6807\u7b7e\u9875\u7684\u7ec4\u4ef6\u5bf9\u8c61<\/strong><\/p>\n\n\n\n<p>\u5982\u4f55\u83b7\u53d6\u5230\u6307\u5b9a\u7684\u6807\u7b7e\u9875\u7684\u7ec4\u4ef6\u5bf9\u8c61\u5462\uff1f<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u9996\u5148\u8981\u83b7\u53d6\u76ee\u6807\u7ec4\u4ef6\u7684\u540d\u79f0 \u3002\n<ul class=\"wp-block-list\">\n<li>\u9488\u5bf9 widget \u90e8\u4ef6\uff0c\u60a8\u53ef\u4ee5\u5728\u6d4f\u89c8\u5668\u4e2d\u53f3\u952e\u70b9\u51fb\u8be5\u7ec4\u4ef6\u3002\u9009\u62e9 \u201c\u5ba1\u67e5\u201d\uff0c\u7136\u540e\u5728\u5bf9\u5e94\u7684&lt;a&gt; \u6807\u7b7e\u4e2d\u627e\u5230 &#8220;component-name&#8221; \u5c5e\u6027\u7684\u503c\u3002<\/li>\n\n\n\n<li>\u5bf9\u4e8e\u5bb9\u5668\u7ec4\u4ef6\uff0c\u6bd4\u5982&#8221;target: &#8216;hometab-group-hand&#8217;,&#8221;\uff0c\u60a8\u53ef\u4ee5\u5728\u6d4f\u89c8\u5668\u4e2d\u53f3\u952e\u70b9\u51fb\u5176\u4e2d\u4e00\u4e2a\u5b50\u7ec4\u4ef6\uff0c\u9009\u62e9 \u201c\u5ba1\u67e5\u201d\uff0c\u7136\u540e\u5728\u76f8\u5173\u7684&lt;div&gt;\u6807\u7b7e\u4e2d\u627e\u5230 &#8220;component-name&#8221; \u5c5e\u6027\u7684\u503c<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u901a\u8fc7getComponentByName\u65b9\u6cd5\u5373\u53ef\u83b7\u53d6\u5230\u6307\u5b9a\u7684Tab\u6807\u7b7e\u9875\u7684\u7ec4\u4ef6\u5bf9\u8c61\uff1b<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading has-medium-font-size\"><strong>\u6fc0\u6d3b\u6307\u5b9a\u7684\u6807\u7b7e\u9875\u5bf9\u8c61<\/strong><\/h1>\n\n\n\n<p>\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-body-font-family has-medium-font-size\"><code>\/\/\u83b7\u53d6\u201c\u7f16\u8f91\u201d\u6807\u7b7e\u9875\u7684Tab\u7ec4\u4ef6\u5bf9\u8c61\nvar editTab = await pdfui.getComponentByName(\"edit-tab\");\n\/\/\u6fc0\u6d3b\u201c\u7f16\u8f91\u201dTab\u6807\u7b7e\u9875\neditTab.active();\n\n\/* \u83b7\u53d6\u201c\u6ce8\u91ca\u201d\u6807\u7b7e\u9875\u7684Tab\u7ec4\u4ef6\u5bf9\u8c61\nvar commentTab = await pdfui.getComponentByName(\"comment-tab\");\n\/\/\u6fc0\u6d3b\u201c\u6ce8\u91ca\u201dTab\u6807\u7b7e\u9875\ncommentTab.active();\n\n\/\/\u5c55\u5f00\u5e76\u6fc0\u6d3b\u5de6\u4fa7\u8fb9\u680f\u4e2d\u7684\u201c\u6ce8\u91ca\u5217\u8868\u201d\npdfui.getComponentByName('sidebar').then(sidebar=&gt;{\n    sidebar.expand();\n    sidebar.getComponentByName('comment-list-sidebar-panel').active();\n}); *\/<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading has-medium-font-size\"><strong>\u7f3a\u7701\u6253\u5f00\u6307\u5b9a\u7684\u6807\u7b7e\u9875<\/strong><\/h1>\n\n\n\n<p>\u76f8\u5173\u64cd\u4f5c\u5e94\u8be5\u653e\u5728\u5b9e\u4f8b\u5316\u5bf9\u8c61\u521d\u59cb\u5316\u5b8c\u6210\u4e4b\u540e\u8fdb\u884c\uff0c\u5426\u5219\u5c06\u65e0\u6cd5\u6b63\u5e38\u54cd\u5e94\u3002\u53ef\u4ee5\u5728\u521d\u59cb\u5316\u5b8c\u6210\u7684\u76d1\u542c\u4e8b\u4ef6initializationCompleted\u7684\u56de\u8c03\u4e2d\u6267\u884c\u9700\u8981\u7684\u76f8\u5173\u64cd\u4f5c\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-body-font-family has-medium-font-size\"><code>\/\/\u521d\u59cb\u5316\u5b8c\u6210\u540e\uff0c\u7f3a\u7701\u6253\u5f00\u201c\u7f16\u8f91\u201d\u6807\u7b7e\u9875\npdfui.addUIEventListener(UIExtension.UIEvents.initializationCompleted, async function(){\n\tvar theTab = await pdfui.getComponentByName(\"edit-tab\");\n\ttheTab.active();\n});<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u82e5\u60a8\u60f3\u8981\u6253\u5f00\u6307\u5b9a\u7684\u67d0\u4e2a\u6807\u7b7e\u9875\uff0c\u8bf7\u53c2\u8003\u300a\u5f00\u53d1\u8005\u624b\u518c\u300b\u4e2d\u201c\u7ec4\u4ef6\u201d\u7ae0\u8282\u7684\u201c\u57fa\u7840\u7ec4\u4ef6\u201d-\u201cTab\u7ec4\u4ef6\u201d-\u201cAPI\u201d\u5c0f\u8282 [&hellip;]<\/p>\n","protected":false},"author":32,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67],"tags":[652,653],"class_list":["post-3837","post","type-post","status-publish","format-standard","hentry","category-websdk","tag-tab","tag-653"],"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","_links":{"self":[{"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts\/3837","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3837"}],"version-history":[{"count":3,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts\/3837\/revisions"}],"predecessor-version":[{"id":5561,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts\/3837\/revisions\/5561"}],"wp:attachment":[{"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3837"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3837"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}