一、Iview Table 組件 多選框選中和禁選設(shè)置
Table添加多選框
通過給 columns 數(shù)據(jù)設(shè)置一項,指定 type: 'selection' ,即可自動開啟多選功能。
正確使用好以下事件,可以達到需要的效果:
<template> <div> <Table ref="selection" :columns="columns" :data="data" @on-selection-change="selectChange"></Table> </div> </template> <script> export default { data () { return { columns: [ { type: 'selection', width: 60, align: 'center' }, { title: 'Name', key: 'name' }] } }, methods: { selectChange: function (data) { console.log(data[i].name) } } </script>
當前文章:IviewTable組件中各種組件擴展的使用-創(chuàng)新互聯(lián)
網(wǎng)頁地址:http://jinyejixie.com/article44/dsehhe.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供App設(shè)計、企業(yè)建站、服務(wù)器托管、全網(wǎng)營銷推廣、虛擬主機、外貿(mào)建站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容