<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ~~~ <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>計算屬性,方法,偵聽器</title> <script src="vue.js"></script> </head> <body> <div id="app"> <!-- {{firstName + ' ' + lastName}}--> <!-- {{fullName}}--> <!-- {{fullName()}}--> {{fullName}} {{age}} </div> <script> /** * 如果一個功能可以通過methods,watch,computed實現,用computed效率最高 * @type {Vue} */ var vm = new Vue({ el: '#app', data: { firstName: 'Han', lastName: 'MeiMei', fullName: 'Han MeiMei', age: 28, }, //偵聽器 watch: { firstName() { console.log('計算了一次') this.fullName = this.firstName + ' ' + this.lastName }, lastName: function () { console.log('計算了一次') this.fullName = this.firstName + ' ' + this.lastName; } }, //方法沒有緩存機制 和計算屬性比,計算屬性效率更加高 // methods:{ // fullName(){ // //當其它數據發生改變時,會重新運行,比如age發生了改變 // console.log('計算了一次') // return this.firstName+" "+this.lastName // } // }, //計算屬性 有緩存的概念 對應的數據發生了變化,會重新計算 // computed:{ // fullName(){ // console.log('計算了一次') // return this.firstName+" "+this.lastName // } // } }); </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>

                              哎呀哎呀视频在线观看