vue iview組件表格 render函數(shù)的使用方法詳解
來源:懂視網(wǎng)
責(zé)編:小采
時(shí)間:2020-11-27 22:17:32
vue iview組件表格 render函數(shù)的使用方法詳解
vue iview組件表格 render函數(shù)的使用方法詳解:如果要在標(biāo)簽中加入屬性,例如img 中src屬性 a標(biāo)簽中href屬性 此時(shí)需要用到 attrs 來加入而不是props { title: '操作', key: 'action', align: 'center', render: function (h, params) { return h('div', [ h('
導(dǎo)讀vue iview組件表格 render函數(shù)的使用方法詳解:如果要在標(biāo)簽中加入屬性,例如img 中src屬性 a標(biāo)簽中href屬性 此時(shí)需要用到 attrs 來加入而不是props { title: '操作', key: 'action', align: 'center', render: function (h, params) { return h('div', [ h('

如果要在標(biāo)簽中加入屬性,例如img 中src屬性 a標(biāo)簽中href屬性 此時(shí)需要用到
attrs 來加入而不是props
{
title: '操作',
key: 'action',
align: 'center',
render: function (h, params) {
return h('div', [
h('Button', {
props: {
type: 'primary',
size: 'small'
},
style: {
marginRight: '8px'
},
on: {
click: function () {
mCheck.singleShow(params.row);
}
}
}, '查看'),
h('Button', {
props: {
type: 'error',
size: 'small'
},
on: {
click: function () {
mCheck.singleDel(params.row, params.index);
}
}
}, '刪除')
]);
}
}
以上這篇vue iview組件表格 render函數(shù)的使用方法詳解就是小編分享給大家的全部內(nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com
vue iview組件表格 render函數(shù)的使用方法詳解
vue iview組件表格 render函數(shù)的使用方法詳解:如果要在標(biāo)簽中加入屬性,例如img 中src屬性 a標(biāo)簽中href屬性 此時(shí)需要用到 attrs 來加入而不是props { title: '操作', key: 'action', align: 'center', render: function (h, params) { return h('div', [ h('