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

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # 自定義指令 Example > 在這個例子中,Vue.js 與一個第三方 jQuery 插件(select2) 整合,通過將它包裝到一個自定義指令中實現。 ![](https://box.kancloud.cn/2016-01-03_5688e1aa1edbd.png) html ``` <div id="el"> <p>Selected: {{selected}}</p> <select v-select="selected" :options="options"> <option value="0">default</option> </select> </div> ``` js ``` Vue.directive('select', { twoWay: true, priority: 1000, params: ['options'], bind: function () { var self = this $(this.el) .select2({ data: this.params.options }) .on('change', function () { self.set(this.value) }) }, update: function (value) { $(this.el).val(value).trigger('change') }, unbind: function () { $(this.el).off().select2('destroy') } }) var vm = new Vue({ el: '#el', data: { selected: 0, options: [ { id: 1, text: 'hello' }, { id: 2, text: 'what' } ] } }) ``` css ``` select { min-width: 300px; } ```
                  <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>

                              哎呀哎呀视频在线观看