{"id":21654,"date":"2024-11-19T16:03:40","date_gmt":"2024-11-19T08:03:40","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21654\/"},"modified":"2024-11-19T16:03:40","modified_gmt":"2024-11-19T08:03:40","slug":"vscode%e5%a6%82%e4%bd%95%e5%88%9b%e5%bb%bavue%e9%a1%b9%e7%9b%ae","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21654\/","title":{"rendered":"vscode\u5982\u4f55\u521b\u5efavue\u9879\u76ee"},"content":{"rendered":"<blockquote><p>\n  \u8981\u4f7f\u7528 vs code \u521b\u5efa vue \u9879\u76ee\uff0c\u8bf7\u4f9d\u6b21\u6267\u884c\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u5b89\u88c5 vue cli\uff0c\u521b\u5efa\u65b0\u6587\u4ef6\u5939\u5e76\u6253\u5f00\u7ec8\u7aef\uff0c\u8f93\u5165 cd \u547d\u4ee4\u8fdb\u5165\u6587\u4ef6\u5939\uff0c\u4f7f\u7528 vue create \u521b\u5efa\u9879\u76ee\uff0c\u9009\u62e9\u9884\u8bbe\uff0c\u7b49\u5f85\u4f9d\u8d56\u5b89\u88c5\u5b8c\u6210\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/25\/2024062503322621212.jpg\" class=\"aligncenter\" title=\"vscode\u5982\u4f55\u521b\u5efavue\u9879\u76ee\u63d2\u56fe\" alt=\"vscode\u5982\u4f55\u521b\u5efavue\u9879\u76ee\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u4f7f\u7528 VS Code \u521b\u5efa Vue \u9879\u76ee<\/strong><\/p>\n<p><strong>\u524d\u63d0\uff1a<\/strong><\/p>\n<ul>\n<li>\u5b89\u88c5 VSCode<\/li>\n<li>\u5b89\u88c5 Vue CLI\uff08\u5168\u5c40\u5b89\u88c5\uff09<\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa4\uff1a<\/strong><\/p>\n<ol>\n<li><strong>\u6253\u5f00 VSCode<\/strong><\/li>\n<li> <strong>\u521b\u5efa\u65b0\u6587\u4ef6\u5939<\/strong>\uff0c\u7528\u4e8e\u5b58\u653e Vue \u9879\u76ee<\/li>\n<li> <strong>\u6253\u5f00\u7ec8\u7aef<\/strong>\uff08\u5bf9\u4e8e Mac\/Linux \u7528\u6237\uff0c\u4f7f\u7528 Command + \uff1b\u5bf9\u4e8e Windows \u7528\u6237\uff0c\u4f7f\u7528 Ctrl + \uff09<\/li>\n<li> <strong>\u8fdb\u5165\u9879\u76ee\u6587\u4ef6\u5939<\/strong>\uff0c\u4f7f\u7528\u547d\u4ee4 cd [\u9879\u76ee\u6587\u4ef6\u5939\u540d\u79f0]<\/li>\n<li> <strong>\u521b\u5efa Vue \u9879\u76ee<\/strong>\uff0c\u4f7f\u7528\u547d\u4ee4  create [\u9879\u76ee\u540d\u79f0]<\/li>\n<li> <strong>\u9009\u62e9\u9ed8\u8ba4\u9884\u8bbe<\/strong>\u6216\u81ea\u5b9a\u4e49\u8bbe\u7f6e<\/li>\n<li><strong>\u7b49\u5f85\u9879\u76ee\u5b89\u88c5<\/strong><\/li>\n<\/ol>\n<p><strong>\u8be6\u7ec6\u5c55\u5f00\uff1a<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<ul>\n<li> <strong>\u5b89\u88c5 Vue CLI\uff1a<\/strong>\u4f7f\u7528\u547d\u4ee4 npm install -g @vue\/cli \u8fdb\u884c\u5168\u5c40\u5b89\u88c5\u3002<\/li>\n<li>\n<p><strong>\u521b\u5efa Vue \u9879\u76ee\uff1a<\/strong><\/p>\n<ul>\n<li>vue create \u547d\u4ee4\u5c06\u63d0\u793a\u60a8\u8f93\u5165\u9879\u76ee\u540d\u79f0\u3002<\/li>\n<li>\u9009\u62e9\u9ed8\u8ba4\u9884\u8bbe\uff0c\u5b83\u5305\u542b\u7528\u4e8e\u6784\u5efa\u548c\u5f00\u53d1 Vue \u5e94\u7528\u7a0b\u5e8f\u7684\u6807\u51c6\u8bbe\u7f6e\u3002<\/li>\n<li>\u6216\u8005\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u9ad8\u7ea7\u9009\u9879\u6765\u81ea\u5b9a\u4e49\u9879\u76ee\u7684\u8bbe\u7f6e\u3002<\/li>\n<\/ul>\n<\/li>\n<li> <strong>\u5b89\u88c5\u4f9d\u8d56\u9879\uff1a<\/strong>\u521b\u5efa\u9879\u76ee\u540e\uff0cVue CLI \u4f1a\u81ea\u52a8\u5b89\u88c5\u9879\u76ee\u6240\u9700\u7684\u4f9d\u8d56\u9879\u3002<\/li>\n<li> <strong>\u542f\u52a8\u5f00\u53d1\u670d\u52a1\u5668\uff1a<\/strong>\u4f7f\u7528\u547d\u4ee4 npm run serve \u542f\u52a8\u5f00\u53d1\u670d\u52a1\u5668\u3002\u5b83\u5c06\u8fd0\u884c\u5728 http:\/\/localhost:8080\u3002<\/li>\n<li> <strong>\u5728\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\u9879\u76ee\uff1a<\/strong>\u5728\u6d4f\u89c8\u5668\u4e2d\u5bfc\u822a\u5230 http:\/\/localhost:8080 \u67e5\u770b\u60a8\u7684 Vue \u9879\u76ee\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u521b\u5efa\u9879\u76ee\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>\u8981\u4f7f\u7528 vs code \u521b\u5efa vue \u9879\u76ee\uff0c\u8bf7\u4f9d\u6b21\u6267\u884c\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u5b89\u88c5 vue cli\uff0c\u521b\u5efa\u65b0\u6587\u4ef6\u5939\u5e76\u6253\u5f00\u7ec8\u7aef\uff0c\u8f93\u5165 cd \u547d\u4ee4\u8fdb\u5165\u6587\u4ef6\u5939\uff0c\u4f7f\u7528 vue create \u521b\u5efa\u9879\u76ee\uff0c\u9009\u62e9\u9884\u8bbe\uff0c\u7b49\u5f85\u4f9d\u8d56\u5b89\u88c5\u5b8c\u6210\u3002 \u5982\u4f55\u4f7f\u7528 VS Code \u521b\u5efa Vue \u9879\u76ee \u524d\u63d0\uff1a \u5b89\u88c5 VSCode \u5b89\u88c5 Vue CLI\uff08\u5168\u5c40\u5b89\u88c5\uff09 \u6b65\u9aa4\uff1a \u6253\u5f00 VSCode \u521b\u5efa\u65b0\u6587\u4ef6\u5939\uff0c\u7528\u4e8e\u5b58\u653e Vue \u9879\u76ee \u6253\u5f00\u7ec8\u7aef\uff08\u5bf9\u4e8e Mac\/Linux \u7528\u6237\uff0c\u4f7f\u7528 Command + \uff1b\u5bf9\u4e8e Windows \u7528\u6237\uff0c\u4f7f\u7528 Ctrl + \uff09 \u8fdb\u5165\u9879\u76ee\u6587\u4ef6\u5939\uff0c\u4f7f\u7528\u547d\u4ee4 cd [\u9879\u76ee\u6587\u4ef6\u5939\u540d\u79f0] \u521b\u5efa Vue \u9879\u76ee\uff0c\u4f7f\u7528\u547d\u4ee4 create [\u9879\u76ee\u540d\u79f0] \u9009\u62e9\u9ed8\u8ba4\u9884\u8bbe\u6216\u81ea\u5b9a\u4e49\u8bbe\u7f6e \u7b49\u5f85\u9879\u76ee\u5b89\u88c5 \u8be6\u7ec6\u5c55\u5f00\uff1a \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u5b89\u88c5 [&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-21654","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21654","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=21654"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21654\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}