国产99久久精品_欧美日本韩国一区二区_激情小说综合网_欧美一级二级视频_午夜av电影_日本久久精品视频

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

vue+element-ui動態生成多級表頭的方法

來源:懂視網 責編:小采 時間:2020-11-27 22:08:58
文檔

vue+element-ui動態生成多級表頭的方法

vue+element-ui動態生成多級表頭的方法:vue+element html配置: <div id=table>{{tableData}} <el-table :data=tabledata01 :span-method=tableSpanMethod max-height=420> <el-table-column v-for='item in t
推薦度:
導讀vue+element-ui動態生成多級表頭的方法:vue+element html配置: <div id=table>{{tableData}} <el-table :data=tabledata01 :span-method=tableSpanMethod max-height=420> <el-table-column v-for='item in t

vue+element

html配置:

<div id="table">{{tableData}}
<el-table :data="tabledata01" :span-method="tableSpanMethod" max-height="420">
<el-table-column v-for='item in tableConfig' :label="item.label" :prop='item.prop' :width='item.width' :key="item.id">
<el-table-column v-if='item.children||item.children.length>0' v-for="item1 in item.children"
:label="item1.label" :prop='item1.prop' :width='item1.width' :key="item1.id">
<el-table-column v-if='item1.children||item1.children.length>0' v-for="item2 in item1.children"
:label="item2.label" :prop='item2.prop' :width='item2.width' :key="item2.id">
</el-table-column>
</el-table-column>
</el-table-column>
</el-table>
</div>

data:

tableConfig:[
{id:100,label:'一級表頭',prop:'',width:'',children:[
{id:110,label:'二級表頭1',prop:'districtName',width:''},
{id:120,label:'二級表頭2',prop:'timeDimension',width:''}
]},
{id:200,label:'一級表頭',prop:'',width:'',children:[
{id:210,label:'二級表頭',prop:'',width:'',children:[
{id:211,label:'三級表頭',prop:'residentPopNum',width:'110'},
{id:212,label:'三級表頭',prop:'residentPopDst',width:'110'}
]}
]},
{id:300,label:'一級表頭',prop:'',width:'',children:[
{id:310,label:'二級表頭',prop:'',width:'',children:[
{id:311,label:'三級表頭',prop:'liveLandArea',width:'110'},
{id:312,label:'三級表頭',prop:'liveLandDst',width:'110'}
],
},
{id:320,label:'二級表頭',prop:'',width:'',children:[
{id:321,label:'三級表頭(km²)',prop:'employmentLandArea',width:'110'},
{id:322,label:'三級表頭',prop:'employmentLandDst',width:'110'}
],
}
]},
{id:400,label:'一級表頭',prop:'',width:'',children:[
{id:410,label:'二級表頭',prop:'',width:'',children:[
{id:411,label:'三級表頭(個)',prop:'regionTrafficHubNum',width:'110'},
{id:412,label:'三級表頭(人次/km²)',prop:'regionTrafficHubFlow',width:'140'}
],
},
{id:420,label:'二級表頭',prop:'',width:'',children:[
{id:421,label:'三級表頭(個)',prop:'highSpeedNum',width:'110'},
{id:422,label:'三級表頭(個/km²)',prop:'highSpeedDst',width:'140'}
],
},{id:430,label:'二級表頭',prop:'',width:'',children:[
{id:431,label:'三級表頭(個)',prop:'trackTrafficSpotNum',width:'140'},
{id:432,label:'三級表頭(個/km²)',prop:'trackTrafficSpotDst',width:'140'}
],
},
{id:440,label:'二級表頭',prop:'',width:'',children:[
{id:441,label:'三級表頭(km)',prop:'trackTrafficNetNum',width:'110'},
{id:442,label:'三級表頭(km/km²)',prop:'trackTrafficNetDst',width:'140'}
],
},
{id:450,label:'二級表頭',prop:'',width:'',children:[
{id:451,label:'三級表頭(個)',prop:'cityTrafficHubNum',width:'110'},
{id:452,label:'三級表頭(個/km²)',prop:'cityTrafficHubDst',width:'110'},
{id:453,label:'三級表頭(人次/km²)',prop:'cityTrafficHubFlow',width:'140'}
],
},
{id:460,label:'二級表頭',prop:'',width:'',children:[
{id:461,label:'三級表頭(km)',prop:'cityTrafficNetNum',width:'110'},
{id:462,label:'三級表頭',prop:'cityTrafficNetDst',width:'140'}
],
},
]},
{id:500,label:'一級表頭',prop:'',width:'',children:[
{id:510,label:'二級表頭',prop:'',width:'',children:[
{id:511,label:'三級表頭(km²)',prop:'pubServeLandArea',width:'110'},
{id:512,label:'三級表頭',prop:'pubServeLandDst',width:'110'}
],
},
{id:520,label:'二級表頭',prop:'',width:'',children:[
{id:521,label:'三級表頭(個)',prop:'hospitalResourcesNum',width:'110'},
{id:522,label:'三級表頭(km²)',prop:'hospitalResourcesArea',width:'110'},
{id:523,label:'三級表頭(個/km²)',prop:'hospitalResourcesDst',width:'110'}
],
},{id:530,label:'二級表頭',prop:'',width:'',children:[
{id:531,label:'三級表頭(個)',prop:'schoolResourcesNum',width:'110'},
{id:532,label:'三級表頭(km²)',prop:'schoolResourcesArea',width:'110'},
{id:533,label:'三級表頭(個/km²)',prop:'schoolResourcesDst',width:'110'}
],
},
{id:540,label:'二級表頭',prop:'',width:'',children:[
{id:541,label:'三級表頭(個)',prop:'humanResourcesNum',width:'110'},
{id:542,label:'三級表頭(個/km²)',prop:'humanResourcesDst',width:'110'}
],
},
{id:550,label:'二級表頭',prop:'',width:'',children:[
{id:551,label:'三級表頭(個)',prop:'businessResourcesNum',width:'110'},
{id:552,label:'三級表頭(個/km²)',prop:'businessResourcesDst',width:'110'}
],
},
{id:560,label:'二級表頭',prop:'',width:'',children:[
{id:561,label:'三級表頭(個)',prop:'environResourcesNum',width:'110'},
{id:562,label:'三級表頭(個/km²)',prop:'environResourcesDst',width:'110'}
],
},
]},
{id:600,label:'一級表頭',prop:'',width:'',children:[
{id:610,label:'二級表頭',prop:'',width:'',children:[
{id:611,label:'三級表頭(分)',prop:'populationScore',width:'110'},
],
},
{id:620,label:'二級表頭',prop:'',width:'',children:[
{id:621,label:'三級表頭(分)',prop:'landScore',width:'110'},
],
},{id:630,label:'二級表頭',prop:'',width:'',children:[
{id:631,label:'三級表頭(分)',prop:'trafficScore',width:'110'},
],
},
{id:640,label:'二級表頭',prop:'',width:'',children:[
{id:641,label:'三級表頭(分)',prop:'communalFacilitiesScore',width:'110'},
],
},
{id:650,label:'二級表頭',prop:'',width:'',children:[
{id:651,label:'三級表頭(分)',prop:'modelScore',width:'110'},
],
}
]},
],

