{"id":19695,"date":"2025-01-29T23:30:50","date_gmt":"2025-01-29T15:30:50","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=19695"},"modified":"2025-01-29T23:30:50","modified_gmt":"2025-01-29T15:30:50","slug":"onlook","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/pt\/onlook\/","title":{"rendered":"Onlook\uff1a\u9762\u5411\u524d\u7aef\u8bbe\u8ba1\u5f00\u6e90Cursor\uff0c\u5728React\u5e94\u7528\u4e2d\u8bbe\u8ba1\u5e76\u53d1\u5e03\u4ee3\u7801"},"content":{"rendered":"<p>Onlook\u662f\u4e00\u6b3e\u5f00\u6e90\u7684\u8bbe\u8ba1\u5de5\u5177\uff0c\u4e13\u4e3a\u8bbe\u8ba1\u5e08\u548c\u5f00\u53d1\u8005\u6253\u9020\uff0c\u5141\u8bb8\u7528\u6237\u76f4\u63a5\u5728\u8fd0\u884c\u7684React\u5e94\u7528\u4e2d\u8fdb\u884c\u8bbe\u8ba1\uff0c\u5e76\u5c06\u8bbe\u8ba1\u4fee\u6539\u8f6c\u6362\u4e3a\u4ee3\u7801\u3002\u8be5\u5de5\u5177\u63d0\u4f9b\u4e86\u4e00\u79cd\u76f4\u89c2\u7684\u89c6\u89c9\u7f16\u8f91\u4f53\u9a8c\uff0c\u7c7b\u4f3c\u4e8eFigma\u6216Webflow\uff0c\u4f46\u91cd\u70b9\u5728\u4e8e\u672c\u5730\u64cd\u4f5c\u548c\u65e0\u7f1d\u7684\u4ee3\u7801\u96c6\u6210\u3002Onlook\u65e8\u5728\u7b80\u5316\u8bbe\u8ba1\u5230\u5f00\u53d1\u7684\u6d41\u7a0b\uff0c\u9002\u7528\u4e8eReact\u548cTailwindCSS\u6846\u67b6\u7684\u9879\u76ee\u3002\u5b83\u7684\u5f00\u53d1\u8005\u793e\u533a\u6d3b\u8dc3\uff0c\u4e0d\u65ad\u66f4\u65b0\u4ee5\u589e\u52a0\u65b0\u7684\u529f\u80fd\u548c\u652f\u6301\u66f4\u591a\u6846\u67b6\u3002<\/p>\n<p><img decoding=\"async\" title=\"Onlook\uff1a\u9762\u5411\u524d\u7aef\u8bbe\u8ba1\u7684\u5f00\u6e90Cursor\uff0c\u7f16\u5199React\u548cTailwindCSS\u4ee3\u7801-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/01\/0530eb576cc3deb.jpg\" alt=\"Onlook\uff1a\u9762\u5411\u524d\u7aef\u8bbe\u8ba1\u7684\u5f00\u6e90Cursor\uff0c\u7f16\u5199React\u548cTailwindCSS\u4ee3\u7801-1\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u529f\u80fd\u5217\u8868<\/h2>\n<ul>\n<li><strong>\u5b9e\u65f6\u8bbe\u8ba1\u4fee\u6539<\/strong>\uff1a\u5728\u6d4f\u89c8\u5668\u4e2d\u76f4\u63a5\u4fee\u6539React\u5e94\u7528\u7684UI\uff0c\u5b9e\u65f6\u67e5\u770b\u6548\u679c\u3002<\/li>\n<li><strong>\u4ee3\u7801\u8f6c\u6362<\/strong>\uff1a\u5c06\u8bbe\u8ba1\u4fee\u6539\u8f6c\u5316\u4e3a\u76f8\u5e94\u7684\u4ee3\u7801\uff0c\u76f4\u63a5\u63a8\u9001\u81f3\u4ee3\u7801\u5e93\u3002<\/li>\n<li><strong>\u591a\u6846\u67b6\u652f\u6301<\/strong>\uff1a\u76ee\u524d\u652f\u6301React\u548cTailwindCSS\uff0c\u672a\u6765\u8ba1\u5212\u6269\u5c55\u5230\u66f4\u591a\u6846\u67b6\u3002<\/li>\n<li><strong>\u672c\u5730\u64cd\u4f5c<\/strong>\uff1a\u6240\u6709\u64cd\u4f5c\u5728\u672c\u5730\u8fdb\u884c\uff0c\u4fdd\u969c\u6570\u636e\u5b89\u5168\u548c\u9690\u79c1\u3002<\/li>\n<li><strong>\u5f00\u6e90\u793e\u533a<\/strong>\uff1a\u4e30\u5bcc\u7684\u793e\u533a\u652f\u6301\u548c\u8d21\u732e\uff0c\u6301\u7eed\u7684\u529f\u80fd\u66f4\u65b0\u548c\u6539\u8fdb\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u4f7f\u7528\u5e2e\u52a9<\/h2>\n<h3>\u5b89\u88c5Onlook<\/h3>\n<ol>\n<li><strong>\u4e0b\u8f7dOnlook<\/strong>\uff1a\n<ul>\n<li>\u8bbf\u95eeOnlook\u7684GitHub\u9875\u9762\u3002<\/li>\n<li>\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u201cCode\u201d\u6309\u94ae\uff0c\u9009\u62e9\u201cDownload ZIP\u201d\u6765\u4e0b\u8f7d\u6e90\u7801\uff0c\u6216\u8005\u76f4\u63a5\u514b\u9686\u4ed3\u5e93\u5230\u672c\u5730\uff1a\n<pre><code>git clone https:\/\/github.com\/onlook-dev\/onlook.git\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u8bbe\u7f6e\u5f00\u53d1\u73af\u5883<\/strong>\uff1a\n<ul>\n<li>\u786e\u4fdd\u4f60\u5df2\u7ecf\u5b89\u88c5\u4e86Node.js\uff08\u63a8\u8350\u4f7f\u7528\u6700\u65b0\u7a33\u5b9a\u7248\u672c\uff09\u3002<\/li>\n<li>\u8fdb\u5165\u514b\u9686\u7684\u76ee\u5f55\u6216\u89e3\u538b\u7684\u6587\u4ef6\u5939\uff1a\n<pre><code>cd onlook\r\n<\/code><\/pre>\n<\/li>\n<li>\u5b89\u88c5\u4f9d\u8d56\uff1a\n<pre><code>npm install\r\n<\/code><\/pre>\n<\/li>\n<li>\u5982\u679c\u6709<code>.env.example<\/code>\uff0c\u8bf7\u590d\u5236\u5e76\u91cd\u547d\u540d\u4e3a<code>.env<\/code>\uff0c\u6839\u636e\u9700\u8981\u586b\u5199API\u5bc6\u94a5\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u542f\u52a8Onlook<\/strong>\uff1a\n<ul>\n<li>\u8fd0\u884c\u5f00\u53d1\u670d\u52a1\u5668\uff1a\n<pre><code>npm run dev\r\n<\/code><\/pre>\n<\/li>\n<li>\u8fd9\u5c06\u542f\u52a8Onlook\uff0c\u5141\u8bb8\u4f60\u5728\u672c\u5730\u6d4f\u89c8\u548c\u7f16\u8f91\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>\u4f7f\u7528Onlook\u8fdb\u884c\u8bbe\u8ba1<\/h3>\n<ol>\n<li><strong>\u542f\u52a8\u4f60\u7684React\u9879\u76ee<\/strong>\uff1a\n<ul>\n<li>\u786e\u4fdd\u4f60\u7684React\u9879\u76ee\u6b63\u5728\u672c\u5730\u8fd0\u884c\uff08\u4f8b\u5982\uff0c\u4f7f\u7528<code>npm start<\/code>\uff09\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u914d\u7f6e\u9879\u76ee<\/strong>\uff1a\n<ul>\n<li>\u5728\u4f60\u7684<code>next.config.mjs<\/code>\u6216<code>next.config.js<\/code>\u4e2d\u6dfb\u52a0Onlook\u63d2\u4ef6\uff1a\n<pre><code>import path from \"path\";\r\nconst nextConfig = {\r\nexperimental: {\r\nswcPlugins: [\r\n[\"@onlook\/nextjs\", { projectRoot: path.resolve(\".\") }]\r\n]\r\n}\r\n};\r\nexport default nextConfig;\r\n<\/code><\/pre>\n<\/li>\n<li>\u5982\u679c\u4f7f\u7528\u5176\u4ed6\u6846\u67b6\uff0c\u67e5\u9605Onlook\u7684\u6587\u6863\u4ee5\u83b7\u53d6\u7279\u5b9a\u7684\u914d\u7f6e\u6307\u5357\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u4f7f\u7528Onlook\u7f16\u8f91<\/strong>\uff1a\n<ul>\n<li>\u6253\u5f00Onlook\u5e94\u7528\uff0c\u5b83\u4f1a\u8bc6\u522b\u5e76\u52a0\u8f7d\u4f60\u7684React\u9879\u76ee\u3002<\/li>\n<li>\u4f60\u53ef\u4ee5\u50cf\u4f7f\u7528Chrome\u5f00\u53d1\u8005\u5de5\u5177\u4e00\u6837\uff0c\u901a\u8fc7\u70b9\u51fb\u3001\u62d6\u62fd\u6765\u7f16\u8f91UI\u3002<\/li>\n<li>\u4f7f\u7528\u53f3\u952e\u83dc\u5355\u9009\u62e9\u5143\u7d20\u4ee5\u67e5\u770b\u6216\u7f16\u8f91\u5176\u4ee3\u7801\u4f4d\u7f6e\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u53d1\u5e03\u66f4\u6539<\/strong>\uff1a\n<ul>\n<li>\u5b8c\u6210\u8bbe\u8ba1\u4fee\u6539\u540e\uff0c\u70b9\u51fb\u201c\u53d1\u5e03\u201d\u6309\u94ae\uff0cOnlook\u4f1a\u751f\u6210\u4e00\u4e2aPull Request\uff0c\u5c06\u4fee\u6539\u7684\u4ee3\u7801\u63a8\u9001\u5230\u4f60\u7684GitHub\u4ed3\u5e93\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>\u64cd\u4f5c\u7ec6\u8282<\/h3>\n<ul>\n<li><strong>\u5bfc\u822a\u5c42\u7ea7<\/strong>\uff1a\u4f7f\u7528\u5c42\u9762\u677f\u6765\u9009\u62e9\u3001\u9690\u85cf\u6216\u5c55\u5f00\u9879\u76ee\u4e2d\u7684\u4e0d\u540c\u5c42\u3002<\/li>\n<li><strong>\u6837\u5f0f\u7f16\u8f91<\/strong>\uff1a\u8c03\u6574\u989c\u8272\u3001\u5b57\u4f53\u3001\u5e03\u5c40\u7b49\uff0c\u76f4\u63a5\u5728\u6d4f\u89c8\u5668\u4e2d\u770b\u5230\u4fee\u6539\u6548\u679c\u3002<\/li>\n<li><strong>\u7ec4\u4ef6\u64cd\u4f5c<\/strong>\uff1a\u80fd\u591f\u590d\u5236\u3001\u7c98\u8d34\u3001\u79fb\u52a8\u548c\u5220\u9664\u7ec4\u4ef6\uff0c\u652f\u6301\u591a\u9009\u64cd\u4f5c\u3002<\/li>\n<li><strong>\u70ed\u952e\u652f\u6301<\/strong>\uff1a\u4f7f\u7528CMD+Option\u5feb\u901f\u5207\u6362\u5230\u4ea4\u4e92\u6a21\u5f0f\u4ee5\u5728\u9875\u9762\u5185\u6eda\u52a8\u3002<\/li>\n<\/ul>\n<h3>\u6ce8\u610f\u4e8b\u9879<\/h3>\n<ul>\n<li><strong>\u7248\u672c\u517c\u5bb9\u6027<\/strong>\uff1a\u786e\u4fdd\u4f60\u7684React\u7248\u672c\u4e0eOnlook\u652f\u6301\u7684\u7248\u672c\u76f8\u7b26\u3002<\/li>\n<li><strong>\u66f4\u65b0<\/strong>\uff1a\u5b9a\u671f\u68c0\u67e5Onlook\u7684\u66f4\u65b0\u4ee5\u83b7\u53d6\u6700\u65b0\u529f\u80fd\u548c\u4fee\u590d\u3002<\/li>\n<li><strong>\u793e\u533a\u53c2\u4e0e<\/strong>\uff1a\u52a0\u5165Onlook\u7684\u793e\u533a\uff0c\u53c2\u4e0e\u8ba8\u8bba\uff0c\u62a5\u544a\u95ee\u9898\u6216\u8d21\u732e\u4ee3\u7801\u3002<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u6d41\u7545\u5730\u4f7f\u7528Onlook\u6765\u63d0\u5347\u8bbe\u8ba1\u4e0e\u5f00\u53d1\u7684\u5de5\u4f5c\u6548\u7387\uff0c\u76f4\u63a5\u5728\u4f60\u7684React\u5e94\u7528\u4e2d\u8fdb\u884c\u8bbe\u8ba1\uff0c\u5e76\u65e0\u7f1d\u5730\u5c06\u8bbe\u8ba1\u8f6c\u6362\u4e3a\u53ef\u7ef4\u62a4\u7684\u4ee3\u7801\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Onlook\u662f\u4e00\u6b3e\u5f00\u6e90\u7684\u8bbe\u8ba1\u5de5\u5177\uff0c\u4e13\u4e3a\u8bbe\u8ba1\u5e08\u548c\u5f00\u53d1\u8005\u6253\u9020\uff0c\u5141\u8bb8\u7528\u6237\u76f4\u63a5\u5728\u8fd0\u884c\u7684React\u5e94\u7528\u4e2d\u8fdb\u884c\u8bbe\u8ba1\uff0c\u5e76\u5c06\u8bbe\u8ba1\u4fee\u6539\u8f6c\u6362\u4e3a\u4ee3\u7801\u3002\u8be5\u5de5\u5177\u63d0\u4f9b\u4e86\u4e00\u79cd\u76f4\u89c2\u7684\u89c6\u89c9\u7f16\u8f91\u4f53\u9a8c\uff0c\u7c7b\u4f3c\u4e8eFigma\u6216Webflow\uff0c\u4f46\u91cd\u70b9\u5728\u4e8e\u672c\u5730\u64cd\u4f5c\u548c\u65e0\u7f1d\u7684\u4ee3\u7801\u96c6\u6210\u3002Onl&#8230;<\/p>\n","protected":false},"author":1,"featured_media":61748,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[230,253],"class_list":["post-19695","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tool","tag-aikaiyuanxiangmu","tag-aiyemiansheji"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/posts\/19695","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/comments?post=19695"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/posts\/19695\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/media\/61748"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/media?parent=19695"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/categories?post=19695"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/tags?post=19695"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}