{"id":21609,"date":"2024-11-19T15:07:06","date_gmt":"2024-11-19T07:07:06","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21609\/"},"modified":"2024-11-19T15:07:06","modified_gmt":"2024-11-19T07:07:06","slug":"vscode%e5%a6%82%e4%bd%95%e8%bf%90%e8%a1%8cvue","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21609\/","title":{"rendered":"vscode\u5982\u4f55\u8fd0\u884cvue"},"content":{"rendered":"<blockquote><p>\n  \u5728 vscode \u4e2d\u8fd0\u884c vue \u9879\u76ee\u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a1. \u5b89\u88c5 vue cli\uff1b2. \u521b\u5efa vue \u9879\u76ee\uff1b3. \u5207\u6362\u5230\u9879\u76ee\u76ee\u5f55\uff1b4. \u5b89\u88c5\u9879\u76ee\u4f9d\u8d56\uff1b5. \u8fd0\u884c\u5f00\u53d1\u670d\u52a1\u5668\uff1b6. \u6253\u5f00\u6d4f\u89c8\u5668\u8bbf\u95ee http:\/\/localhost:8080\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/07\/2024060707002441467.jpg\" class=\"aligncenter\" title=\"vscode\u5982\u4f55\u8fd0\u884cvue\u63d2\u56fe\" alt=\"vscode\u5982\u4f55\u8fd0\u884cvue\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5728 VSCode \u4e2d\u8fd0\u884c Vue \u9879\u76ee<\/strong><\/p>\n<p><strong>\u5982\u4f55\u8fd0\u884c Vue \u9879\u76ee\uff1f<\/strong><\/p>\n<p>\u5728 VSCode \u4e2d\u8fd0\u884c Vue \u9879\u76ee\u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<p><strong>1. \u5b89\u88c5 Vue CLI\uff1a<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<pre>npm install -g @vue\/cli<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>2. \u521b\u5efa Vue \u9879\u76ee\uff1a<\/strong><\/p>\n<pre>vue create my-vue-project<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>3. \u5207\u6362\u5230\u9879\u76ee\u76ee\u5f55\uff1a<\/strong><\/p>\n<pre>cd my-vue-project<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>4. \u5b89\u88c5\u9879\u76ee\u4f9d\u8d56\uff1a<\/strong><\/p>\n<pre>npm install<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>5. \u8fd0\u884c\u5f00\u53d1\u670d\u52a1\u5668\uff1a<\/strong><\/p>\n<pre>npm run serve<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>6. \u6253\u5f00\u6d4f\u89c8\u5668\uff1a<\/strong><\/p>\n<p>\u5728\u6d4f\u89c8\u5668\u4e2d\u8bbf\u95ee http:\/\/localhost:8080\u3002<\/p>\n<p><strong>\u8be6\u7ec6\u6b65\u9aa4\uff1a<\/strong><\/p>\n<p><strong>1. \u5b89\u88c5 Vue CLI\uff1a<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>Vue CLI \u662f\u4e00\u4e2a Vue \u5b98\u65b9\u63d0\u4f9b\u7684\u811a\u624b\u67b6\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u5feb\u901f\u521b\u5efa\u548c\u7ba1\u7406 Vue \u9879\u76ee\u3002<\/p>\n<p><strong>2. \u521b\u5efa Vue \u9879\u76ee\uff1a<\/strong><\/p>\n<p>\u4f7f\u7528  create \u547d\u4ee4\u53ef\u4ee5\u5feb\u901f\u521b\u5efa\u4e00\u4e2a\u57fa\u4e8e Vue \u7684\u9879\u76ee\u3002\u5b83\u4f1a\u8be2\u95ee\u4e00\u4e9b\u6709\u5173\u9879\u76ee\u57fa\u672c\u4fe1\u606f\u7684\u95ee\u9898\uff0c\u5982\u9879\u76ee\u540d\u79f0\u548c\u7528\u4e8e\u6784\u5efa\u7684 UI \u6846\u67b6\u3002<\/p>\n<p><strong>3. \u5207\u6362\u5230\u9879\u76ee\u76ee\u5f55\uff1a<\/strong><\/p>\n<p>cd \u547d\u4ee4\u7528\u4e8e\u5207\u6362\u5230\u521a\u521b\u5efa\u7684\u9879\u76ee\u76ee\u5f55\u3002<\/p>\n<p><strong>4. \u5b89\u88c5\u9879\u76ee\u4f9d\u8d56\uff1a<\/strong><\/p>\n<p>npm install \u547d\u4ee4\u4f1a\u5b89\u88c5\u9879\u76ee\u6240\u9700\u7684\u4f9d\u8d56\u5305\u3002<\/p>\n<p><strong>5. \u8fd0\u884c\u5f00\u53d1\u670d\u52a1\u5668\uff1a<\/strong><\/p>\n<p>npm run serve \u547d\u4ee4\u4f1a\u542f\u52a8\u4e00\u4e2a\u5f00\u53d1\u670d\u52a1\u5668\uff0c\u7528\u4e8e\u8fd0\u884c Vue \u9879\u76ee\u3002\u8be5\u670d\u52a1\u5668\u4f1a\u76d1\u542c\u6587\u4ef6\u66f4\u6539\uff0c\u5e76\u81ea\u52a8\u66f4\u65b0\u6d4f\u89c8\u5668\u3002<\/p>\n<p><strong>6. \u6253\u5f00\u6d4f\u89c8\u5668\uff1a<\/strong><\/p>\n<p>\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165 http:\/\/localhost:8080\uff0c\u5c31\u53ef\u4ee5\u8bbf\u95ee\u6b63\u5728\u8fd0\u884c\u7684 Vue \u9879\u76ee\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u8fd0\u884c\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 vscode \u4e2d\u8fd0\u884c vue \u9879\u76ee\u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a1. \u5b89\u88c5 vue cli\uff1b2. \u521b\u5efa vue \u9879\u76ee\uff1b3. \u5207\u6362\u5230\u9879\u76ee\u76ee\u5f55\uff1b4. \u5b89\u88c5\u9879\u76ee\u4f9d\u8d56\uff1b5. \u8fd0\u884c\u5f00\u53d1\u670d\u52a1\u5668\uff1b6. \u6253\u5f00\u6d4f\u89c8\u5668\u8bbf\u95ee http:\/\/localhost:8080\u3002 \u5728 VSCode \u4e2d\u8fd0\u884c Vue \u9879\u76ee \u5982\u4f55\u8fd0\u884c Vue \u9879\u76ee\uff1f \u5728 VSCode \u4e2d\u8fd0\u884c Vue \u9879\u76ee\u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a 1. \u5b89\u88c5 Vue CLI\uff1a \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b npm install -g @vue\/cli \u767b\u5f55\u540e\u590d\u5236 2. \u521b\u5efa Vue \u9879\u76ee\uff1a vue create my-vue-project \u767b\u5f55\u540e\u590d\u5236 3. \u5207\u6362\u5230\u9879\u76ee\u76ee\u5f55\uff1a cd my-vue-project \u767b\u5f55\u540e\u590d\u5236 4. \u5b89\u88c5\u9879\u76ee\u4f9d\u8d56\uff1a npm [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-21609","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21609","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=21609"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21609\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21609"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}