<p><code></p> <p>趁着5.1来临之际,告诉你们一个好消息:<br /><span class="img-wrap"><img data-src="/img/remote/1460000009250450?w=177&amp;h=140" src="/img/remote/1460000009250450?w=177&amp;h=140" alt="" title="" style="cursor: pointer; display: inline;"></span></p> <hr> <p>demo: <a href="https://jkchao.github.io/vue-loading/" rel="nofollow noreferrer" target="_blank">https://jkchao.github.io/vue-...</a></p> <p>源码(star ? start : start):<a href="https://github.com/jkchao/vue-loading" rel="nofollow noreferrer" target="_blank">https://github.com/jkchao/vue...</a></p> <p>组件支持:自定义type(暂时提供8种,具体请看demo);color;size;</p> <hr> <h2 id="articleHeader0">Start</h2> <div class="widget-codetool" style="display:none;"> <div class="widget-codetool--inner"> <span class="selectCode code-tool" data-toggle="tooltip" data-placement="top" title="" data-original-title="全选"></span><br /> <span type="button" class="copyCode code-tool" data-toggle="tooltip" data-placement="top" data-clipboard-text=" npm install vue-loading-template --save" title="" data-original-title="复制"></span> </div> </p></div> <pre class="javascript hljs"><code class="javascript" style="word-break: break-word; white-space: initial;"> npm install vue-loading-template --save</code></pre> <h3 id="articleHeader1">Use in SPA</h3> <div class="widget-codetool" style="display:none;"> <div class="widget-codetool--inner"> <span class="selectCode code-tool" data-toggle="tooltip" data-placement="top" title="" data-original-title="全选"></span><br /> <span type="button" class="copyCode code-tool" data-toggle="tooltip" data-placement="top" data-clipboard-text=" <template></p> <h2>bars</h2> <p> <vue-loading type=&quot;bars&quot; color=&quot;#d9544e&quot; :size=&quot;{ width: '50px', height: '50px' }&quot;><vue-loading><br /> <template><br /> <script> import vueLoading from 'vue-loading-template' <a href="http://www.js-code.com/tag/export" title="export" target="_blank">export</a> default { name: 'app', components: { vueLoading } } </script><br /> " title="" data-original-title="复制"></span> </div> </p></div> <pre class="javascript hljs"><code class="javascript"> &lt;template&gt; <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">h2</span>&gt;</span>bars<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span></span> &lt;vue-loading type=<span class="hljs-string">"bars"</span> color=<span class="hljs-string">"#d9544e"</span> :size=<span class="hljs-string">"{ width: '50px', height: '50px' }"</span>&gt;&lt;vue-loading&gt; &lt;template&gt; &lt;script&gt; import vueLoading from 'vue-loading-template' <a href="http://www.js-code.com/tag/export" title="浏览关于“export”的文章" target="_blank" class="tag_link">export</a> default { name: 'app', components: { vueLoading } } &lt;/script&gt; </code></pre> <p></code></p>

本文固定链接: http://www.js-code.com/vue-js/vue-js_24582.html