遇到一個(gè)問題 <el-table
:data="tableData"
header-cell-class-name="list-header-layout-bg"
border
style="width: 100%">
<el-table-column
:prop="item.date"
:label="item.label"
:min-width="item.width"
v-for="item,i in moduleList" :key="i"
>
<template slot-scope="scope" v-if="item.type!=='1'" class="rrrr">
<el-button @click="handleClick(scope)" type="text" size="small">111</el-button>
</template>
</el-table-column>
</el-table> ,這種就是動(dòng)態(tài)添加template待笑,發(fā)現(xiàn)展示不對(duì),template 不能用v-if嗎瞪讼??反惕?尝艘?那怎么解決這種動(dòng)態(tài)可以操作的情況呢!
VUE2.0+ElementUI2.0表格el-table:循環(huán)動(dòng)態(tài)列渲染的寫法先看看ElementUI里關(guān)于el-table的template數(shù)據(jù)結(jié)構(gòu): 再看看ElementUI里關(guān)于el-table的data數(shù)據(jù)結(jié)構(gòu): 那么問題來了姿染,如果有很多pro...