注:動態生成表頭必須配置"key"

view:

以上這篇vue+element-ui動態生成多級表頭的方法就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持腳本之家。

聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

vue+element-ui動態生成多級表頭的方法

vue+element-ui動態生成多級表頭的方法:vue+element html配置: <div id=table>{{tableData}} <el-table :data=tabledata01 :span-method=tableSpanMethod max-height=420> <el-table-column v-for='item in t
推薦度:
標簽: VUE 動態的 表頭
  • 熱門焦點

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 热@国产| 欧美一区二区三区不卡免费 | 久久亚洲一级α片 | 日韩欧美色综合 | 欧美日韩国产一区二区三区在线观看 | 亚洲一区二区三区在线免费观看 | 国产精品久久香蕉免费播放 | 国产成人综合欧美精品久久 | 亚洲三级电影在线观看 | 精品国产综合区久久久久99 | 欧美极品第一页 | 精品一区二区三区四区五区 | 国产在线不卡 | 国产精品香蕉在线观看 | 91在线高清 | 欧美亚洲综合图区在线 | 欧美成人亚洲国产精品 | 国产精品视频一区二区三区经 | 国产在线观看精品 | 欧洲欧美成人免费大片 | 亚洲日韩精品欧美一区二区 | www国产精品 | 欧美一区二区精品 | 亚洲色图 第一页 | 伊人久久综合成人网小说 | 亚洲色图欧美一区 | www欧美在线观看 | xx中文字幕乱偷avxx | 欧美高清免费 | 国产亚洲一区二区三区在线观看 | 久久久久久久国产精品毛片 | 亚洲女同一区二区 | 欧美午夜一区二区福利视频 | 精品久久久久久中文字幕 | 伊人蕉 | 欧美一区二区三区在线观看 | 狼人综合伊人 | 亚洲欧美偷拍另类 | 涩五月婷婷 | 国产欧美在线观看一区二区 | 国产精品久久久久久久久久久久 |