在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ 怎么設置iview的table表頭樣式,因為設計圖的table表頭樣式不同

怎么設置iview的table表頭樣式,因為設計圖的table表頭樣式不同

使用的iview的table的UI組件

然后我想自定義表頭的樣式,但是始終找不到解決方法,搜到的解決方案是錯的

相關代碼

表頭數(shù)據(jù):

 tableColumns () {
                let columns = [];
                // if (this.showCheckbox) {
                //     columns.push({
                //         type: 'selection',
                //         width: 60,
                //         align: 'center'
                //     })
                // }
               
                if (this.showIndex) {
                    columns.push({
                        title: '排名',
                        type: 'index',
                        width: 150,
                        align: 'center',
                    })
                }
                columns.push({
                    title: '區(qū)縣名稱',
                    key: 'contentTitle',
                    width: 150,
                    align: 'center',
                    ellipsis:'true',
                });
                columns.push({
                    title: '區(qū)縣分數(shù)',
                    key: 'contentGrade',
                    width: 200,
                    align: 'center',
                    ellipsis:'true',
                });
                columns.push({
                    title: '去年同期分數(shù)',
                    key: 'lastyearGrade',
                    align: 'center',
                    ellipsis:'true',
                });
                columns.push({
                    title: '去年同期排名',
                    key: 'lastyearRank',
                    align: 'center',
                    ellipsis:'true',
                });
                columns.push({
                    title: '名次同比增長',
                    key: 'contentImg',
                    width: 200,
                    align: 'center',
                    ellipsis:'true',
                    render: (h, params) => {
                        // return h('div', 
                        // [
                        //     h('img',{
                        //         attrs:{
                        //             'src':this.config_obj.imgupload+ this.sublistdata[params.index].contentImg,
                        //         },
                        //         style:{
                        //             maxHeight:"22px",
                        //         }
                        //     })
                        // ]);
                    }
                });
                return columns;
            }

我期待可以實現(xiàn)這樣的效果:這樣的table表頭背景,字那些都不重要

圖片描述

回答
編輯回答
離觴

改寫表頭 CSS 樣式

2017年8月28日 08:26