美文网首页
iview table表格中render函数操作返回标签

iview table表格中render函数操作返回标签

作者: _Struggle_ | 来源:发表于2020-05-29 15:47 被阅读0次
 {
                title: '操作',
                key: 'action',
                fixed: 'right',
                width: 150,
                render: (h, params) => {
                //params.row.credit_sernos判断没一行是否返回数据(一般都是后台返的json数据)返回数据,就执行返回按钮,没有就显示空。
                  return h('div', [
                    h('Button', {
                          props: {
                              type: 'primary',
                              size: 'small'
                          },
                          style: {
                              marginRight: '5px'
                          },
                          on: {
                              click: () => {
                                  this.lookProject(params.row)
                              }
                          }
                      }, '查看项目'),
                      h('Button', {
                          props: {
                              type: 'primary',
                              size: 'small'
                          },
                          style: {
                              marginRight: '5px'
                          },
                          on: {
                              click: () => {
                                  this.del(params.row, params.index)
                              }
                          }
                      }, '删除')
                  ]);
                }

相关文章

网友评论

      本文标题:iview table表格中render函数操作返回标签

      本文链接:https://www.haomeiwen.com/subject/kutfzhtx.html