iview render的时候可以写控件的基本格式

render : ( h, params) => {
return h( 'div', [
h( 'Button', {
props: {
type: 'id',
size: 'small'
},
style: {
marginRight: '5px'
},
on: {
click : () => {
this. pojectshow( this. datatable[ params. index]. id)
}
}
}, '详情'),
h( 'Button', {
props: {
type: 'id',
size: 'small'
},
style: {
marginRight: '5px'
},
on: {
click : () => {
this. pojectshow( this. datatable[ params. index]. id)
}
}
}, '看板'),
h( 'div', {
props: {
type: 'id',
size: 'small'
},
style: {
marginRight: '5px',
color: 'red'
},
on: {
click : () => {
this. pojectshow( this. datatable[ params. index]. id)
}
}
}, '测试' + this. datatable[ params. index]. id)

])
}

猜你喜欢

转载自blog.csdn.net/hanghangaidoudou/article/details/80684509