elementUI可對(duì)表頭添加輸入框、下拉框等自定義表頭
以下拉框?yàn)槔?/h5>
若直接在表頭寫入下拉框
<el-table-column align="center" min-width="150">
<templateslot="header">
<el-option v-for="(item, index) in limitOptions" :key="index" :label="item.label" :value="item.value">
</el-option>
</template>
<template slot-scope="scope">
<p>{{ scope.row.coupon }}</p>
</template>
</el-table-column>
頁(yè)面會(huì)生成下拉框,但下拉框選擇無(wú)效,值并未改變
解決方法:
1.按官方網(wǎng)站所述,添加slot-scope="scope"

添加slot-scope="scope"
2. 也可添加slot-scope="{}"解決

添加slot-scope="{}"