<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                [TOC] #### Vue表達式的應用 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="css/index.css" /> <script type="text/javascript" src="js/vue.js"></script> <title>表達式</title> <style> .class1{ color: red; } .class2{ color: green; } </style> </head> <body> <div id="xy"> {{n+1}} <!--屬性中使用表達式--> <h1 :class="'class'+n">{{title}}</h1> <input type="radio" value="1" v-model="n" />紅色 <input type="radio" value="2" v-model="n" />綠色 </div> <script type="text/javascript"> var app = new Vue({ el: "#xy", data: { title: "hello Vue!", n: 1, } }); </script> </body> </html> #### 計算屬性computed實例講解 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="css/index.css" /> <script type="text/javascript" src="js/vue.js"></script> <title>computed</title> </head> <body> <div id="xy"> <!--計算輸入兩個內容的和--> n1:<input v-model="n1" type="text"/>+ n2:<input v-model="n2" type="text"/>= <input v-model="sum" type="text"/> </div> <script type="text/javascript"> var app = new Vue({ el: "#xy", computed:{ sum:function(){ return this.n1*1 + this.n2*1; } }, data: { n1: 0, n2:0, } }); </script> </body> </html> #### class中應用表達式 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <script src="vue.js"></script> <script src="node_modules/axios/dist/axios.js"></script> <script src="node_modules/lodash/lodash.js"></script> </head> <body> <style> .success { color: green; } .error { color: red; } </style> <div id="hdcms"> <li v-for="v in news"> <!--class中應用表達式--> <span :class="v.status?'success':'error'">{{v.title}}</span> <button v-on:click="changeStatus(v,false)" v-if="v.status">刪除</button> <button v-on:click="changeStatus(v,true)" v-if="!v.status">恢復</button> </li> </div> <script> var app = new Vue({ el: '#hdcms', methods: { changeStatus: function (item, status) { item.status = status; } }, data: { news: [ {title: '后盾人', status: true}, {title: 'houdunren.com', status: true}, ] } }); </script> </body> </html> #### 多種方式使用vue控制style樣式屬性 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <script src="vue.js"></script> <script src="node_modules/axios/dist/axios.js"></script> <script src="node_modules/lodash/lodash.js"></script> </head> <body> <div id="hdcms"> <h1 :style="{color:'red',fontSize:size+'px'}">后盾人</h1> <h2 :style="style">后盾人</h2> <h3 :style="[hdcms]">houdunren.com</h3> <input type="number" v-model="size"> </div> <script> var app = new Vue({ el: '#hdcms', data: { red: 'green', size: 16, style: { color: 'blue' }, hdcms:{ color:'yellow', backgroundColor:'blue' } } }); </script> </body> </html>
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看