jerichotab 初始化頁面顯示tab頁中的第一個


 

tab初始化默認顯示第一個內容,但是tab標簽顯示最后一個。

源代碼:

 $.fn.initJerichoTab({
            renderTo: '#consumable',
            uniqueId: 'jerichotab',
            contentCss: {'height': $(window).height()-197,'width':'100%'},
            tabs: [{
                title: '需求計划',
                closeable: false,
                data: { dataType: 'iframe', dataLink: '' }
            },
                {
                    title: '采購訂單',
                    closeable: false,
                    data: { dataType: 'iframe', dataLink: '../requirements/planList/planList.html' }
                },
                {
                    title: '入庫驗收單',
                    closeable: false,
                    data: { dataType: 'iframe', dataLink: '../requirements/planList/planList.html' }
                },
                {
                    title: '請領單',
                    closeable: false,
                    data: { dataType: 'iframe', dataLink: '../requirements/planList/planList.html' }
                },
                {
                    title: '配送單',
                    closeable: false,
                    data: { dataType: 'iframe', dataLink: '../requirements/planList/planList.html' }
                },
                {
                    title: '科室領用',
                    closeable: false,
                    data: { dataType: 'iframe', dataLink: '../requirements/planList/planList.html' }
                },
                {
                    title: '科室退貨',
                    closeable: false,
                    data: { dataType: 'iframe', dataLink: '../requirements/planList/planList.html' }
                },
                {
                    title: '庫存查詢',
                    closeable: false,
                    data: { dataType: 'iframe', dataLink: '../requirements/planList/planList.html' }
                }
            ],
            loadOnce: true,
            tabWidth: 120,
        });

這個問題找了 好久,結果在源代碼中發現有個默認選中某個元素的問題:

注釋掉代碼就可以解決問題.

 


免責聲明!

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



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