{"id":2311,"date":"2018-12-12T14:58:23","date_gmt":"2018-12-12T06:58:23","guid":{"rendered":"https:\/\/ai.zhousir.top\/?p=2311"},"modified":"2026-08-18T12:35:21","modified_gmt":"2026-08-18T04:35:21","slug":"%e5%89%8d%e7%ab%af%e6%a1%86%e6%9e%b6-vue-js-%e5%85%a8%e9%9d%a2%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/ai.zhousir.top\/?p=2311","title":{"rendered":"\u524d\u7aef\u6846\u67b6 Vue.js \u5168\u9762\u4ecb\u7ecd"},"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;\">Vue.js \u662f\u4e00\u4e2a JavaScript MVVM \u5e93\uff0c\u4e5f\u662f\u4e00\u5957\u6784\u5efa\u7528\u6237\u754c\u9762\u7684\u6e10\u8fdb\u5f0f\u6846\u67b6\u3002\u5b98\u7f51\uff1ahttps:\/\/cn.vuejs.org\/\u3002\u5b83\u4ee5\u6570\u636e\u9a71\u52a8\u548c\u7ec4\u4ef6\u5316\u601d\u60f3\u6784\u5efa\uff0c\u91c7\u7528\u81ea\u5e95\u5411\u4e0a\u589e\u91cf\u5f00\u53d1\u3002<\/p>\n<p style=\"margin: 1em 0px;\">2016 \u5e74\u5f88\u706b\u7684\u524d\u7aef\u6846\u67b6\u5f53\u5c5e Vue\u3002\u4e0d\u5c11\u7528\u8fc7\u7684\u4eba\u8bc4\u4ef7\u5b83\u201c\u517c\u5177 Angular.js \u548c React.js \u7684\u4f18\u70b9\uff0c\u5e76\u5254\u9664\u4e86\u5b83\u4eec\u7684\u7f3a\u70b9\u201d\u3002\u4f5c\u8005\u662f\u534e\u4eba\u5c24\u96e8\u6eaa\uff08Evan You\uff09\u3002\u76f8\u5bf9 Angular.js\uff0cVue \u7684 API \u66f4\u77ed\u3001\u66f4\u597d\u61c2\uff0c\u4e0a\u624b\u66f4\u5feb\u3002<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/vue_01.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2332\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/vue_01.png\" alt=\"vue_01\" width=\"845\" height=\"415\"><\/a><\/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\u8c03\u8bd5\u63d2\u4ef6\u4e0e UI \u7ec4\u4ef6\u5e93<\/h2>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">Vue Devtools<\/h3>\n<p style=\"margin: 1em 0px;\">\u8c03\u8bd5\u53ef\u4ee5\u88c5 Chrome \u63d2\u4ef6 Vue Devtools\u3002\u6253\u5f00 Vue \u9879\u76ee\u540e\uff0c\u5728\u63a7\u5236\u53f0\u5207\u5230 Vue \u9762\u677f\uff1a\u9009\u7ec4\u4ef6\u770b\u7ec4\u4ef6\u5185\u6570\u636e\uff0c\u4e5f\u53ef\u4ee5\u5207 Vuex \u770b\u72b6\u6001\u53d8\u91cf\u3002<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u7629773312688314539fm173sC1F10C728D2275221ECD41DE0000C0B2w640h267img.jpeg\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2313\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u7629773312688314539fm173sC1F10C728D2275221ECD41DE0000C0B2w640h267img.jpeg\" alt=\"\" width=\"640\" height=\"267\"><\/a><\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">Element \u7b49 UI \u5e93<\/h3>\n<p style=\"margin: 1em 0px;\">\u4e2a\u4eba\u4e0d\u63a8\u8350\u4e00\u4e0a\u6765\u5c31\u7528 UI \u7ec4\u4ef6\u5e93\uff0c\u81ea\u5df1\u9020\u8f6e\u5b50\u66f4\u6709\u6210\u5c31\u611f\u3002\u5982\u679c\u66f4\u770b\u91cd\u6548\u7387\uff0c\u5e76\u4e14\u9009\u4e86 Vue 2.0\uff0c\u997f\u4e86\u4e48\u7684 Element \u662f\u5f53\u65f6\u5f88\u7a33\u7684\u9009\u62e9\u3002GitHub\uff1ahttps:\/\/github.com\/ElemeFE\/element\uff0c\u66f4\u65b0\u9891\u7e41\uff0c\u867d\u5076\u6709\u4e0d\u7a33\u5b9a\uff0c\u4f46\u53e3\u53f7\u5c31\u662f\u201c\u5feb\u901f\u6210\u578b\uff0c\u5c31\u4e3a\u8ba9\u4f60\u5c11\u52a0\u73ed\u201d\u3002<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u21125812552225876736fm173sA803F41442CDB909EF4319DC0300C0B8w640h338img.jpeg\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2314\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u21125812552225876736fm173sA803F41442CDB909EF4319DC0300C0B8w640h338img.jpeg\" alt=\"\" width=\"640\" height=\"338\"><\/a><\/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;\">\u4e8c\u3001Vue\u3001React\u3001Angular 1 \u5bf9\u6bd4<\/h2>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u6027\u80fd<\/h3>\n<p style=\"margin: 1em 0px;\">Angular 1 \u5728 scope \u91cc\u6bcf\u6b21\u6570\u636e\u53d8\u5316\u90fd\u4f1a\u89e6\u53d1 watcher \u91cd\u7b97\u3002\u5b83\u5bf9\u5e38\u7528 DOM \u4e8b\u4ef6\u3001XHR \u505a\u4e86\u5c01\u88c5\uff0c\u8fdb\u5165 digest\uff1a\u4ece rootScope \u904d\u5386\u68c0\u67e5\u6240\u6709 watcher\u3002\u82e5\u67d0\u4e2a watcher \u53c8\u89e6\u53d1\u66f4\u65b0\uff0c\u810f\u68c0\u67e5\u5faa\u73af\u53ef\u80fd\u8dd1\u591a\u6b21\u3002Vue \u7528\u57fa\u4e8e\u4f9d\u8d56\u8ffd\u8e2a\u7684\u89c2\u5bdf\u7cfb\u7edf\u52a0\u5f02\u6b65\u961f\u5217\u66f4\u65b0\uff0c\u6570\u636e\u53d8\u5316\u72ec\u7acb\u89e6\u53d1\uff0c\u9664\u975e\u6570\u636e\u4e4b\u95f4\u6709\u660e\u786e\u4f9d\u8d56\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u5b98\u65b9\u5ba3\u79f0\u6e32\u67d3\u6027\u80fd\u4f18\u4e8e React\uff0c\u5e76\u505a\u4e86\u6e32\u67d3 10000 \u4e2a\u5217\u8868\u9879 100 \u6b21\u7684\u5bf9\u6bd4\u9879\u76ee\uff1ahttps:\/\/github.com\/chrisvfritz\/vue-render-performance-comparisons\u3002\u6bcf\u4e2a\u53c2\u7167\u8dd1 20 \u6b21\u53d6\u6700\u597d\u7ed3\u679c\uff1a<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u39858141811645799370fm173s8595A87CD527570F8AEC245A020010FEw321h328img.jpeg\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2315\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u39858141811645799370fm173s8595A87CD527570F8AEC245A020010FEw321h328img.jpeg\" alt=\"\" width=\"321\" height=\"328\"><\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u53ef\u89c1 Vue \u8fdc\u597d\u4e8e Angular 1\uff0c\u5e76\u7565\u4f18\u4e8e React\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u793e\u533a\u4e0e\u751f\u6001<\/h3>\n<p style=\"margin: 1em 0px;\">Angular 1 \u80cc\u540e\u662f Google\uff0cTutorial \u5230 Stack Overflow \u90fd\u5b8c\u6574\u3002\u4f46 2.0 \u51e0\u4e4e\u63a8\u7ffb\u91cd\u505a\uff0c1.x \u9879\u76ee\u5f88\u96be\u5e73\u6ed1\u5347\u7ea7\uff0c\u5f53\u65f6\u7ebf\u4e0a\u4ecd\u4ee5 1.x \u5c45\u591a\uff0c\u7248\u672c\u9e3f\u6c9f\u5f71\u54cd\u4fe1\u5fc3\u3002<\/p>\n<p style=\"margin: 1em 0px;\">Vue \u548c React \u90fd\u6709\u5f3a\u793e\u533a\u3002React \u6709 Flux\u3001Redux\uff1bVue \u6709 Vuex\u3002\u4e24\u8005\u90fd\u6709\u8def\u7531\u5e93\u5e94\u5bf9\u5927\u578b\u5e94\u7528\u3002<strong style=\"color: #4870ac;\">Vue \u7684\u8def\u7531\u548c\u72b6\u6001\u5e93\u7531\u5b98\u65b9\u7ef4\u62a4<\/strong>\uff1bReact \u628a\u8fd9\u4e9b\u95ee\u9898\u4ea4\u7ed9\u793e\u533a\uff0c\u751f\u6001\u66f4\u5206\u6563\u4e5f\u66f4\u7e41\u8363\u3002Vue \u8fd8\u63d0\u4f9b vue-cli\uff0c\u5e26\u7740 Webpack\u3001Browserify \u751a\u81f3\u8def\u7531\uff0c\u642d\u9879\u76ee\u5f88\u5bb9\u6613\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u5b66\u4e60\u66f2\u7ebf<\/h3>\n<p style=\"margin: 1em 0px;\">Vue \u628a\u6307\u4ee4\u548c\u7ec4\u4ef6\u5206\u5f97\u66f4\u6e05\uff1a\u6307\u4ee4\u53ea\u5c01\u88c5 DOM \u64cd\u4f5c\uff0c\u7ec4\u4ef6\u662f\u81ea\u7ed9\u81ea\u8db3\u7684\u89c6\u56fe\u52a0\u6570\u636e\u903b\u8f91\u3002Angular 1 \u91cc\u4e24\u8005\u5e38\u6df7\u5728\u4e00\u8d77\uff0cAPI \u4e5f\u66f4\u590d\u6742\u3002\u4e2a\u4eba\u611f\u89c9 Angular 1 \u548c React \u66f4\u9661\uff0cVue \u66f4\u63a5\u8fd1\u524d\u7aef\u4e60\u60ef\u3002\u4f5c\u8005\u662f\u4e2d\u56fd\u4eba\uff0c\u4e2d\u6587\u5b98\u7f51\u3001\u6559\u7a0b\u548c\u8fc1\u79fb\u8bf4\u660e\u90fd\u5f88\u5168\uff0c\u751a\u81f3\u6709\u8fc1\u79fb\u5de5\u5177\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u7528\u6cd5\u4e5f\u5f88\u7b80\u5355\uff1a\u672c\u5730\u5efa\u4e00\u4e2a .html\uff0c\u5f15\u5165 Vue\uff0c\u5c31\u80fd\u5199 Hello World\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u539f\u751f\u6e32\u67d3\uff1aReact Native \u4e0e Weex<\/h3>\n<p style=\"margin: 1em 0px;\">React Native \u80fd\u7528\u540c\u4e00\u5957\u7ec4\u4ef6\u6a21\u578b\u5199 iOS \/ Android \u539f\u751f\u6e32\u67d3\u30022016 \u5e74 9 \u6708 JSConf \u671f\u95f4\uff0c\u5c24\u96e8\u6eaa\u5ba3\u5e03\u52a0\u76df Weex \u4efb\u6280\u672f\u987e\u95ee\u3002Weex \u662f\u963f\u91cc\u7684\u8de8\u5e73\u53f0 UI \u6846\u67b6\uff0cJS \u8fd0\u884c\u65f6\u5c31\u662f Vue\uff0c\u4e8e\u662f Vue \u8bed\u6cd5\u5199\u7684\u7ec4\u4ef6\u4e0d\u4f46\u80fd\u8dd1\u5728\u6d4f\u89c8\u5668\uff0c\u8fd8\u80fd\u505a iOS \/ Android \u539f\u751f\u5e94\u7528\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u5c24\u96e8\u6eaa\u539f\u8bdd\u5927\u610f\uff1aWeex \u9009 Vue \u505a\u8fd0\u884c\u65f6\u8ba9\u4ed6\u5f88\u9ad8\u5174\uff1b\u628a Vue \u5f00\u53d1\u4f53\u9a8c\u6269\u5230\u539f\u751f\u662f\u4ed6\u4e00\u76f4\u60f3\u505a\u5374\u6ca1\u4f59\u529b\u7684\u4e8b\uff1b\u60f3\u5230\u80fd\u7528 Vue \u8bed\u6cd5\u5199 Web \/ Android \/ iOS \u4e09\u7aef\u901a\u7528\u7ec4\u4ef6\u5c31\u5f88\u5174\u594b\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u5f53\u65f6\u7684\u77ed\u677f<\/h3>\n<p style=\"margin: 1em 0px;\">\u518d\u706b\u4e5f\u6709\u7f3a\u70b9\uff1a\u76f8\u5bf9 Angular\u3001React\uff0c\u6210\u719f\u5ea6\u548c\u793e\u533a\u6d3b\u8dc3\u5ea6\u8fd8\u4e0d\u662f\u5bf9\u624b\uff1b\u660e\u786e\u653e\u5f03 IE8\u3002\u62db\u8058\u91cc\u5199 Angular \u7ecf\u9a8c\u7684\u4ecd\u591a\u4e8e Vue\uff0c\u5f71\u54cd\u529b\u5f53\u65f6\u8fd8\u5dee\u4e00\u622a\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;\">\u4e09\u3001\u5168\u5bb6\u6876\u4e0e\u5de5\u7a0b\u76ee\u5f55<\/h2>\n<p style=\"margin: 1em 0px;\">\u8457\u540d\u5168\u5bb6\u6876\uff1avue-router\uff08http:\/\/router.vuejs.org\uff09\u3001vuex\uff08http:\/\/vuex.vuejs.org\uff09\u3001vue-resource\uff08https:\/\/github.com\/pagekit\/vue-resource\uff09\u3002\u52a0\u4e0a vue-cli\uff0c\u5c31\u662f\u9879\u76ee\u6838\u5fc3\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">vue-router<\/h3>\n<p style=\"margin: 1em 0px;\">\u63a8\u8350 npm \u5b89\u88c5\uff1a<\/p>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">npm install vue-router<\/code><\/pre>\n<p style=\"margin: 1em 0px;\">import Vue\u3001Router \u548c\u9875\u9762\u7ec4\u4ef6\uff08\u672c\u4f8b Goods\u3001Ratings\u3001Seller\uff09\uff0c\u6a21\u5757\u5316\u5de5\u7a0b\u91cc\u5fc5\u987b <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.use(Router)<\/code>\uff0c\u5426\u5219\u4f1a undefined\u3002<\/p>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">import Vue from 'vue'\nimport Router from 'vue-router'\nimport Goods from '@\/components\/goods\/goods'\nimport Ratings from '@\/components\/ratings\/ratings'\nimport Seller from '@\/components\/seller\/seller'\nVue.use(Router) \/\/ \u9700\u8981 import Vue \u548c Router\uff0c\u4e0d\u7136\u4f1a\u62a5\u9519 undefined<\/code><\/pre>\n<p style=\"margin: 1em 0px;\">\u7528 <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;\">new VueRouter()<\/code> \u4f20\u5165 path \u548c components\uff1b\u521b\u5efa\u6839\u5b9e\u4f8b\u65f6\u901a\u8fc7 <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;\">router<\/code> \u6ce8\u5165\uff0c\u6574\u4e2a\u5e94\u7528\u624d\u6709\u8def\u7531\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">Vuex \u72b6\u6001\u7ba1\u7406<\/h3>\n<p style=\"margin: 1em 0px;\">Vuex \u662f\u4e13\u4e3a Vue \u5e94\u7528\u7684\u72b6\u6001\u7ba1\u7406\u6a21\u5f0f\uff1a\u96c6\u4e2d\u5b58\u50a8\u6240\u6709\u7ec4\u4ef6\u72b6\u6001\uff0c\u6309\u89c4\u5219\u53ef\u9884\u6d4b\u5730\u53d8\u5316\u3002\u5df2\u96c6\u6210\u8fdb Vue Devtools\uff0c\u72b6\u6001\u53d8\u5316\u80fd\u76f4\u63a5\u770b\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u9879\u76ee\u4e00\u5927\uff0c\u591a\u4e2a\u7236\u7ec4\u4ef6\u5404\u5e26\u4e00\u5806\u5b50\u7ec4\u4ef6\u65f6\uff0c\u4e8b\u4ef6\u4ece\u54ea\u6d3e\u3001\u8be5\u542c\u8c01\uff0c\u7236\u7ec4\u4ef6\u4f1a\u548c\u5b50\u7ec4\u4ef6\u8026\u6b7b\uff0c\u903b\u8f91\u6563\u843d\u96be\u7ef4\u62a4\u3002\u8fd9\u5c31\u662f Vuex \u8981\u89e3\u51b3\u7684\u95ee\u9898\u3002\u56db\u4e2a\u6838\u5fc3\u6982\u5ff5\uff1a<\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section><strong style=\"color: #4870ac;\">The state tree<\/strong>\uff1a\u5355\u4e00\u72b6\u6001\u6811\uff0c\u4e00\u4e2a\u5bf9\u8c61\u5305\u542b\u5168\u90e8\u5e94\u7528\u7ea7\u72b6\u6001\uff0c\u4f5c\u4e3a\u552f\u4e00\u6570\u636e\u6e90 SSOT\uff0c\u6bcf\u5e94\u7528\u4e00\u4e2a store\u3002\u8c03\u8bd5\u65f6\u80fd\u7ed9\u6574\u4e2a\u72b6\u6001\u505a\u5feb\u7167\u3002<\/section>\n<\/li>\n<li>\n<section><strong style=\"color: #4870ac;\">Getters<\/strong>\uff1a\u4ece store \u53d6\u7ec4\u4ef6\u8981\u7528\u7684\u6570\u636e\u3002<\/section>\n<\/li>\n<li>\n<section><strong style=\"color: #4870ac;\">Mutations<\/strong>\uff1a\u4e8b\u4ef6\u5904\u7406\u5668\uff0c\u9a71\u52a8\u72b6\u6001\u53d8\u5316\uff08\u539f\u6587\u5199\u6210 Mutators\uff09\u3002<\/section>\n<\/li>\n<li>\n<section><strong style=\"color: #4870ac;\">Actions<\/strong>\uff1a\u7ed9\u7ec4\u4ef6\u8c03\u7528\u7684\u51fd\u6570\uff0c\u53bb\u63d0\u4ea4 mutations\u3002<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\">\u548c\u666e\u901a\u5168\u5c40\u5bf9\u8c61\u4e0d\u540c\uff1a\u4ece store \u8bfb\u5230\u7684\u72b6\u6001\u53d8\u4e86\uff0c\u5bf9\u5e94\u7ec4\u4ef6\u4f1a\u9ad8\u6548\u66f4\u65b0\uff1b\u6539\u72b6\u6001\u7684\u552f\u4e00\u9014\u5f84\u662f <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;\">store.commit<\/code> mutations\uff0c\u6bcf\u6b21\u53d8\u5316\u90fd\u7559\u75d5\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u6700\u7b80\u5355\u7684\u4f8b\u5b50\uff1a<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u19139133261467693852fm173s1D2874324B636D244AF584DA0000C0B2w640h246img.jpeg\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2316\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u19139133261467693852fm173s1D2874324B636D244AF584DA0000C0B2w640h246img.jpeg\" alt=\"\" width=\"640\" height=\"246\"><\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u5b89\u88c5\u540e\u521b\u5efa\u4e00\u4e2a store\uff0c\u63d0\u4f9b\u521d\u59cb state \u548c\u4e00\u4e9b mutations\uff0c\u7136\u540e\u7528 store.state \u8bfb\u3001store.commit \u6539\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">vue-resource<\/h3>\n<p style=\"margin: 1em 0px;\">\u4f53\u79ef\u5c0f\uff0c\u652f\u6301 IE9+\uff0c\u652f\u6301 Promise\u3002\u5b89\u88c5\uff1a<\/p>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">$ npm install vue-resource<\/code><\/pre>\n<p style=\"margin: 1em 0px;\">\u5f15\u5165\u540e\u65e2\u53ef\u6302\u5728\u5168\u5c40 Vue \u4e0a\u7528 http\uff0c\u4e5f\u53ef\u6302\u5728\u67d0\u4e2a\u5b9e\u4f8b\u4e0a\uff1a<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u199101004455258467fm173sEEA4D74F0AF4BC4F5C71D0130200E0C3w640h374img.jpeg\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2317\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u199101004455258467fm173sEEA4D74F0AF4BC4F5C71D0130200E0C3w640h374img.jpeg\" alt=\"\" width=\"640\" height=\"374\"><\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u8bf7\u6c42\u540e\u7528 <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;\">then<\/code> \u5904\u7406\uff1a\u7b2c\u4e00\u4e2a\u53c2\u6570\u6210\u529f\u56de\u8c03\uff0c\u7b2c\u4e8c\u4e2a\u5931\u8d25\u56de\u8c03\u3002API \u6309 REST \u8bbe\u8ba1\uff0c\u5171 7 \u79cd\uff1a<\/p>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">get(url, [options])\nhead(url, [options])\ndelete(url, [options])\njsonp(url, [options])\npost(url, [body], [options])\nput(url, [body], [options])\npatch(url, [body], [options])<\/code><\/pre>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u5de5\u7a0b\u76ee\u5f55<\/h3>\n<p style=\"margin: 1em 0px;\">\u4e00\u4e2a\u7b80\u5355 Vue \u9879\u76ee\u5927\u6982\u957f\u8fd9\u6837\uff0c\u5404\u6587\u4ef6\u5939\u7ea6\u5b9a\u5982\u4e0b\uff1a<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u9852387222751497504fm173sC442F013BBD559DA0278E5D90000C0B3w348h878img.jpeg\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2318\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u9852387222751497504fm173sC442F013BBD559DA0278E5D90000C0B3w348h878img.jpeg\" alt=\"\" width=\"348\" height=\"878\"><\/a><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section><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;\">components\/<\/code>\uff1aVue \u7ec4\u4ef6\u3002\u5efa\u8bae\u628a\u7ec4\u4ef6\u7528\u5230\u7684\u56fe\u7247\u653e\u5230\u5bf9\u5e94\u5b50\u76ee\u5f55\uff0c\u65b9\u4fbf\u7ba1\u7406<\/section>\n<\/li>\n<li>\n<section><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;\">node_modules\/<\/code>\uff1anpm \u4f9d\u8d56<\/section>\n<\/li>\n<li>\n<section><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>\uff1astore \u76f8\u5173\uff08state\u3001actions\u3001mutations\uff09<\/section>\n<\/li>\n<li>\n<section><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;\">router\/<\/code>\uff1avue-router \u914d\u7f6e<\/section>\n<\/li>\n<li>\n<section><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;\">build\/<\/code>\uff1awebpack \u6253\u5305\u7f16\u8bd1\u914d\u7f6e<\/section>\n<\/li>\n<li>\n<section><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;\">static\/<\/code>\uff1a\u5c11\u53d8\u52a8\u7684\u56fe\u7247\u6216 CSS<\/section>\n<\/li>\n<li>\n<section><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;\">config\/<\/code>\uff1a\u7aef\u53e3\u7b49\u914d\u7f6e<\/section>\n<\/li>\n<li>\n<section><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;\">dist\/<\/code>\uff1a\u4e00\u5f00\u59cb\u6ca1\u6709\uff0cbuild \u4e4b\u540e\u624d\u4ea7\u51fa<\/section>\n<\/li>\n<li>\n<section><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;\">App.vue<\/code>\uff1a\u6839\u7ec4\u4ef6\uff0c\u5b50\u7ec4\u4ef6\u90fd\u5728\u8fd9\u5f15\u7528<\/section>\n<\/li>\n<li>\n<section><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;\">index.html<\/code>\uff1a\u5165\u53e3\uff0c\u5f15\u7528\u6839\u7ec4\u4ef6<\/section>\n<\/li>\n<li>\n<section><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;\">main.js<\/code>\uff1a\u5165\u53e3 JS\uff0c\u6253\u5305\u540e\u6ce8\u5165 index.html<\/section>\n<\/li>\n<\/ul>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u5728 Vue \u91cc\u7528 Less<\/h3>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u17228114202213823397fm173sA2D237CA92B6866F0E710D0F0300E0C2w640h657img.jpeg\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2319\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u17228114202213823397fm173sA2D237CA92B6866F0E710D0F0300E0C2w640h657img.jpeg\" alt=\"\" width=\"640\" height=\"657\"><\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u9700\u8981 npm \u5b89\u88c5 less-loader\uff0c\u518d\u5728\u5355\u6587\u4ef6\u7ec4\u4ef6\u7684 style \u4e0a\u6807\u660e lang\uff0c\u6253\u5305\u65f6\u4f1a\u751f\u6210\u5bf9\u5e94 CSS\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\u6838\u5fc3\u529f\u80fd\uff1a\u8ba1\u7b97\u5c5e\u6027\u3001\u6a21\u677f\u3001\u7ec4\u4ef6\u3001\u8fc7\u6e21<\/h2>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u8ba1\u7b97\u5c5e\u6027<\/h3>\n<p style=\"margin: 1em 0px;\">\u8d2d\u7269\u8f66\u7ed3\u7b97\u91cc\uff0c\u603b\u989d\u968f\u6570\u91cf\u3001\u9009\u4e2d\u79cd\u7c7b\u3001\u5355\u4ef7\u53d8\u3002\u82e5\u628a\u8fd9\u4e9b\u52a8\u6001\u91cf\u5168\u585e\u8fdb\u6a21\u677f\uff0c\u903b\u8f91\u53c8\u81ed\u53c8\u957f\u3002\u590d\u6742\u903b\u8f91\u8bf7\u7528<strong style=\"color: #4870ac;\">\u8ba1\u7b97\u5c5e\u6027<\/strong>\uff1a\u6a21\u677f\u91cc\u53ea\u5199 <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;\">{{ totalPrice }}<\/code>\uff0c\u8ba1\u7b97\u5199\u5728 <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;\">computed<\/code> \u91cc\u3002<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u5612490402300020663fm173sE6A0D54B0AE08D6E5450701B0000E0C1w640h301img.jpeg\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2321\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u5612490402300020663fm173sE6A0D54B0AE08D6E5450701B0000E0C1w640h301img.jpeg\" alt=\"\" width=\"640\" height=\"301\"><\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u548c\u65b9\u6cd5\u7684\u5dee\u522b\uff1a\u8ba1\u7b97\u5c5e\u6027\u6309\u4f9d\u8d56\u7f13\u5b58\uff0c\u53ea\u6709 price\u3001count \u53d8\u4e86\u624d\u91cd\u7b97\uff1b\u4f9d\u8d56\u4e0d\u53d8\u65f6\u591a\u6b21\u8bbf\u95ee\u76f4\u63a5\u8fd4\u56de\u4e0a\u6b21\u7ed3\u679c\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u6a21\u677f\u8bed\u6cd5<\/h3>\n<p style=\"margin: 1em 0px;\">\u57fa\u4e8e HTML \u7684\u6a21\u677f\uff0c\u58f0\u660e\u5f0f\u5730\u628a DOM \u7ed1\u5230\u5b9e\u4f8b\u6570\u636e\u3002\u6a21\u677f\u90fd\u662f\u5408\u6cd5 HTML\u3002\u5305\u62ec\u53cc\u5927\u62ec\u53f7\u63d2\u6587\u672c\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;\">v-html<\/code> \u63d2 HTML\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;\">v-bind<\/code> \u7ed1\u5bf9\u8c61\uff0c\u4ee5\u53ca\u7c7b\u4f3c Angular \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;\">v-if<\/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;\">v-show<\/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;\">v-for<\/code> \u548c\u8fc7\u6ee4\u5668\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u7ec4\u4ef6\u5316<\/h3>\n<p style=\"margin: 1em 0px;\">\u7ec4\u4ef6\u662f Vue \u6700\u5f3a\u5927\u7684\u529f\u80fd\uff1a\u5c01\u88c5\u53ef\u590d\u7528\u4ee3\u7801\uff0c\u4f20\u5165\u4e0d\u540c\u5bf9\u8c61\u5c31\u590d\u7528\u3002\u4f8b\u5982\u5148\u5199 star.vue \u753b\u4e94\u89d2\u661f\uff0c\u518d\u5728\u522b\u7684\u6587\u4ef6 <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;\">import<\/code> \u5e76\u6ce8\u518c\uff0c\u5c31\u80fd\u7528 <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;\">&lt;star&gt;<\/code> \u6807\u7b7e\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u7ec4\u4ef6\u4f5c\u7528\u57df\u5b64\u7acb\uff0c\u5b50\u6a21\u677f\u4e0d\u80fd\u76f4\u63a5\u78b0\u7236\u6570\u636e\uff0c\u5fc5\u987b\u7528 <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;\">props<\/code> \u58f0\u660e\u671f\u671b\u6570\u636e\u3002\u672c\u4f8b\u662f <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;\">size<\/code> \u548c <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;\">score<\/code>\uff0c\u7236\u7ec4\u4ef6\u4f20\u5165\u5927\u5c0f\u548c\u5206\u6570\u6765\u5b9a\u5236\u3002<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u4725948373390637976fm173sE6A4D74BD2B6966D4869F40E0000E0C1w640h613img.jpeg\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2322\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u4725948373390637976fm173sE6A4D74BD2B6966D4869F40E0000E0C1w640h613img.jpeg\" alt=\"\" width=\"640\" height=\"613\"><\/a><\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u8fc7\u6e21\u6548\u679c<\/h3>\n<p style=\"margin: 1em 0px;\">\u63d2\u5165\u3001\u66f4\u65b0\u3001\u79fb\u9664 DOM \u65f6\u53ef\u7528 <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;\">transition<\/code> \u5c01\u88c5\u7ec4\u4ef6\u3002\u914d\u5408 <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;\">v-if<\/code> \/ <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;\">v-show<\/code>\uff0cVue \u4f1a\u5728\u5408\u9002\u65f6\u673a\u52a0 entering \/ leaving \u7684 class\u3002\u628a\u5143\u7d20\u653e\u8fdb <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;\">&lt;transition name=\"slide-fade\"&gt;<\/code>\uff0c\u518d\u5199\u5bf9\u5e94 CSS \u5373\u53ef\u3002<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u14555154321101713298fm173sA69115CB9BE0AC435CC971170300B0C1w640h262img.jpeg\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2323\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u14555154321101713298fm173sA69115CB9BE0AC435CC971170300B0C1w640h262img.jpeg\" alt=\"\" width=\"640\" height=\"262\"><\/a><br \/>\n<a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u6474343232150765483fm173sA2B255CB57B486691A71E40E030070C3w640h353img.jpeg\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2324\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/u6474343232150765483fm173sA2B255CB57B486691A71E40E030070C3w640h353img.jpeg\" alt=\"\" width=\"640\" height=\"353\"><\/a><\/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;\">\u4e94\u3001\u8c01\u5728\u7528\u3001\u5b66\u4ec0\u4e48<\/h2>\n<p style=\"margin: 1em 0px;\">\u4e0d\u5b8c\u5168\u7edf\u8ba1\uff1a\u997f\u4e86\u4e48\u3001\u82cf\u5b81\u6613\u8d2d\u3001\u7f8e\u56e2\u3001\u5929\u732b\u3001Laravel\u3001htmlBurger \u7b49\u56fd\u5185\u5916\u516c\u53f8\u90fd\u5728\u7528 Vue \u505a\u65b0\u9879\u76ee\u6216\u524d\u7aef\u91cd\u6784\u3002vue + vuex + axios + vue-router + webpack + ES6 + less \u4e5f\u8d8a\u6765\u8d8a\u5e38\u89c1\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u57fa\u7840\u5b66\u4e60\u89c6\u9891\uff1ahttps:\/\/scrimba.com\/playlist\/pXKqta<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/QQ\u255c\u256a\u2550\u255d20181212153658.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-2328\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2018\/12\/QQ\u255c\u256a\u2550\u255d20181212153658.png\" alt=\"\" width=\"799\" height=\"547\"><\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u539f\u6587\uff1ahttps:\/\/baijiahao.baidu.com\/s?id=1587075843882427601&#038;wfr=spider&#038;for=pc<\/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;\">\u5bf9\u6bd4\u9879<\/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;\">Vue<\/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;\">React<\/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;\">Angular 1<\/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;\">\u6570\u636e\u66f4\u65b0<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u4f9d\u8d56\u8ffd\u8e2a + \u5f02\u6b65\u961f\u5217<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u865a\u62df DOM diff<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u810f\u68c0\u67e5 digest\uff0c\u53ef\u80fd\u591a\u8f6e<\/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;\">\u8def\u7531 \/ \u72b6\u6001<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u5b98\u65b9 vue-router\u3001vuex<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u793e\u533a Redux \u7b49\uff0c\u66f4\u7e41\u8363<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u5b98\u65b9\u5168\u5bb6\u6876\uff0c1\u21922 \u96be\u8fc1<\/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;\">\u5b66\u4e60\u66f2\u7ebf<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u66f4\u8d34\u8fd1\u524d\u7aef\u4e60\u60ef<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u504f\u9661<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u6307\u4ee4\u4e0e\u7ec4\u4ef6\u6613\u6df7\uff0c\u66f4\u9661<\/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;\">\u8de8\u7aef<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">Weex \u7528 Vue \u505a\u8fd0\u884c\u65f6<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">React Native<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">Ionic \u7b49\u6df7\u5408\u65b9\u6848<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\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\uff1aVue \u7528\u6e10\u8fdb\u5f0f\u3001\u6570\u636e\u9a71\u52a8\u548c\u5b98\u65b9\u5168\u5bb6\u6876\u628a\u4e2d\u5c0f\u5230\u5927\u578b SPA \u4e32\u8d77\u6765\uff1b\u5148\u641e\u6e05\u7ec4\u4ef6\u3001\u8ba1\u7b97\u5c5e\u6027\u548c Vuex\uff0c\u518d\u8c08\u5bf9\u6bd4\u548c\u8de8\u7aef\u3002<\/strong><\/p>\n<\/blockquote>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>Vue.js \u662f\u4e00\u4e2a JavaScript MVVM \u5e93\uff0c\u4e5f\u662f\u4e00\u5957\u6784\u5efa\u7528\u6237\u754c\u9762\u7684\u6e10\u8fdb\u5f0f\u6846\u67b6\u3002\u5b98\u7f51\uff1ahttps: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[105],"tags":[205],"_links":{"self":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/2311"}],"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=2311"}],"version-history":[{"count":3,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/2311\/revisions"}],"predecessor-version":[{"id":3513,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/2311\/revisions\/3513"}],"wp:attachment":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}