{"id":21334,"date":"2024-11-19T10:33:04","date_gmt":"2024-11-19T02:33:04","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21334\/"},"modified":"2024-11-19T10:33:04","modified_gmt":"2024-11-19T02:33:04","slug":"vscode%e6%80%8e%e4%b9%88%e6%89%93%e5%bc%80vue%e9%a1%b9%e7%9b%ae","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21334\/","title":{"rendered":"vscode\u600e\u4e48\u6253\u5f00vue\u9879\u76ee"},"content":{"rendered":"<blockquote><p>\n  \u5728 vscode \u4e2d\u6253\u5f00 vue \u9879\u76ee\uff0c\u9700\u8981\u6267\u884c\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u5b89\u88c5 vue cli\u3002\u521b\u5efa vue \u9879\u76ee\u3002\u6253\u5f00\u9879\u76ee\u6839\u76ee\u5f55\u3002\u5b89\u88c5 vscode vue \u6269\u5c55\u3002\u542f\u7528 vetur \u6269\u5c55\u3002\u901a\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\uff0cvscode \u5c06\u4e3a vue \u6587\u4ef6\u63d0\u4f9b intellisense \u548c\u8bed\u6cd5\u9ad8\u4eae\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/27\/2024052710361919783.jpg\" class=\"aligncenter\" title=\"vscode\u600e\u4e48\u6253\u5f00vue\u9879\u76ee\u63d2\u56fe\" alt=\"vscode\u600e\u4e48\u6253\u5f00vue\u9879\u76ee\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 VSCode \u4e2d\u6253\u5f00 Vue \u9879\u76ee<\/strong><\/p>\n<p>\u8981\u4f7f\u7528 VSCode \u6253\u5f00 Vue \u9879\u76ee\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n<ol>\n<li> <strong>\u5b89\u88c5 Vue CLI\uff1a<\/strong>\u4f7f\u7528 npm \u6216 yarn \u5b89\u88c5 Vue CLI\u3002<\/li>\n<li> <strong>\u521b\u5efa Vue \u9879\u76ee\uff1a<\/strong>\u4f7f\u7528 Vue CLI \u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Vue \u9879\u76ee\u3002<\/li>\n<li> <strong>\u6253\u5f00\u9879\u76ee\uff1a<\/strong>\u5728 VSCode \u4e2d\u6253\u5f00\u9879\u76ee\u7684\u6839\u76ee\u5f55\u3002<\/li>\n<li> <strong>\u5b89\u88c5 VSCode Vue \u6269\u5c55\uff1a<\/strong>\u4ece VSCode Marketplace \u5b89\u88c5 VSCode Vue \u6269\u5c55\u3002<\/li>\n<li> <strong>\u542f\u7528 Vetur \u6269\u5c55\uff1a<\/strong>\u5728 VSCode \u8bbe\u7f6e\u4e2d\u542f\u7528 Vetur \u6269\u5c55\uff0c\u5b83\u63d0\u4f9b\u4e86 Vue \u7279\u5b9a\u7684\u529f\u80fd\u3002<\/li>\n<li> <strong>\u4f7f\u7528 IntelliSense\uff1a<\/strong>VSCode \u73b0\u5728\u5c06\u4e3a Vue \u6587\u4ef6\u63d0\u4f9b IntelliSense \u548c\u8bed\u6cd5\u9ad8\u4eae\u3002<\/li>\n<\/ol>\n<p><strong>\u8be6\u7ec6\u4fe1\u606f\uff1a<\/strong><\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5 Vue CLI\uff1a<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<ul>\n<li>\u4f7f\u7528 npm\uff1anpm install -g @\/cli<\/li>\n<li>\u4f7f\u7528 yarn\uff1ayarn global add @vue\/cli<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u521b\u5efa Vue \u9879\u76ee\uff1a<\/strong><\/p>\n<ul>\n<li>\u4f7f\u7528 npm\uff1avue create my-vue-project<\/li>\n<li>\u4f7f\u7528 yarn\uff1avue create my-vue-project &#8211;use-yarn<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u6253\u5f00\u9879\u76ee\uff1a<\/strong><\/p>\n<ul>\n<li>\u6d4f\u89c8\u5230\u9879\u76ee\u7684\u6839\u76ee\u5f55\uff0c\u901a\u5e38\u5305\u542b package.json \u548c src \u6587\u4ef6\u5939\u3002<\/li>\n<li>\u5728 VSCode \u4e2d\uff0c\u5355\u51fb\u201c\u6587\u4ef6\u201d&gt;\u201c\u6253\u5f00\u6587\u4ef6\u5939\u201d\u5e76\u9009\u62e9\u9879\u76ee\u7684\u6839\u76ee\u5f55\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5 VSCode Vue \u6269\u5c55\uff1a<\/strong><\/p>\n<ul>\n<li>\u5728 VSCode Marketplace \u4e2d\u641c\u7d22\u201cVSCode Vue\u201d\uff0c\u7136\u540e\u5355\u51fb\u201c\u5b89\u88c5\u201d\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u542f\u7528 Vetur \u6269\u5c55\uff1a<\/strong><\/p>\n<ul>\n<li>\u8f6c\u5230 VSCode \u8bbe\u7f6e\uff08Ctrl\/Cmd + ,\uff09\uff0c\u641c\u7d22\u201cVetur\u201d\uff0c\u7136\u540e\u5c06\u5176\u542f\u7528\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528 IntelliSense\uff1a<\/strong><\/p>\n<ul>\n<li>\u5728 Vue \u6587\u4ef6\u4e2d\u7f16\u8f91\u65f6\uff0cVSCode \u5c06\u63d0\u4f9b IntelliSense \u548c\u8bed\u6cd5\u9ad8\u4eae\uff0c\u4ee5\u5e2e\u52a9\u60a8\u7f16\u5199 Vue \u4ee3\u7801\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u6253\u5f00\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>\u5728 vscode \u4e2d\u6253\u5f00 vue \u9879\u76ee\uff0c\u9700\u8981\u6267\u884c\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u5b89\u88c5 vue cli\u3002\u521b\u5efa vue \u9879\u76ee\u3002\u6253\u5f00\u9879\u76ee\u6839\u76ee\u5f55\u3002\u5b89\u88c5 vscode vue \u6269\u5c55\u3002\u542f\u7528 vetur \u6269\u5c55\u3002\u901a\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\uff0cvscode \u5c06\u4e3a vue \u6587\u4ef6\u63d0\u4f9b intellisense \u548c\u8bed\u6cd5\u9ad8\u4eae\u3002 \u5982\u4f55\u5728 VSCode \u4e2d\u6253\u5f00 Vue \u9879\u76ee \u8981\u4f7f\u7528 VSCode \u6253\u5f00 Vue \u9879\u76ee\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a \u5b89\u88c5 Vue CLI\uff1a\u4f7f\u7528 npm \u6216 yarn \u5b89\u88c5 Vue CLI\u3002 \u521b\u5efa Vue \u9879\u76ee\uff1a\u4f7f\u7528 Vue CLI \u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Vue \u9879\u76ee\u3002 \u6253\u5f00\u9879\u76ee\uff1a\u5728 VSCode \u4e2d\u6253\u5f00\u9879\u76ee\u7684\u6839\u76ee\u5f55\u3002 \u5b89\u88c5 VSCode Vue \u6269\u5c55\uff1a\u4ece VSCode Marketplace [&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-21334","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21334","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=21334"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21334\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}