{"id":1778,"date":"2023-09-19T16:19:32","date_gmt":"2023-09-19T08:19:32","guid":{"rendered":"https:\/\/white-night.club\/?p=1778"},"modified":"2023-11-09T11:07:53","modified_gmt":"2023-11-09T03:07:53","slug":"appdev9","status":"publish","type":"post","link":"https:\/\/white-night.club\/index.php\/2023\/09\/19\/appdev9\/","title":{"rendered":"\u547d\u4ee4\u884c\u521b\u5efaVue\u9879\u76ee\uff08Vite\uff09"},"content":{"rendered":"\n<p>\u987a\u4fbf\u8bb0\u5f55\u4e0b\u76f8\u5173\u7684\u547d\u4ee4\u884c\u6307\u4ee4\u3002<\/p>\n\n\n\n<div style=\"height:60px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<blockquote class=\"wp-block-quote has-luminous-vivid-amber-color has-text-color\">\n<p>\u521b\u5efaVue\u9879\u76ee<\/p>\n<cite><em>npm create vue@latest<\/em><\/cite><\/blockquote>\n\n\n\n<p>\u65b0\u5efa\u4e2a\u6587\u4ef6\u5939\uff0c\u5728\u8be5\u76ee\u5f55\u4e0b\u6253\u5f00cmd\u3002\u8f93\u5165<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>npm create vue@latest<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u5c31\u662f\u8f93\u5165\u9879\u76ee\u540d\u548c\u5305\u540d\u3002\u8fd9\u91cc\u76f4\u63a5\u7528\u5b98\u7f51\u7684\u793a\u4f8b\u4e86\u3002\u4e0d\u786e\u5b9a\u8981\u4e0d\u8981\u5f00\u542f\u8fd9\u4e9b\u529f\u80fd\u7684\u8bdd\u76f4\u63a5\u4e00\u8def\u56de\u8f66\u8fc7\u53bb\u5c31\u884c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2714 Project name: \u2026 &lt;your-project-name>\r\n\u2714 Add TypeScript? \u2026 No \/ Yes\r\n\u2714 Add JSX Support? \u2026 No \/ Yes\r\n\u2714 Add Vue Router for Single Page Application development? \u2026 No \/ Yes\r\n\u2714 Add Pinia for state management? \u2026 No \/ Yes\r\n\u2714 Add Vitest for Unit testing? \u2026 No \/ Yes\r\n\u2714 Add an End-to-End Testing Solution? \u2026 No \/ Cypress \/ Playwright\r\n\u2714 Add ESLint for code quality? \u2026 No \/ Yes\r\n\u2714 Add Prettier for code formatting? \u2026 No \/ Yes\r\n\r\nScaffolding project in .\/&lt;your-project-name>...\r\nDone.<\/code><\/pre>\n\n\n\n<p>\u521b\u5efa\u5b8c\u4e4b\u540e\u4f1a\u63d0\u793a\u4f60\u8f93\u5165\u4ee5\u4e0b\u4ee3\u7801\uff0c\u7167\u7740\u8f93\u5165\u5373\u53ef\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>> cd &lt;your-project-name>\r\n> npm install\r\n> npm run dev<\/code><\/pre>\n\n\n\n<p>\u4e0d\u8fc7\u8fd9\u91cc\u8981\u89e3\u91ca\u4e00\u4e0b\u540e\u9762\u4e24\u6761\u4ee3\u7801\u662f\u5e72\u5565\u7684\u3002\u6709\u4eba\u53ef\u80fd\u5728\u60f3\uff1a\u6211\u4e0d\u662f\u5df2\u7ecf\u521b\u5efa\u4e86vue\u9879\u76ee\u5417\uff0c\u4e3a\u4ec0\u4e48\u8fd8\u8981npm\uff1f<\/p>\n\n\n\n<ul>\n<li><em>npm install<\/em>\uff1a\u5b83\u4f1a\u6839\u636e\u4f60\u7684package.json\u53bb\u83b7\u53d6\u76f8\u5173\u7684\u4f9d\u8d56\u5305\u5e76\u81ea\u52a8\u4e0b\u8f7d\u3002\u6bd4\u5982\u4f60\u5728\u4e0a\u9762\u5982\u679c\u9009\u62e9\u8981\u5b89\u88c5Pinia\uff0c\u90a3\u5b83\u5c31\u4f1a\u81ea\u52a8\u83b7\u53d6Pinia\u5305\u3002\u633a\u597d\u7406\u89e3\u7684\u3002<\/li>\n\n\n\n<li><em>npm run dev<\/em>\uff1a\u8fd9\u4e2a\u6bd4\u8f83\u6709\u610f\u601d\u3002\u5b83\u4f1a\u521b\u5efa\u4e00\u4e2a\u672c\u5730\u7684\u5f00\u53d1\u670d\u52a1\u5668\u3002\u5373\u5f00\u653e\u4f60\u672c\u5730\u7684\u4e00\u4e2a\u7aef\u53e3\u4f9b\u7f51\u9875\u8fdb\u884c\u6d4b\u8bd5\u3002\u6bd4\u5982\u6253\u5f008080\u7aef\u53e3\u7684\u8bdd\uff0c\u5728\u6d4f\u89c8\u5668\u8f93\u5165localhost:8080\u5c31\u4f1a\u8df3\u8f6c\u5230\u4f60\u7684vue\u9875\u9762\u3002\u65b9\u4fbf\u4f60\u8fdb\u884c\u6d4b\u8bd5\u3002\uff08\u6bd5\u7adfvue\u662f\u54cd\u5e94\u5f0f\u7684\uff09<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>npm create vue@latest<\/p>\n","protected":false},"author":1,"featured_media":6608,"comment_status":"open","ping_status":"","sticky":false,"template":"base","format":"standard","meta":{"footnotes":""},"categories":[72,51],"tags":[73,54],"_links":{"self":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/posts\/1778"}],"collection":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/comments?post=1778"}],"version-history":[{"count":0,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/posts\/1778\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/media\/6608"}],"wp:attachment":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/media?parent=1778"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/categories?post=1778"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/tags?post=1778"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}