vue

<p>&lt;!DOCTYPE html&gt;<br />&lt;html&gt;</p> <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> <span type="button" class="copyCode code-tool" data-toggle="tooltip" data-placement="top" data-clipboard-text="<head> <meta charset=&quot;UTF-8&quot;> <title></title> </head> <script type=&quot;text/javascript&quot;src=&quot;../../dist/vue.min.js&quot; > </script> <script type=&quot;text/javascript&quot;> window.onload=function(){ new Vue({ el:'#dv', data:{ } }) } </script> <body> </p> <div id=&quot;dv&quot;> <div id=&quot;&quot;> {{&#8216;hello world!&#8217;|capitalize}} capitalize可以将模板中的文本转换成首字母大写,写法是模板中的字符串需要加引号,然后加一条| 后面写capitalize </div> </p></div> <p> </body>&#8221; title=&#8221;&#8221; data-original-title=&#8221;复制&#8221;></span> </div> </p></div> <pre class="hljs xml"><code><span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span> <span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text/javascript"</span><span class="hljs-attr">src</span>=<span class="hljs-string">"../../dist/vue.min.js"</span> &gt;</span><span class="undefined"> </span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text/javascript"</span>&gt;</span><span class="javascript"> <span class="hljs-built_in">window</span>.onload=<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{ <span class="hljs-keyword">new</span> Vue({ <span class="hljs-attr">el</span>:<span class="hljs-string">'#dv'</span>, <span class="hljs-attr">data</span>:{ } }) } </span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"dv"</span>&gt;</span> <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">""</span>&gt;</span> {{'hello world!'|capitalize}} capitalize可以将模板中的文本转换成首字母大写,写法是模板中的字符串需要加引号,然后加一条| 后面写capitalize <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span> <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span> <span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span></code></pre> <p>&lt;/html&gt;</p>
脚本宝典为你提供优质服务
脚本宝典 » vue

发表评论

提供最优质的资源集合

立即查看 了解详情