{"id":2694,"date":"2018-04-21T12:24:24","date_gmt":"2018-04-21T04:24:24","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=2694"},"modified":"2018-10-07T17:13:42","modified_gmt":"2018-10-07T09:13:42","slug":"vue-js-%e4%bb%bf%e5%86%92%e6%b3%a1%e6%8e%92%e5%ba%8f%e6%8e%92%e5%ba%8f%e8%bf%87%e7%a8%8b%e5%8a%a8%e7%94%bb%e6%95%88%e6%9e%9c","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=2694","title":{"rendered":"Vue.js \u4eff\u5192\u6ce1\u6392\u5e8f\u6392\u5e8f\u8fc7\u7a0b\u52a8\u753b\u6548\u679c"},"content":{"rendered":"<p>\n\t\u7f51\u4e0a\u6709\u5f88\u591a\u4f7f\u7528 JavaScript \u6765\u6a21\u62df\u5192\u6ce1\u6392\u5e8f\u6392\u5e8f\u8fc7\u7a0b\u7684\u52a8\u753b\u3002\u4eca\u5929\u6211\u4eec\u518d\u501f\u52a9\u76ee\u524d\u6700\u706b\u7684 Vue.js \u6765\u5b9e\u73b0\u4e00\u4e2a\u5192\u6ce1\u6392\u5e8f\u52a8\u753b\u6548\u679c\u3002\n<\/p>\n<p>\n\tvue.js \u662f\u4e00\u6b3e\u8f7b\u91cf\u7ea7\u7684\u6e10\u8fdb\u5f0f JavaScript \u6846\u67b6\uff0c\u5728\u5b9e\u73b0\u52a8\u753b\u6548\u679c\u65b9\u9762\u975e\u5e38\u65b9\u4fbf\u3002\n<\/p>\n<p>\n\t\u672c\u6587\u5b9e\u73b0\u7684\u6700\u7ec8\u52a8\u753b\u6548\u679c\u5982\u4e0b\uff1a\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"vue.js \u5192\u6ce1\u6392\u5e8f\" src=\"http:\/\/www.xttblog.com\/wp-content\/uploads\/2018\/10\/bd_img.png\" style=\"width: 610px;height: 355px\" \/>\n<\/p>\n<p>\n\t\u5b9e\u73b0\u4ee3\u7801\u975e\u5e38\u7684\u7b80\u5355\uff0c\u603b\u5171\u4e0d\u8d85\u8fc7100\u884c\u3002\u4e3b\u8981\u4ee3\u7801\u5982\u4e0b\uff1a\n<\/p>\n<pre class=\"brush:xml;\">\r\n&lt;div id=&quot;app&quot;&gt;\r\n\t&lt;div class=&quot;cards&quot;&gt;\r\n\t\t&lt;sort-card v-for=&quot;(card, index) in store.state.cards&quot; :key=&quot;index&quot; :value=&quot;card.value&quot; :sort-index=&quot;card.sortIndex&quot; :is-active=&quot;card.isActive&quot; :is-locked=&quot;card.isLocked&quot;&gt;&lt;\/sort-card&gt;\r\n\t&lt;\/div&gt;\r\n\t&lt;div class=&quot;control-panel&quot;&gt;\r\n\t\t&lt;h1&gt;Bubble Sort Visualizer&lt;\/h1&gt;\r\n\t\t&lt;button aria-label=&quot;Reset&quot; v-if=&quot;store.state.done&quot; @click=&quot;reset(SORT_ARRAY)&quot;&gt;\r\n\t\t\t&lt;i class=&quot;fa fa-refresh&quot; aria-hidden=&quot;true&quot;&gt;&lt;\/i&gt;\r\n\t\t&lt;\/button&gt;\r\n\t&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;!-- \u4e1a\u4f59\u8349 www.xttblog.com --&gt;\r\n&lt;script type=&quot;text\/x-template&quot; id=&quot;sort-card-template&quot;&gt;\r\n\r\n\t&lt;!-- \u7ed1\u5b9a\u5185\u8054\u6837\u5f0f\uff0c\u901a\u8fc7 height \u548c transform \u6765\u663e\u793a\u4e0d\u540c\u7684div --&gt;\r\n\t&lt;div class=&quot;card-wrapper&quot; :data-sort-index=&quot;sortIndex&quot; v-bind:style=&quot;{height: value * HEIGHT_INCREMENT + &#039;px&#039;,transform: &#039;translateX(&#039;+sortIndex*100+&#039;%)&#039;}&quot;&gt;\r\n\t&lt;!-- \u901a\u8fc7\u6539\u53d8class\uff0c\u6765\u6539\u53d8\u989c\u8272 --&gt;\r\n\t&lt;div class=&quot;card&quot; :class=&quot;cardClassObject&quot;&gt;\r\n\t&lt;div class=&quot;value&quot;&gt;{{value}}&lt;\/div&gt;\r\n\t&lt;\/div&gt;\r\n\t&lt;\/div&gt;\r\n  \r\n&lt;\/script&gt;<\/pre>\n<p>\n\t\u5982\u679c\u611f\u5174\u8da3\uff0c\u8fd8\u662f\u8001\u89c4\u77e9\uff0c\u5173\u6ce8\u6211\u7684\u5fae\u4fe1\u516c\u4f17\u53f7\uff0c\u56de\u590d&ldquo;vue\u5192\u6ce1\u6392\u5e8f&rdquo;\u4e0b\u8f7d\u6e90\u7801\uff01<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=2694\">Vue.js \u4eff\u5192\u6ce1\u6392\u5e8f\u6392\u5e8f\u8fc7\u7a0b\u52a8\u753b\u6548\u679c<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u7f51\u4e0a\u6709\u5f88\u591a\u4f7f\u7528 JavaScript \u6765\u6a21\u62df\u5192\u6ce1\u6392\u5e8f\u6392\u5e8f\u8fc7\u7a0b\u7684\u52a8\u753b\u3002\u4eca\u5929\u6211\u4eec\u518d\u501f\u52a9\u76ee\u524d\u6700\u706b\u7684 Vue.js \u6765 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[1106,1610,1138,173,75],"class_list":["post-2694","post","type-post","status-publish","format-standard","hentry","category-html5","tag-javascript","tag-rete","tag-vue-js","tag-173","tag-75"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2694"}],"version-history":[{"count":2,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2694\/revisions"}],"predecessor-version":[{"id":3163,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2694\/revisions\/3163"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}