{"id":39819,"date":"2023-09-28T16:54:01","date_gmt":"2023-09-28T08:54:01","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=39819"},"modified":"2023-09-28T16:54:01","modified_gmt":"2023-09-28T08:54:01","slug":"rhsyedyyjsb","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/39819.html","title":{"rendered":"\u5982\u4f55\u4f7f\u7528 Electron \u8c03\u7528\u786c\u4ef6\u8bbe\u5907"},"content":{"rendered":"

  Electron \u662f\u4e00\u79cd\u8de8\u5e73\u53f0\u7684\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u6846\u67b6\uff0c\u53ef\u4ee5\u8ba9\u5f00\u53d1\u8005\u4f7f\u7528 HTML\u3001CSS \u548c JavaScript \u6765\u521b\u5efa\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u3002<\/strong>\u5b83\u53ef\u4ee5\u8ba9\u5f00\u53d1\u8005\u8f7b\u677e\u5730\u8c03\u7528\u786c\u4ef6\u8bbe\u5907\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u591a\u7684\u529f\u80fd\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528 Electron \u8c03\u7528\u786c\u4ef6\u8bbe\u5907\uff0c\u4ee5\u53ca\u5b9e\u73b0\u66f4\u591a\u529f\u80fd\u7684\u65b9\u6cd5\u3002<\/p>\n

Electron \u4e2d\u7684\u786c\u4ef6\u8bbe\u5907<\/h2>\n

  Electron \u4e2d\u7684\u786c\u4ef6\u8bbe\u5907\u53ef\u4ee5\u5206\u4e3a\u4e24\u7c7b\uff1a\u4e00\u7c7b\u662f\u53ef\u4ee5\u88ab Electron \u76f4\u63a5\u8c03\u7528\u7684\u786c\u4ef6\u8bbe\u5907\uff0c\u53e6\u4e00\u7c7b\u662f\u9700\u8981\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u6216\u8005\u63d2\u4ef6\u624d\u80fd\u88ab Electron \u8c03\u7528\u7684\u786c\u4ef6\u8bbe\u5907\u3002\u524d\u8005\u53ef\u4ee5\u901a\u8fc7 Electron \u63d0\u4f9b\u7684 API \u8c03\u7528\uff0c\u540e\u8005\u9700\u8981\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u6216\u63d2\u4ef6\u6765\u5b9e\u73b0\u3002<\/p>\n

  \u53ef\u4ee5\u76f4\u63a5\u8c03\u7528\u7684\u786c\u4ef6\u8bbe\u5907<\/h3>\n

  \u53ef\u4ee5\u76f4\u63a5\u8c03\u7528\u7684\u786c\u4ef6\u8bbe\u5907\u5305\u62ec\uff1a\u6587\u4ef6\u7cfb\u7edf\u3001USB \u8bbe\u5907\u3001\u84dd\u7259\u8bbe\u5907\u3001\u7f51\u7edc\u8bbe\u5907\u7b49\u3002\u8fd9\u4e9b\u8bbe\u5907\u53ef\u4ee5\u901a\u8fc7 Electron \u63d0\u4f9b\u7684 API \u8c03\u7528\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u591a\u529f\u80fd\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u901a\u8fc7 Electron \u7684 API \u8c03\u7528\u6765\u8bfb\u53d6\u6587\u4ef6\u3001\u4e0a\u4f20\u6587\u4ef6\u3001\u64cd\u4f5c USB \u8bbe\u5907\u3001\u8fde\u63a5\u84dd\u7259\u8bbe\u5907\u3001\u53d1\u9001\u7f51\u7edc\u8bf7\u6c42\u7b49\u3002<\/p>\n

  \u9700\u8981\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u6216\u63d2\u4ef6\u624d\u80fd\u88ab Electron \u8c03\u7528\u7684\u786c\u4ef6\u8bbe\u5907<\/h3>\n

  \u9700\u8981\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u6216\u63d2\u4ef6\u624d\u80fd\u88ab Electron \u8c03\u7528\u7684\u786c\u4ef6\u8bbe\u5907\u5305\u62ec\uff1a\u786c\u4ef6\u4f20\u611f\u5668\u3001\u786c\u4ef6\u9a71\u52a8\u7a0b\u5e8f\u3001\u5916\u90e8\u6444\u50cf\u5934\u7b49\u3002\u8fd9\u4e9b\u8bbe\u5907\u9700\u8981\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u6216\u63d2\u4ef6\u624d\u80fd\u88ab Electron \u8c03\u7528\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u591a\u529f\u80fd\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u901a\u8fc7\u7b2c\u4e09\u65b9\u5e93\u6216\u63d2\u4ef6\u6765\u8bbf\u95ee\u786c\u4ef6\u4f20\u611f\u5668\u3001\u64cd\u4f5c\u786c\u4ef6\u9a71\u52a8\u7a0b\u5e8f\u3001\u4f7f\u7528\u5916\u90e8\u6444\u50cf\u5934\u7b49\u3002<\/p>\n

\u5982\u4f55\u4f7f\u7528 Electron \u8c03\u7528\u786c\u4ef6\u8bbe\u5907<\/h2>\n

  \u8981\u4f7f\u7528 Electron \u8c03\u7528\u786c\u4ef6\u8bbe\u5907\uff0c\u9996\u5148\u9700\u8981\u786e\u5b9a\u8981\u8c03\u7528\u7684\u786c\u4ef6\u8bbe\u5907\u7c7b\u578b\uff0c\u7136\u540e\u6839\u636e\u786c\u4ef6\u8bbe\u5907\u7c7b\u578b\u4f7f\u7528 Electron \u63d0\u4f9b\u7684 API \u6216\u7b2c\u4e09\u65b9\u5e93\u6216\u63d2\u4ef6\u6765\u5b9e\u73b0\u3002<\/p>\n

  \u53ef\u4ee5\u76f4\u63a5\u8c03\u7528\u7684\u786c\u4ef6\u8bbe\u5907<\/h3>\n

  \u53ef\u4ee5\u76f4\u63a5\u8c03\u7528\u7684\u786c\u4ef6\u8bbe\u5907\u53ef\u4ee5\u4f7f\u7528 Electron \u63d0\u4f9b\u7684 API \u6765\u5b9e\u73b0\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528 Electron \u7684 fs \u6a21\u5757\u6765\u8bfb\u53d6\u6587\u4ef6\u3001\u4f7f\u7528 usb \u6a21\u5757\u6765\u64cd\u4f5c USB \u8bbe\u5907\u3001\u4f7f\u7528 bluetooth \u6a21\u5757\u6765\u8fde\u63a5\u84dd\u7259\u8bbe\u5907\u3001\u4f7f\u7528 net \u6a21\u5757\u6765\u53d1\u9001\u7f51\u7edc\u8bf7\u6c42\u7b49\u3002<\/p>\n

  \u9700\u8981\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u6216\u63d2\u4ef6\u624d\u80fd\u88ab Electron \u8c03\u7528\u7684\u786c\u4ef6\u8bbe\u5907<\/h3>\n

  \u9700\u8981\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u6216\u63d2\u4ef6\u624d\u80fd\u88ab Electron \u8c03\u7528\u7684\u786c\u4ef6\u8bbe\u5907\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u6216\u63d2\u4ef6\u6765\u5b9e\u73b0\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528 sensor.js \u5e93\u6765\u8bbf\u95ee\u786c\u4ef6\u4f20\u611f\u5668\u3001\u4f7f\u7528 driver.js \u5e93\u6765\u64cd\u4f5c\u786c\u4ef6\u9a71\u52a8\u7a0b\u5e8f\u3001\u4f7f\u7528 camera.js \u63d2\u4ef6\u6765\u4f7f\u7528\u5916\u90e8\u6444\u50cf\u5934\u7b49\u3002<\/p>\n

\u603b\u7ed3<\/h2>\n

  Electron \u662f\u4e00\u79cd\u8de8\u5e73\u53f0\u7684\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u6846\u67b6\uff0c\u53ef\u4ee5\u8ba9\u5f00\u53d1\u8005\u4f7f\u7528 HTML\u3001CSS \u548c JavaScript \u6765\u521b\u5efa\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u3002<\/strong>Electron \u4e2d\u7684\u786c\u4ef6\u8bbe\u5907\u53ef\u4ee5\u5206\u4e3a\u53ef\u4ee5\u76f4\u63a5\u8c03\u7528\u7684\u786c\u4ef6\u8bbe\u5907\u548c\u9700\u8981\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u6216\u63d2\u4ef6\u624d\u80fd\u88ab Electron \u8c03\u7528\u7684\u786c\u4ef6\u8bbe\u5907\u3002\u8981\u4f7f\u7528 Electron \u8c03\u7528\u786c\u4ef6\u8bbe\u5907\uff0c\u9996\u5148\u9700\u8981\u786e\u5b9a\u8981\u8c03\u7528\u7684\u786c\u4ef6\u8bbe\u5907\u7c7b\u578b\uff0c\u7136\u540e\u6839\u636e\u786c\u4ef6\u8bbe\u5907\u7c7b\u578b\u4f7f\u7528 Electron \u63d0\u4f9b\u7684 API \u6216\u7b2c\u4e09\u65b9\u5e93\u6216\u63d2\u4ef6\u6765\u5b9e\u73b0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Electron\u662f\u4e00\u79cd\u8de8\u5e73\u53f0\u7684\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u6846\u67b6\uff0c\u53ef\u4ee5\u8ba9\u5f00\u53d1\u8005\u4f7f\u7528HTML\u3001CSS\u548cJavaScript\u6765\u521b\u5efa\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n","protected":false},"author":1,"featured_media":4132,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[305],"class_list":["post-39819","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-dzjs"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/39819","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=39819"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/39819\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=39819"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=39819"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=39819"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}