bootstrap table 兼容ie8 -- refreshOptions


今天項目使用 bootstrap table 在ie8下發現 方法 refreshOptions 報錯。

經過調試監控發現錯誤如下:

153 行 代碼 Object.getOwnPropertyNames 不存在 

源代碼:

        // Create arrays of property names

        var objectAProperties = Object.getOwnPropertyNames(objectA),

            objectBProperties = Object.getOwnPropertyNames(objectB),

            propName = '';

更改為:

  

        // 2017年11月30日 21點50分 吳占超修正ie8 兼容

        var objectAProperties = [];

        for (var k in objectA) {

            if (objectA.hasOwnProperty(k))

                objectAProperties.push(k);

        }

        var objectBProperties = [];

        for (var k in objectB) {

            if (objectB.hasOwnProperty(k))

                objectAProperties.push(k);

        }

        var propName = '';


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM