遇到一個問題 <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> 顾瞻,這種就是動態(tài)添加template甲抖,發(fā)現(xiàn)展示不對携丁,template 不能用v-if嗎跑杭??击碗?把跨?那怎么解決這種動態(tài)可以操作的情況呢!
VUE2.0+ElementUI2.0表格el-table:循環(huán)動態(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...