把iview的table做成更適合展現大量數據的樣式(字體變小、去除多余的padding等)


<style>
    .ivu-table {
        font-size: 12px !important;
    }

    .ivu-table-header thead tr th {
        padding: 0px !important;
        height: 26px;
        line-height: 26px;
    }

    .ivu-table-fixed-header thead tr th {
        padding: 0px !important;
        height: 26px;
        line-height: 26px;
        font-size: 12px;
    }

    .ivu-table-fixed-right-header {
        height: 29px !important;
    }

    .ivu-table-cell {
        white-space: nowrap !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .ivu-table td, .ivu-table th {
        height: 26px;
        line-height: 26px;
    }
</style>

 

            let ele = this.$el;
            this.height = ele.clientHeight;
            this.width = ele.clientWidth;
            this.showTable = true;
            window.onresize = () => {
                this.showTable = false;
                this.$nextTick(() => {
                    this.height = ele.clientHeight;
                    this.width = ele.clientWidth;
                    this.showTable = true;
                })
            }

 


免責聲明!

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



猜您在找 哪種方式更適合在React中獲取數據? 通過css樣式去除 圖片格式那么多,哪種更適合你? iview庫修改table組件首次加載樣式錯亂 iview table數據排序不正確 Python去除多余空格 iview table嵌套table Java BigDecimal去除末尾多余的0 RAID5和RAID10,哪種RAID更適合你(上)
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM
標簽的外邊框 modSecurity和Naxsi哪個更適合Nginx搭建WAF