{"id":2590,"date":"2020-04-06T21:51:28","date_gmt":"2020-04-06T13:51:28","guid":{"rendered":"http:\/\/www.yuguoxy.com\/geekhome\/?p=2590"},"modified":"2026-08-18T12:35:26","modified_gmt":"2026-08-18T04:35:26","slug":"vue-3-0-%e5%ad%a6%e4%b9%a0%e6%8e%a2%e7%b4%a2%e5%85%a5%e9%97%a8%e7%b3%bb%e5%88%97","status":"publish","type":"post","link":"https:\/\/ai.zhousir.top\/?p=2590","title":{"rendered":"VUE 3.0 \u5b66\u4e60\u63a2\u7d22\u5165\u95e8\u7cfb\u5217"},"content":{"rendered":"<section id=\"wenyan\" style=\"font-family: system-ui, 'Apple Color Emoji', 'Segoe UI', 'Segoe UI Symbol', 'Noto Sans', Roboto, sans-serif; line-height: 1.75; font-size: 16px; color: #000000; caret-color: #000000;\" data-provider=\"WenYan\">\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">VUE 3.0 \u5b66\u4e60\u63a2\u7d22\u5165\u95e8\u7cfb\u5217<\/strong>\u8ba1\u5212\u7528\u4e00\u4e2a\u6708\u628a Vue 3 \u6478\u4e00\u904d\uff08\u5f53\u65f6\u4e5f\u9884\u671f\u5feb Release \u4e86\uff09\u3002\u4ece 2019 \u5e74\u5c24\u96e8\u6eaa\u5728\u4f1a\u4e0a\u53cd\u590d\u8bb2 3.0 \u7279\u6027\uff0c\u5230\u5199\u7a3f\u65f6\u7684 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">2020.3.21<\/code>\uff0c\u7b49\u4e86\u4e00\u5e74\u591a\u8fd8\u6ca1\u6b63\u5f0f\u53d1\u5e03\uff0c\u70ed\u60c5\u5bb9\u6613\u8017\u5c3d\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u5199\u8fd9\u7ec4\u7cfb\u5217\uff0c\u662f\u60f3\u8d81\u8fd8\u5269\u4e00\u70b9\u5174\u8da3\uff0c\u5feb\u901f\u3001\u5168\u9762\u5730\u770b\u4e00\u773c <strong style=\"color: #4870ac;\">Vue 3.x<\/strong>\u3002\u7b49\u5b8c\u5168\u6ca1\u5174\u8da3\u4e86\u518d\u88ab\u8feb\u4e0a\u624b\uff0c\u5b83\u5c31\u53ea\u5269\u5de5\u5177\u5c5e\u6027\u3002\u672c\u6587\u5bf9\u5e94\u7cfb\u5217\u7b2c 5 \u7bc7\u7684\u6838\u5fc3\u5224\u65ad\uff1a<strong style=\"color: #4870ac;\">\u6709\u6ca1\u6709\u5fc5\u8981\u5347\u7ea7\u5230 Vue3.0\uff1f\u5982\u679c\u8981\u5347\u7ea7\uff0c\u8be5\u5982\u4f55\u5347\u7ea7\uff1f<\/strong><\/p>\n<p style=\"margin: 1em 0px;\">\u539f\u6587\u94fe\u63a5\uff1a<a href=\"https:\/\/juejin.im\/post\/5e67061de51d452713552a9f\" target=\"_blank\">https:\/\/juejin.im\/post\/5e67061de51d452713552a9f<\/a>\u3002<\/p>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u4e00\u3001\u7cfb\u5217\u76ee\u5f55<\/h2>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section><a href=\"https:\/\/juejin.im\/post\/5e67061de51d452713552a9f\">\u603b\u89c8\uff081\uff09<\/a><\/section>\n<\/li>\n<li>\n<section><a href=\"https:\/\/juejin.im\/post\/5e67737c6fb9a07cc845ba77\">\u56de\u987e vue2 \u8f89\u714c\u4e00\u751f\uff082\uff09<\/a><\/section>\n<\/li>\n<li>\n<section><a href=\"https:\/\/juejin.im\/post\/5e68ea6de51d4526d90d23f0\">\u7528\u51e0\u4e2a demo \u8ba4\u8bc6 vue3\uff083\uff09<\/a><\/section>\n<\/li>\n<li>\n<section><a href=\"https:\/\/juejin.im\/post\/5e6f210ae51d4526cd1e05c1\">vue2.x \/ React \/ vue3.x \u7b80\u5355\u6a2a\u8bc4\uff084\uff09<\/a><\/section>\n<\/li>\n<li>\n<section><a href=\"https:\/\/juejin.im\/post\/5e759e22e51d4534ec007ccb\">\u7ea0\u7ed3\u8981\u4e0d\u8981\u5347\u7ea7\u5230 Vue3.0\uff1f\u8be5\u5982\u4f55\u5347\u7ea7\uff1f\uff085\uff09<\/a><\/section>\n<\/li>\n<li>\n<section><a href=\"https:\/\/juejin.im\/post\/5e8010e26fb9a03c947cb98d\">\u751f\u547d\u5468\u671f\u548c Composition API \u6838\u5fc3\u8bed\u6cd5\uff086\uff09<\/a><\/section>\n<\/li>\n<li>\n<section><a href=\"https:\/\/juejin.im\/post\/5e8842aa5188257367220f6f\">Vue3.x \u4ee4\u4eba\u671f\u5f85\u7684\u65b0\u7279\u6027\uff087\uff09<\/a><\/section>\n<\/li>\n<\/ul>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u4e8c\u3001Vue2.x \u6ca1\u5fc5\u8981\u5347\u7ea7\uff0cVue3.x \u6709\u5fc5\u8981\u7528<\/h2>\n<p style=\"margin: 1em 0px;\">\u5148\u89e3\u91ca\u4e3a\u4ec0\u4e48<strong style=\"color: #4870ac;\">\u6ca1\u5fc5\u8981\u628a\u73b0\u6709 Vue2.x \u9879\u76ee\u76f4\u63a5\u5347\u7ea7<\/strong>\u3002\u5f53\u65f6\u770b\u6765\u771f\u6b63\u6709\u5438\u5f15\u529b\u7684\u53ea\u6709\u4e24\u70b9\uff0c\u800c\u4e14\u90fd\u8fd8\u6ca1\u5230\u300c\u4e0d\u5347\u7ea7\u5c31\u6d3b\u4e0d\u4e0b\u53bb\u300d\u7684\u7a0b\u5ea6\uff1a<\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u5bf9 <strong style=\"color: #4870ac;\">TypeScript<\/strong> \u66f4\u53cb\u597d\u3002Vue2.x \u91cc\u559c\u6b22 TS \u7684\u4eba\u5df2\u7ecf\u4e60\u60ef\u4e86\u88c5\u9970\u5668\u5199\u6cd5\uff0c\u867d\u7136\u8981\u989d\u5916\u5f15\u5305\uff0c\u4f46\u80fd\u7528\u3002\u793a\u4f8b\u89c1<a href=\"https:\/\/juejin.im\/post\/5e6f210ae51d4526cd1e05c1#heading-9\">\u6a2a\u8bc4\u6587<\/a>\u3002<\/section>\n<\/li>\n<li>\n<section>\u65b0\u589e <strong style=\"color: #4870ac;\">Composition API<\/strong>\uff0c\u4e14\u517c\u5bb9 2.x\uff1a\u5355\u72ec\u5f15\u5165 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">@vue\/composition-api<\/code> \u5c31\u80fd\u7f13\u89e3 2.x \u91cc\u90a3\u51e0\u5904\u96be\u9898\u3002\u8bf4\u660e\u89c1<a href=\"https:\/\/juejin.im\/post\/5e6f210ae51d4526cd1e05c1#heading-8\">\u4ec0\u4e48\u96be\u9898\uff1f<\/a>\u3002<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\">\u76f4\u63a5\u5347 3.x \u8981\u505a\u7684\u4e8b\u66f4\u591a\uff1a\u751f\u6001\u5e93\uff08<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">vue-router<\/code>\u3001<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">vuex<\/code>\u3001ElementUI \/ ViewUI \/ AntDesignVue\uff09\u8981\u91cd\u586b\u5751\uff1b3.x \u4e0d\u518d\u9ed8\u8ba4\u5bfc\u51fa\u90a3\u4e2a\u5168\u5c40\u5bf9\u8c61\uff0c\u9879\u76ee\u91cc\u6240\u6709 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">Vue.xxx<\/code> \u90fd\u5f97\u6539\uff0c\u6c89\u6dc0\u5728\u516c\u53f8\u5e95\u5c42\u5e93\u91cc\u7684\u5199\u6cd5\u98ce\u9669\u4e0d\u5c0f\uff1b\u6a2a\u5411\u5c0f\u7ec4\u7ef4\u62a4\u51e0\u5341\u4e2a\u9879\u76ee\uff0c\u6539\u4e00\u8f6e\u3001\u6d4b\u4e00\u8f6e\u5468\u671f\u5f88\u957f\uff1b\u6d4b\u8bd5\u811a\u672c\u3001CI\/CD \u4e5f\u53ef\u80fd\u8981\u52a8\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u518d\u89e3\u91ca\u4e3a\u4ec0\u4e48<strong style=\"color: #4870ac;\">Vue3.x \u4ecd\u7136\u503c\u5f97\u7528<\/strong>\uff1a\u517c\u5bb9 2.x \u7ea6 95% \u7279\u6027\uff0c\u4e0a\u624b\u5feb\u7684\u4f18\u70b9\u8fd8\u5728\uff1bTS \u66f4\u8d34\u884c\u4e1a\u8d8b\u52bf\uff1bComposition API \u53ef\u80fd\u5438\u5f15\u4e00\u90e8\u5206 React \u7528\u6237\uff1b\u751f\u6001\u76d8\u5b50\u5df2\u7ecf\u8db3\u591f\u5927\uff0c\u4e0d\u518d\u53ea\u662f\u300c\u4e2a\u4eba\u9879\u76ee\u300d\u3002<\/p>\n<table style=\"display: table; text-align: left; overflow: auto; border-collapse: collapse; margin: 1.4em auto; max-width: 100%; table-layout: fixed; overflow-wrap: break-word; word-break: break-all;\" width=\"800\">\n<thead>\n<tr>\n<th style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top; text-align: center; font-weight: bold; color: #4870ac; background: #f7f7f7;\">\u573a\u666f<\/th>\n<th style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top; text-align: center; font-weight: bold; color: #4870ac; background: #f7f7f7;\">\u5efa\u8bae<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u65b0\u56e2\u961f\u3001\u65b0\u9879\u76ee<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u6b63\u5f0f Release \u4e14\u751f\u6001\u8ddf\u4e0a\uff08\u7ea6\u534a\u5e74\uff09\u540e\u76f4\u63a5\u4e0a 3.x\uff0c\u5e76\u5b66\u4e60 TS<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u6210\u719f\u56e2\u961f\u3001\u5df2\u6709\u57fa\u5efa<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u5148 Vue2.x + @vue\/composition-api \u8fc7\u6e21\uff0c\u4e0d\u5efa\u8bae\u65ad\u5d16\u5347\u7ea7<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u6846\u67b6\u672c\u8eab<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u4e0d\u8981 2.x \u539f\u5730\u5347\u7ea7\uff0c\u65b0\u8d77\u7089\u7076\u7528 3.x \u505a\u5de5\u7a0b\u6a21\u677f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u4e09\u3001\u4e00\u4e2a\u56e2\u961f\u7684\u8fc7\u6e21\u6392\u671f<\/h2>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u534a\u5e74\u5185\u6309\u5175\u4e0d\u52a8\uff0c\u7ee7\u7eed Vue2.x\uff0c\u7b49 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">@vue\/composition-api<\/code> \u5230 v3.2.0 \u4ee5\u4e0a\u3002<\/section>\n<\/li>\n<li>\n<section>\u9879\u76ee\u6a21\u677f\u5148\u5347\u7ea7\u4e3a Vue2.x + Composition API\uff0c\u652f\u6301 3.x \u65b0\u8bed\u6cd5\uff0c\u5e76\u5236\u5b9a\u4f7f\u7528\u89c4\u8303\u3002<\/section>\n<\/li>\n<li>\n<section>\u4e00\u5e74\u540e\u57fa\u4e8e Vue3.x \u5168\u65b0\u642d\u5efa\u57fa\u7840\u6846\u67b6\uff08\u5168\u9762 TS\uff09\uff0c\u4e0d\u57fa\u4e8e\u8001\u6846\u67b6\u5347\u7ea7\uff0c\u540c\u65f6\u5199 3.x \u6a21\u677f\u89c4\u8303\u3002<\/section>\n<\/li>\n<li>\n<section>\u8001\u9879\u76ee\u7ee7\u7eed 2.x + composition-api \u7ef4\u62a4\u5230\u9000\u5f79\uff0c\u6216\u88ab\u65b0\u5de5\u7a0b\u66ff\u6362\u3002<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\">\u6280\u672f\u53d8\u9769\u5bf9\u81ea\u5df1\u4e5f\u662f\u9769\u547d\u3002\u4f5c\u8005\u7ecf\u5386\u8fc7 servlet \u2192 spring \u2192 spring mvc\uff0cjsp \u2192 jquery + bootstrap\uff0cjquery \u2192 avalon\uff08require.js + gulp\uff09\uff0cavalon \u2192 vue2.x\uff08webpack\uff09\u3002\u8fd8\u8bb0\u5f97 jQuery \u7684\u53e3\u53f7\uff1a<strong style=\"color: #4870ac;\">write less, do more<\/strong>\u3002\u5b98\u7f51\u8fd8\u5728\uff1a<a href=\"https:\/\/jquery.com\/\">https:\/\/jquery.com\/<\/a>\u3002<\/p>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u56db\u3001\u548c\u300cVue3 \u4e0e\u6211\u65e0\u5173\u300d\u8bf4\u4e24\u53e5<\/h2>\n<p style=\"margin: 1em 0px;\">\u6709\u4eba\u4f1a\u8bf4\uff1aVue2.x \u7528\u5f97\u597d\u597d\u7684\uff0c\u5e72\u561b\u5b66 3\u3001\u5347 3\uff1f\u8fd9\u79cd\u5fc3\u6001\u5e38\u89c1\u4e8e\u4e0d\u6c42\u4e0a\u8fdb\u3001\u628a\u5de5\u4f5c\u53ea\u5f53\u996d\u7897\u3001\u5f88\u5c11\u603b\u7ed3\u5206\u4eab\u3001\u4e60\u60ef Ctrl+C\/V \u7684\u4eba\u3002\u65b0\u6280\u672f\u5b58\u5728\u4e00\u5b9a\u6709\u5b83\u7684\u9053\u7406\uff1b\u4e0d\u80fd\u76f2\u76ee\u8ffd\u968f\uff0c\u4e5f\u4e0d\u80fd\u81ea\u6211\u5c01\u95ed\u3002\u5bf9 Vue3.x \u6216\u5176\u5b83\u65b0\u6280\u672f\uff0c\u5148\u4e86\u89e3\uff0c\u518d\u9009\u62e9\u3002<\/p>\n<blockquote style=\"display: block; font-size: 0.9em; border-left: 3px solid #4870ac; padding: 0.5em 1em; margin: 0px; background: #f6f8fa; color: #40464f;\">\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u4e00\u53e5\u8bdd\u603b\u7ed3\uff1a\u5b58\u91cf Vue2 \u9879\u76ee\u4e0d\u5fc5\u65ad\u5d16\u5347\u7ea7\uff0c\u7528 composition-api \u8fc7\u6e21\uff1b\u65b0\u9879\u76ee\u7b49\u751f\u6001\u8ddf\u4e0a\u540e\u76f4\u63a5\u4e0a Vue3\uff0c\u5e76\u65b0\u8d77\u5de5\u7a0b\u6a21\u677f\u800c\u4e0d\u662f\u539f\u5730\u7ffb\u65b0\u3002<\/strong><\/p>\n<\/blockquote>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>VUE 3.0 \u5b66\u4e60\u63a2\u7d22\u5165\u95e8\u7cfb\u5217\u8ba1\u5212\u7528\u4e00\u4e2a\u6708\u628a Vue 3 \u6478\u4e00\u904d\uff08\u5f53\u65f6\u4e5f\u9884\u671f\u5feb Release \u4e86\uff09\u3002\u4ece 2 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[106,105],"tags":[205,206],"_links":{"self":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/2590"}],"collection":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2590"}],"version-history":[{"count":3,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/2590\/revisions"}],"predecessor-version":[{"id":2593,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/2590\/revisions\/2593"}],"wp:attachment":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}