element-ui table單選

element-ui table單選

element-ui中只給了多選行,沒有單選;那麼我們就本身動動小腦殼寫一個唄。element-ui

<el-table ref="multipleTable" :data="designList" tooltip-effect="dark" height="255" style="width: 100%" @current-change="clickChange">
        <el-table-column label="選擇" width="55">
            <template slot-scope="scope">
                <el-radio  v-model="tableRadio" :label="scope.row"><i></i></el-radio>
            </template>
        </el-table-column>
        <el-table-column prop="designerCode" label="設計顧問" header-align="center" align="center"></el-table-column>
        <el-table-column prop="designerName" label="姓名" header-align="center" align="center"></el-table-column>
        <el-table-column prop="storeCode" label="門店編碼" header-align="center" align="center"></el-table-column>
        <el-table-column prop="storeName" label="門店名稱" header-align="center" align="center"></el-table-column>
        <el-table-column prop="cityName" label="所屬城市" header-align="center" align="center"></el-table-column>
    </el-table>
            
    clickChange (item) {
        this.tableRadio = item
    },

效果圖:
圖片描述ui

相關文章
相關標籤/搜索