{"id":124438,"date":"2026-11-19T01:24:33","date_gmt":"2026-11-18T17:24:33","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/124438.html"},"modified":"2026-11-19T01:24:33","modified_gmt":"2026-11-18T17:24:33","slug":"electron-%e6%a1%8c%e9%9d%a2%e5%ba%94%e7%94%a8%e6%8e%88%e6%9d%83%e6%a0%a1%e9%aa%8c%e7%9a%84%e5%b8%b8%e8%a7%81%e8%ae%be%e8%ae%a1%e7%bc%ba%e9%99%b7%e4%b8%8e%e5%8a%a0%e5%9b%ba%e5%ae%9e%e8%b7%b5","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/124438.html","title":{"rendered":"Electron \u684c\u9762\u5e94\u7528\u6388\u6743\u6821\u9a8c\u7684\u5e38\u89c1\u8bbe\u8ba1\u7f3a\u9677\u4e0e\u52a0\u56fa\u5b9e\u8df5"},"content":{"rendered":"<p>        \/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/<br \/>\n        #content_views .toc,<br \/>\n        \/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/<br \/>\n        #content_views.markdown_views &gt; p:empty:has(+ .toc),<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty,<br \/>\n        \/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/<br \/>\n        #content_views.htmledit_views #main-toc,<br \/>\n        #content_views.htmledit_views #hr-toc,<br \/>\n        #content_views.htmledit_views p[id*=\\&#8221;-toc\\&#8221;] {<br \/>\n          display: none !important;<br \/>\n        }<br \/>\n        \/* \u76ee\u5f55\u53bb\u6389\u540e\uff0c\u7d27\u8ddf\u7684\u9996\u4e2a\u6807\u9898\u4e0d\u518d\u591a\u51fa\u4e00\u5757\u4e0a\u8fb9\u8ddd *\/<br \/>\n        #content_views.markdown_views &gt; .toc + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + h4,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h4 {<br \/>\n          margin-top: 0 !important;<br \/>\n        }<\/p>\n<h2>Electron \u684c\u9762\u5e94\u7528\u6388\u6743\u6821\u9a8c\u7684\u5e38\u89c1\u8bbe\u8ba1\u7f3a\u9677\u4e0e\u52a0\u56fa\u5b9e\u8df5<\/h2>\n<p>\u4ee5\u4e00\u4e2a\u5e26\u79bb\u7ebf\u6388\u6743\u7684 Markdown \u7f16\u8f91\u5668\u4e3a\u4f8b<\/p>\n<p>\u8bf4\u660e&#xff1a;\u672c\u6587\u53ea\u8ba8\u8bba\u5ba2\u6237\u7aef\u6388\u6743\u72b6\u6001\u673a\u7684\u7ed3\u6784\u7f3a\u9677\u4e0e\u52a0\u56fa\u65b9\u6848&#xff0c;\u4e0d\u542b\u4efb\u4f55\u5382\u5546\u4e8c\u8fdb\u5236\u3001\u5e8f\u5217\u53f7\u3001\u8865\u4e01\u6216\u53ef\u6267\u884c\u5de5\u5177&#xff1b;\u6240\u6709\u73b0\u8c61\u63cf\u8ff0\u6765\u81ea\u4e2a\u4eba\u6d4b\u8bd5\u73af\u5883\u4e2d\u7684\u5bf9\u7167\u5b9e\u9a8c\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u4e3a\u4ec0\u4e48\u503c\u5f97\u5355\u72ec\u7814\u7a76<\/h3>\n<p>\u684c\u9762\u7aef\u8f6f\u4ef6\u505a\u6388\u6743&#xff0c;\u666e\u904d\u4f1a\u9047\u5230\u4e00\u4e2a\u7ed5\u4e0d\u5f00\u7684\u77db\u76fe&#xff1a;<\/p>\n<ul>\n<li>\u6388\u6743\u6570\u636e\u5fc5\u987b\u80fd\u88ab\u7a0b\u5e8f\u8bfb\u5230 \u2192 \u5b83\u4e00\u5b9a\u843d\u5728\u672c\u5730&#xff1b;<\/li>\n<li>\u6821\u9a8c\u903b\u8f91\u5fc5\u987b\u80fd\u88ab\u7a0b\u5e8f\u6267\u884c \u2192 \u5b83\u4e00\u5b9a\u8dd1\u5728\u672c\u5730&#xff1b;<\/li>\n<li>\u4e8e\u662f&#034;\u6821\u9a8c&#034;\u8fd9\u4ef6\u4e8b&#xff0c;\u672c\u8d28\u4e0a\u662f\u5728\u4e00\u4e2a\u653b\u51fb\u8005\u53ef\u4ee5\u5b8c\u5168\u63a7\u5236\u7684\u8fd0\u884c\u73af\u5883\u91cc\u81ea\u8bc1\u6e05\u767d\u3002<\/li>\n<\/ul>\n<p>Electron \u751f\u6001\u628a\u8fd9\u4e2a\u95ee\u9898\u653e\u5927\u4e86\u4e00\u6863&#xff1a;\u5e94\u7528\u903b\u8f91\u662f JS&#xff08;\u53ef\u8bfb\u3001\u53ef\u66ff\u6362&#xff09;&#xff0c;\u6253\u5305\u6210 asar&#xff08;\u53ef\u89e3\u5305\u3001\u53ef\u91cd\u6253\u5305&#xff09;&#xff0c;\u4e3b\u8fdb\u7a0b\u8fd8\u5e26\u7740 Node \u7684\u5168\u90e8\u80fd\u529b&#xff08;require\u3001crypto\u3001net&#xff09;\u3002\u5f00\u53d1\u8005\u4e60\u60ef\u628a\u6388\u6743\u5224\u5b9a\u5199\u6210&#034;\u8bfb\u672c\u5730\u6587\u4ef6 \u2192 \u6821\u9a8c\u7b7e\u540d \u2192 \u8bb0\u4f4f\u72b6\u6001&#034;&#xff0c;\u8fd9\u6761\u94fe\u4e0a\u7684\u6bcf\u4e00\u73af\u90fd\u66b4\u9732\u5728\u540c\u4e00\u4e2a\u8fdb\u7a0b\u91cc\u3002<\/p>\n<p>\u672c\u6587\u6309&#034;\u7ed3\u6784\u6d4b\u7ed8 \u2192 \u7f3a\u9677\u6e05\u5355 \u2192 \u52a0\u56fa\u6e05\u5355 \u2192 \u9a8c\u8bc1\u65b9\u6cd5&#034;\u7684\u987a\u5e8f\u5c55\u5f00&#xff0c;\u91cd\u70b9\u5728\u600e\u4e48\u4fee&#xff0c;\u4e0d\u5728\u600e\u4e48\u7ed5\u3002<\/p>\n<hr \/>\n<h3>\u4e8c\u3001\u7ed3\u6784\u6d4b\u7ed8&#xff1a;Electron \u5e94\u7528\u7684\u5178\u578b\u9aa8\u67b6<\/h3>\n<p>\u4e00\u4e2a\u6210\u719f\u7684 Electron \u5546\u4e1a\u5e94\u7528&#xff0c;resources\/ \u76ee\u5f55\u901a\u5e38\u957f\u8fd9\u6837&#xff1a;<\/p>\n<table>\n<tr>\u6587\u4ef6\u4f5c\u7528\u662f\u5426\u5e38\u88ab\u5b8c\u6574\u6027\u6821\u9a8c\u8986\u76d6<\/tr>\n<tbody>\n<tr>\n<td>app.asar<\/td>\n<td>\u4e3b\u8fdb\u7a0b\u5165\u53e3\u3001IPC\u3001\u7a97\u53e3\u7ba1\u7406<\/td>\n<td>\u5e38\u88ab\u8986\u76d6&#xff08;\u91cd\u70b9\u4fdd\u62a4\u5bf9\u8c61&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>app.asar \u5185\u7684 .jsc<\/td>\n<td>V8 \u5b57\u8282\u7801\u5f62\u5f0f\u7684\u4e3b\u903b\u8f91<\/td>\n<td>\u540c\u4e0a<\/td>\n<\/tr>\n<tr>\n<td>lib.asar<\/td>\n<td>\u6e32\u67d3\u4fa7\u7b2c\u4e09\u65b9\u5e93<\/td>\n<td>\u5f88\u5c11<\/td>\n<\/tr>\n<tr>\n<td>node_modules.asar<\/td>\n<td>\u8fd0\u884c\u671f\u4f9d\u8d56&#xff08;\u6587\u4ef6\u7cfb\u7edf\u3001\u7f51\u7edc\u3001\u65e5\u5fd7\u7b49&#xff09;<\/td>\n<td>\u51e0\u4e4e\u4ece\u4e0d<\/td>\n<\/tr>\n<tr>\n<td>node_modules\/*.node<\/td>\n<td>\u539f\u751f\u6a21\u5757<\/td>\n<td>\u5f88\u5c11<\/td>\n<\/tr>\n<tr>\n<td>page-dist\/*<\/td>\n<td>\u6e32\u67d3\u9875\u9762\u4e0e\u6253\u5305\u4ea7\u7269<\/td>\n<td>\u5076\u5c14<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8fd9\u5957\u9aa8\u67b6\u5e26\u6765\u4e00\u4e2a\u975e\u5e38\u7a33\u5b9a\u7684\u89c2\u5bdf\u7ed3\u679c&#xff1a;<\/p>\n<p>\u5b8c\u6574\u6027\u6821\u9a8c\u901a\u5e38\u53ea\u8986\u76d6&#034;\u4f5c\u8005\u8ba4\u4e3a\u91cd\u8981\u7684\u90a3\u4e2a\u5305&#034;&#xff0c;\u800c require \u94fe\u4f1a\u6a2a\u8de8\u6240\u6709\u5305\u3002<\/p>\n<p>\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u53ea\u8981\u6709\u4e00\u4e2a&#034;\u4f1a\u88ab\u52a0\u8f7d\u3001\u4f46\u4e0d\u88ab\u6821\u9a8c&#034;\u7684 JS \u9762\u5b58\u5728&#xff0c;\u6821\u9a8c\u94fe\u5c31\u51fa\u73b0\u4e86\u7f3a\u53e3\u3002\u8fd9\u4e0d\u662f\u67d0\u4e00\u5bb6\u7684\u95ee\u9898&#xff0c;\u800c\u662f\u6253\u5305\u8303\u5f0f\u81ea\u5e26\u7684\u7ed3\u6784\u6027\u76f2\u533a\u3002<\/p>\n<hr \/>\n<h3>\u4e09\u3001\u4e09\u7c7b\u5e38\u89c1\u7f3a\u9677&#xff08;\u73b0\u8c61\u7ea7\u63cf\u8ff0&#xff09;<\/h3>\n<h4>\u7f3a\u9677 1&#xff1a;\u5b8c\u6574\u6027\u6821\u9a8c\u7684\u8986\u76d6\u9762\u5c0f\u4e8e\u52a0\u8f7d\u9762<\/h4>\n<p>\u5178\u578b\u5b9e\u73b0\u662f\u5728 app.asar \u7684 header \u91cc\u4e3a\u6bcf\u4e2a\u6587\u4ef6\u5b58 SHA256&#xff1a;<\/p>\n<p><span class=\"token string-property property\">&#034;main.js&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token string-property property\">&#034;size&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">1383<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token string-property property\">&#034;offset&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;388400&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token string-property property\">&#034;integrity&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token string-property property\">&#034;algorithm&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;SHA256&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string-property property\">&#034;hash&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;3ec9df88\u2026b81b&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string-property property\">&#034;blockSize&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">4194304<\/span> <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u5bf9\u7167\u5b9e\u9a8c\u7684\u7ed3\u8bba\u5f88\u6e05\u6670&#xff1a;<\/p>\n<ul>\n<li>\u6539\u4e3b\u5305 \u2192 \u542f\u52a8\u5373\u62a5\u5b8c\u6574\u6027\u9519\u8bef\u5e76\u9000\u51fa&#xff08;\u9632\u62a4\u6709\u6548&#xff09;&#xff1b;<\/li>\n<li>\u6539\u4e00\u4e2a&#034;\u4f1a\u88ab require\u3001\u4f46\u4e0d\u5728\u6e05\u5355\u91cc&#034;\u7684\u9644\u52a0\u5305 \u2192 \u542f\u52a8\u65e0\u5f02\u5e38&#xff08;\u9632\u62a4\u7f3a\u5931&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u52a0\u56fa\u70b9&#xff1a;\u5b8c\u6574\u6027\u6e05\u5355\u5fc5\u987b\u8986\u76d6\u6240\u6709\u53c2\u4e0e\u6267\u884c\u7684\u5f52\u6863&#xff0c;\u5e76\u4e14\u5728\u8fdb\u5165\u4e1a\u52a1\u903b\u8f91\u4e4b\u524d\u6821\u9a8c&#xff1b;\u6821\u9a8c\u7ed3\u679c\u4e0d\u5141\u8bb8\u964d\u7ea7&#xff08;\u5931\u8d25\u53ea\u80fd\u9000\u51fa&#xff0c;\u4e0d\u80fd&#034;\u4ec5\u544a\u8b66&#034;&#xff09;\u3002<\/p>\n<h4>\u7f3a\u9677 2&#xff1a;\u6388\u6743\u5224\u5b9a\u662f\u4e00\u6761\u53ef\u88ab\u6574\u4f53\u66ff\u6362\u7684\u4fe1\u4efb\u94fe<\/h4>\n<p>\u591a\u6570\u79bb\u7ebf\u6388\u6743\u7684\u6d41\u7a0b\u662f&#xff1a;<\/p>\n<p>\u8f93\u5165\u5e8f\u5217\u53f7 \u2192 \u672c\u5730\u683c\u5f0f\u68c0\u67e5 \u2192 \u8bf7\u6c42\u6388\u6743\u670d\u52a1 \u2192 \u62ff\u5230&#034;\u58f0\u660e&#034;(claim) \u2192 \u672c\u5730\u9a8c\u7b7e \u2192 \u5199\u5165\u672c\u5730\u72b6\u6001<\/p>\n<p>\u95ee\u9898\u5728\u4e8e&#xff0c;\u8fd9\u6761\u94fe\u7684\u4e24\u4e2a\u5173\u952e\u8282\u70b9\u90fd\u5728\u540c\u4e00\u4e2a JS \u8fd0\u884c\u65f6\u91cc&#xff1a;<\/p>\n<ul>\n<li>\u7f51\u7edc\u8bf7\u6c42\u7531\u5e94\u7528\u81ea\u5df1\u53d1\u51fa&#xff08;\u53ef\u88ab\u540c\u8fdb\u7a0b\u5185\u7684\u8bf7\u6c42\u7ba1\u7ebf\u6539\u5199&#xff09;&#xff1b;<\/li>\n<li>\u58f0\u660e\u9a8c\u7b7e\u7531\u5e94\u7528\u81ea\u5df1\u5b8c\u6210&#xff08;crypto \u6a21\u5757\u5728\u540c\u8fdb\u7a0b\u5185\u53ef\u88ab\u5305\u88c5&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u4e8e\u662f&#034;\u9a8c\u8bc1\u65b9&#034;\u548c&#034;\u88ab\u9a8c\u8bc1\u65b9&#034;\u5171\u5904\u4e00\u4e2a\u8fdb\u7a0b&#xff0c;\u653b\u51fb\u8005\u53ea\u9700\u8981\u7ad9\u5728\u4e24\u8005\u4e2d\u95f4\u2014\u2014\u4e0d\u9700\u8981\u79c1\u94a5&#xff0c;\u4e5f\u80fd\u6539\u53d8\u7ed3\u8bba\u3002<\/p>\n<p>\u52a0\u56fa\u70b9&#xff1a;\u628a&#034;\u9a8c\u7b7e&#034;\u4e0b\u6c89\u5230\u4e0d\u53c2\u4e0e\u4e1a\u52a1\u903b\u8f91\u7684\u539f\u751f\u6a21\u5757\u91cc&#xff0c;\u5e76\u4e14\u8ba9 JS \u4fa7\u53ea\u62ff\u5230\u5e03\u5c14\u7ed3\u8bba\u3001\u62ff\u4e0d\u5230\u5bc6\u94a5\u4e0e\u4e2d\u95f4\u6001&#xff1b;\u7f51\u7edc\u5c42\u7684\u5173\u952e\u8bf7\u6c42\u4e0d\u5e94\u7531\u4e1a\u52a1 JS \u76f4\u63a5\u53d1\u8d77\u3002<\/p>\n<h4>\u7f3a\u9677 3&#xff1a;\u53cd\u8c03\u8bd5\u53ea\u5c01\u4e86\u4e00\u6761\u8def<\/h4>\n<p>\u5b9e\u6d4b\u4e2d\u80fd\u770b\u5230\u5178\u578b\u7684&#034;\u5c01\u4e86\u4e00\u534a&#034;&#xff1a;<\/p>\n<ul>\n<li>\u6253\u5f00\u8fdc\u7a0b\u8c03\u8bd5\u7aef\u53e3 \u2192 \u88ab\u660e\u786e\u62d2\u7edd&#xff08;Not allow debugging this program&#xff09;&#xff1b;<\/li>\n<li>\u4f46\u540c\u4e00\u8fdb\u7a0b\u7684 require \u94fe\u3001\u73af\u5883\u53d8\u91cf\u3001\u6a21\u5757\u7f13\u5b58\u90fd\u6ca1\u6709\u505a\u81ea\u68c0\u3002<\/li>\n<\/ul>\n<p>\u52a0\u56fa\u70b9&#xff1a;\u53cd\u8c03\u8bd5\u5e94\u5f53\u8986\u76d6&#034;\u8c03\u8bd5\u5668\u5b58\u5728&#034;\u300cV8 flags \u88ab\u6539\u5199\u300d\u300cmodule cache \u88ab\u6ce8\u5165\u300d\u4e09\u7c7b\u4fe1\u53f7&#xff0c;\u800c\u4e0d\u662f\u53ea\u6321\u4e00\u4e2a\u7aef\u53e3\u3002<\/p>\n<hr \/>\n<h3>\u56db\u3001\u52a0\u56fa\u6e05\u5355&#xff08;\u53ef\u76f4\u63a5\u843d\u5730&#xff09;<\/h3>\n<p>\u6309\u6295\u5165\u4ea7\u51fa\u6bd4\u6392\u5e8f&#xff0c;\u524d\u56db\u6761\u80fd\u6321\u6389\u7edd\u5927\u591a\u6570\u4f4e\u6210\u672c\u7ed5\u8fc7&#xff1a;<\/p>\n<li>\u628a\u6821\u9a8c\u505a\u8fdb native&#xff1a;\u5b8c\u6574\u6027\u6821\u9a8c\u3001\u9a8c\u7b7e\u3001\u72b6\u6001\u673a\u5224\u5b9a\u90fd\u653e\u8fdb\u7b7e\u540d\u8fc7\u7684 .node \u6a21\u5757&#xff1b;JS \u53ea\u505a UI \u4e0e IPC \u8f6c\u53d1\u3002<\/li>\n<li>\u6269\u5927\u5b8c\u6574\u6027\u8986\u76d6&#xff1a;app.asar &#043; lib.asar &#043; node_modules.asar &#043; \u539f\u751f\u6a21\u5757\u5168\u90e8\u7eb3\u5165\u6e05\u5355&#xff0c;\u4e14\u6e05\u5355\u672c\u8eab\u4e0d\u53ef\u7531 JS \u4fa7\u8bfb\u53d6\u540e\u4fee\u6539&#xff08;\u653e\u8fdb\u53ef\u6267\u884c\u6587\u4ef6\u7684\u53ea\u8bfb\u6bb5&#xff09;\u3002<\/li>\n<li>\u6821\u9a8c\u65f6\u673a\u524d\u7f6e&#xff1a;\u5728\u4efb\u4f55\u4e1a\u52a1\u4ee3\u7801\u6267\u884c\u524d\u5b8c\u6210\u4e00\u6b21\u5168\u91cf\u6821\u9a8c&#xff1b;\u5931\u8d25\u5373\u9000\u51fa&#xff0c;\u4e0d\u63d0\u4f9b&#034;\u964d\u7ea7\u6a21\u5f0f&#034;\u3002<\/li>\n<li>\u62bd\u68c0 require \u94fe&#xff1a;\u542f\u52a8\u65f6\u4e0e\u8fd0\u884c\u671f\u5404\u62bd\u68c0\u82e5\u5e72\u5165\u53e3\u6587\u4ef6\u7684\u54c8\u5e0c&#xff0c;\u53d1\u73b0\u4e0d\u4e00\u81f4\u5373\u7ec8\u6b62\u4f1a\u8bdd&#xff08;\u9632\u6b62&#034;\u6ce8\u5165\u4e00\u884c require&#034;\u8fd9\u7c7b\u6700\u5c0f\u6539\u52a8\u653b\u51fb&#xff09;\u3002<\/li>\n<li>\u5173\u952e\u8bf7\u6c42\u4e0d\u8fc7\u4e1a\u52a1 JS&#xff1a;\u6388\u6743\u8bf7\u6c42\u3001\u5fc3\u8df3\u3001\u540a\u9500\u68c0\u67e5\u7531\u539f\u751f\u5c42\u53d1\u8d77&#xff0c;\u4e1a\u52a1\u4fa7\u53ea\u6536\u7ed3\u679c\u3002<\/li>\n<li>\u53cc\u7aef\u4e00\u81f4&#xff1a;\u670d\u52a1\u7aef\u7b7e\u53d1\u7684\u58f0\u660e\u8981\u5305\u542b\u8bbe\u5907\u4fa7\u6307\u7eb9&#xff0c;\u5e76\u4e14\u58f0\u660e\u77ed\u65f6\u6548 &#043; \u53ef\u540a\u9500&#xff1b;\u672c\u5730\u53ea\u505a&#034;\u58f0\u660e\u7684\u642c\u8fd0\u5de5&#034;\u3002<\/li>\n<li>\u53cd\u8c03\u8bd5\u4e09\u4ef6\u5957&#xff1a;\u5173\u95ed inspect\/debug \u76f8\u5173 fuse&#xff1b;\u68c0\u6d4b\u8c03\u8bd5\u5668\u9644\u52a0&#xff1b;\u6821\u9a8c V8 \u542f\u52a8 flags \u672a\u88ab\u6539\u5199\u3002<\/li>\n<li>\u7b7e\u540d\u81ea\u68c0&#xff1a;\u53ef\u6267\u884c\u6587\u4ef6\u7b7e\u540d &#043; \u5f52\u6863\u54c8\u5e0c &#043; \u76ee\u5f55 mtime \u4e09\u8005\u7ec4\u5408\u6821\u9a8c&#xff0c;\u9632\u6b62&#034;\u6362\u5305\u4e0d\u6362\u7b7e\u540d&#034;\u7684\u5c40\u90e8\u66ff\u6362\u3002<\/li>\n<li>\u5f02\u5e38\u4e0a\u62a5&#xff1a;\u5b8c\u6574\u6027\u5931\u8d25\u3001\u9a8c\u7b7e\u5931\u8d25\u3001\u8c03\u8bd5\u7aef\u53e3\u88ab\u8bbf\u95ee\u7b49\u4e8b\u4ef6\u505a\u57cb\u70b9&#xff08;\u8131\u654f&#xff09;&#xff0c;\u7528\u4e8e\u53d1\u73b0\u6279\u91cf\u653b\u51fb\u3002<\/li>\n<li>\u8f6e\u6362&#xff1a;\u6821\u9a8c\u903b\u8f91\u4e0e\u5bc6\u94a5\u968f\u7248\u672c\u6f14\u8fdb&#xff0c;\u907f\u514d&#034;\u4e00\u6b21\u9006\u5411\u957f\u671f\u6709\u6548&#034;\u3002<\/li>\n<hr \/>\n<h3>\u4e94\u3001\u600e\u4e48\u9a8c\u8bc1\u52a0\u56fa\u662f\u5426\u771f\u7684\u751f\u6548<\/h3>\n<p>\u7ed9\u81ea\u5df1\u51c6\u5907\u4e00\u4efd\u5bf9\u7167\u7ec4&#xff1a;\u540c\u4e00\u4efd\u5e94\u7528&#xff0c;\u5206\u522b\u7528&#034;\u672a\u52a0\u56fa&#034;\u548c&#034;\u52a0\u56fa\u540e&#034;\u4e24\u7248&#xff0c;\u8dd1\u4e0b\u9762\u56db\u9879\u68c0\u67e5\u3002<\/p>\n<table>\n<tr>\u68c0\u67e5\u9879\u672a\u52a0\u56fa\u7684\u5178\u578b\u8868\u73b0\u52a0\u56fa\u540e\u5e94\u8fbe\u5230<\/tr>\n<tbody>\n<tr>\n<td>\u6539\u9644\u52a0\u5f52\u6863\u4e2d\u7684\u4e00\u4e2a\u5165\u53e3<\/td>\n<td>\u65e0\u5f02\u5e38&#xff0c;\u529f\u80fd\u6b63\u5e38<\/td>\n<td>\u542f\u52a8\u5931\u8d25 \/ \u4f1a\u8bdd\u7ec8\u6b62<\/td>\n<\/tr>\n<tr>\n<td>\u66ff\u6362\u8fdb\u7a0b\u5185\u7684\u52a0\u5bc6\u8c03\u7528<\/td>\n<td>\u9a8c\u7b7e\u7ed3\u8bba\u88ab\u6539\u5199<\/td>\n<td>\u65e0\u6cd5\u4fee\u6539&#xff08;\u4e0d\u5728 JS \u53ef\u8fbe\u8303\u56f4&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u6539\u5199\u6388\u6743\u8bf7\u6c42\u7684\u54cd\u5e94<\/td>\n<td>\u72b6\u6001\u88ab\u63a5\u53d7<\/td>\n<td>\u8bf7\u6c42\u4e0d\u7ecf\u8fc7 JS&#xff0c;\u6216\u7b7e\u540d\u4e0d\u53ef\u4f2a\u9020<\/td>\n<\/tr>\n<tr>\n<td>\u6253\u5f00\u8c03\u8bd5\u7aef\u53e3 \/ \u6ce8\u5165\u6a21\u5757<\/td>\n<td>\u53ef\u80fd\u6210\u529f<\/td>\n<td>\u660e\u786e\u62d2\u7edd &#043; \u4e8b\u4ef6\u4e0a\u62a5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8fd9\u56db\u9879\u91cc&#xff0c;\u7b2c\u4e00\u9879\u548c\u7b2c\u4e09\u9879\u662f\u6700\u5bb9\u6613\u505a\u3001\u4e5f\u6700\u5bb9\u6613\u6f0f\u7684&#xff0c;\u5efa\u8bae\u4f18\u5148\u8865\u3002<\/p>\n<hr \/>\n<h3>\u516d\u3001\u7ed3\u8bba<\/h3>\n<p>\u684c\u9762\u8f6f\u4ef6\u7684\u6388\u6743\u6821\u9a8c&#xff0c;\u6700\u7ec8\u662f\u4e00\u4e2a&#034;\u53ef\u4fe1\u8ba1\u7b97\u57fa&#034;\u95ee\u9898&#xff1a;<\/p>\n<ul>\n<li>\u53ea\u8981\u5224\u5b9a\u903b\u8f91\u548c\u5b83\u7684\u8f93\u5165\u5904\u4e8e\u540c\u4e00\u4e2a\u53ef\u5199\u8fdb\u7a0b\u5185&#xff0c;\u5b83\u5c31\u4e0d\u53ef\u80fd\u81ea\u8bc1\u6e05\u767d&#xff1b;<\/li>\n<li>\u80fd\u505a\u7684\u662f\u628a\u53ef\u4fe1\u8fb9\u754c\u538b\u5230\u6700\u5c0f\u2014\u2014native \u6821\u9a8c\u3001\u5168\u91cf\u5b8c\u6574\u6027\u3001\u524d\u7f6e\u65f6\u673a\u3001\u8bf7\u6c42\u4e0b\u6c89\u3001\u53ef\u540a\u9500\u58f0\u660e&#xff1b;<\/li>\n<li>JS \u5c42\u6c38\u8fdc\u4e0d\u8be5\u627f\u62c5&#034;\u8bc1\u660e\u81ea\u5df1\u6ca1\u88ab\u6539\u52a8&#034;\u7684\u804c\u8d23&#xff0c;\u5b83\u505a\u4e0d\u5230\u3002<\/li>\n<\/ul>\n<p>\u628a\u8fd9\u4e2a\u8fb9\u754c\u5212\u6e05\u695a&#xff0c;\u6bd4\u4e0d\u65ad\u52a0&#034;\u68c0\u6d4b&#034;\u66f4\u6709\u6548\u3002<\/p>\n<hr \/>\n<h3>\u5408\u89c4\u58f0\u660e<\/h3>\n<p>\u672c\u6587\u4e0d\u542b\u4efb\u4f55\u5382\u5546\u4e8c\u8fdb\u5236\u3001\u5e8f\u5217\u53f7\u3001\u6fc0\u6d3b\u7801\u3001\u8865\u4e01\u6216\u53ef\u7528\u5de5\u5177&#xff0c;\u4e5f\u4e0d\u63d0\u4f9b\u4e0b\u8f7d\u5730\u5740&#xff1b;\u6240\u6709\u7ed3\u8bba\u6765\u81ea\u4e2a\u4eba\u6d4b\u8bd5\u73af\u5883\u4e2d\u7684\u5bf9\u7167\u5b9e\u9a8c&#xff0c;\u76ee\u7684\u662f\u5e2e\u52a9\u5f00\u53d1\u8005\u8bc6\u522b\u81ea\u8eab\u4ea7\u54c1\u7684\u540c\u7c7b\u7f3a\u9677\u5e76\u52a0\u56fa\u3002<\/p>\n<p>      <span id=\"quality-guide-article-end\" aria-hidden=\"true\" style=\"display:block;height:1px;margin-bottom:-1px\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[11820,230,190,78],"topic":[],"class_list":["post-124438","post","type-post","status-publish","format-standard","hentry","category-server","tag-atomgit","tag-php","tag-190","tag-78"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Electron \u684c\u9762\u5e94\u7528\u6388\u6743\u6821\u9a8c\u7684\u5e38\u89c1\u8bbe\u8ba1\u7f3a\u9677\u4e0e\u52a0\u56fa\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/124438.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Electron \u684c\u9762\u5e94\u7528\u6388\u6743\u6821\u9a8c\u7684\u5e38\u89c1\u8bbe\u8ba1\u7f3a\u9677\u4e0e\u52a0\u56fa\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/124438.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-18T17:24:33+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/124438.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/124438.html\",\"name\":\"Electron \u684c\u9762\u5e94\u7528\u6388\u6743\u6821\u9a8c\u7684\u5e38\u89c1\u8bbe\u8ba1\u7f3a\u9677\u4e0e\u52a0\u56fa\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-11-18T17:24:33+00:00\",\"dateModified\":\"2026-11-18T17:24:33+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/124438.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/124438.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/124438.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Electron \u684c\u9762\u5e94\u7528\u6388\u6743\u6821\u9a8c\u7684\u5e38\u89c1\u8bbe\u8ba1\u7f3a\u9677\u4e0e\u52a0\u56fa\u5b9e\u8df5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Electron \u684c\u9762\u5e94\u7528\u6388\u6743\u6821\u9a8c\u7684\u5e38\u89c1\u8bbe\u8ba1\u7f3a\u9677\u4e0e\u52a0\u56fa\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/124438.html","og_locale":"zh_CN","og_type":"article","og_title":"Electron \u684c\u9762\u5e94\u7528\u6388\u6743\u6821\u9a8c\u7684\u5e38\u89c1\u8bbe\u8ba1\u7f3a\u9677\u4e0e\u52a0\u56fa\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content","og_url":"https:\/\/www.wsisp.com\/helps\/124438.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-11-18T17:24:33+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/124438.html","url":"https:\/\/www.wsisp.com\/helps\/124438.html","name":"Electron \u684c\u9762\u5e94\u7528\u6388\u6743\u6821\u9a8c\u7684\u5e38\u89c1\u8bbe\u8ba1\u7f3a\u9677\u4e0e\u52a0\u56fa\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-11-18T17:24:33+00:00","dateModified":"2026-11-18T17:24:33+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/124438.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/124438.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/124438.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Electron \u684c\u9762\u5e94\u7528\u6388\u6743\u6821\u9a8c\u7684\u5e38\u89c1\u8bbe\u8ba1\u7f3a\u9677\u4e0e\u52a0\u56fa\u5b9e\u8df5"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/124438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=124438"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/124438\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=124438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=124438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=124438"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=124438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}