{"id":6924,"date":"2025-09-28T15:08:55","date_gmt":"2025-09-28T07:08:55","guid":{"rendered":"https:\/\/support.fuxinsoft.cn\/?p=6924"},"modified":"2025-09-30T14:05:16","modified_gmt":"2025-09-30T06:05:16","slug":"%e5%a6%82%e4%bd%95%e5%b1%8f%e8%94%bd%e6%b3%a8%e9%87%8a%e7%9a%84%e5%8f%b3%e9%94%ae%e8%8f%9c%e5%8d%95%e9%a1%b9%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/support.fuxinsoft.cn\/?p=6924","title":{"rendered":"\u5982\u4f55\u5c4f\u853d\u6ce8\u91ca\u5143\u7d20\u7684\u53f3\u952e\u83dc\u5355\uff1f"},"content":{"rendered":"\n<p>\u53ef\u6839\u636e\u5f00\u53d1\u8005\u624b\u518c\u7b2c279\u9875\u7684\u6307\u5f15\uff0c\u5728\u521d\u59cb\u5316PDFUI\u5b9e\u4f8b\u65f6\uff0c\u901a\u8fc7\u81ea\u5b9a\u4e49createContextMenu\u65b9\u6cd5\uff0c\u9690\u85cfSDK\u5185\u7f6e\u7684\u6ce8\u91ca\u53f3\u952e\u83dc\u5355\uff0c\u4f7f\u5176\u663e\u793a\u4e3a\u6d4f\u89c8\u5668\u9ed8\u8ba4\u83dc\u5355\u3002\u5177\u4f53\u5b9e\u73b0\u53ef\u53c2\u8003\u5982\u4e0b\u4ee3\u7801\u7247\u6bb5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>var pdfui = new UIExtension.PDFUI({\n    viewerOptions: {\n        libPath: '..\/..\/..\/lib',\n        jr: {\n            licenseSN: licenseSN,\n            licenseKey: licenseKey\n        },\n        viewerUI: new class extends UIExtension.XViewerUI {\n            createContextMenu(owner, anchor, config) {\n                if (owner instanceof PDFViewCtrl.AnnotComponent) {\n                    const contextMenuName = super.getAnnotsContextMenuName(owner)\n                    \/\/ if (contextMenuName === 'fv--underline-contextmenu'){    \/\/\u5c4f\u853d\u6307\u5b9a\u6ce8\u91ca\u7684\u53f3\u952e\u83dc\u5355\u9879\n                    if (contextMenuName){   \/\/\u5c4f\u853d\u6240\u6709\u6ce8\u91ca\u7684\u53f3\u952e\u83dc\u5355\u9879\n                        return;\n                    }\n                }\n                return super.createContextMenu(owner, anchor, config);\n            }\n        }()\n    },\n    renderTo: '#pdf-ui',\n    appearance: UIExtension.appearances.adaptive,\n    fragments: &#91;],\n    addons: UIExtension.PDFViewCtrl.DeviceInfo.isMobile ?\n        '..\/..\/..\/lib\/uix-addons\/allInOne.mobile.js' : '..\/..\/..\/lib\/uix-addons\/allInOne.js'\n});<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53ef\u6839\u636e\u5f00\u53d1\u8005\u624b\u518c\u7b2c279\u9875\u7684\u6307\u5f15\uff0c\u5728\u521d\u59cb\u5316PDFUI\u5b9e\u4f8b\u65f6\uff0c\u901a\u8fc7\u81ea\u5b9a\u4e49createContextMenu\u65b9\u6cd5\uff0c [&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":[1112,418,604,1111,374],"class_list":["post-6924","post","type-post","status-publish","format-standard","hentry","category-websdk","tag-createcontextmenu","tag-418","tag-604","tag-1111","tag-374"],"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\/6924","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=6924"}],"version-history":[{"count":2,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts\/6924\/revisions"}],"predecessor-version":[{"id":7024,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts\/6924\/revisions\/7024"}],"wp:attachment":[{"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6924"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6924"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}