<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 功能強大 支持多語言、二開方便! 廣告
                [TOC] ## 方式一 打印節點 ``` (function(win){ 'use strict'; var document = win.document; //非必須 function ready(selector, fn){ check(selector,fn); } function check(selector,fn){ var dom =document.querySelector(selector) fn(dom); } // 對外暴露ready win.getDom = ready; })(this); // usage getDom('h1', function(element){ console.log(element); }); ``` ## 方式二 ``` /** * * @type {{minus(*): void, regiset(*): void, setValue(*): void, currentValue: number, plus(*): void}} * */ const Calc = { currentValue: 0, setValue(newValue) { this.currentValue = newValue; console.log(this.currentValue); }, core: { 'plus': (currentValue, addend) => currentValue + addend, 'minus': (currentValue, addend) => currentValue - addend, }, plugins: {}, press(method, newVal) { const func = this.core[method] || this.plugins[method]; this.setValue(func(this.currentValue, newVal)); }, register(plugin) { const {name, exec} = plugin this.plugins[name] = exec } } const squaredPlugin = { name: "squared", exec: function (currentValue) { return currentValue*currentValue } } Calc.register(squaredPlugin) // 使用計算器 Calc.setValue(3); // => 3 Calc.press('plus', 2); // => 5 Calc.press('squared'); // => 25 Calc.press('squared'); // => 625 ```
                  <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>

                              哎呀哎呀视频在线观看