Home > Web Front-end > JS Tutorial > body text

Detailed explanation of how to use the render function of the vue iview component table

亚连
Release: 2018-05-30 10:53:03
Original
5006 people have browsed it

Below I will share with you a detailed explanation of how to use the render function of the vue iview component table. It has a good reference value and I hope it will be helpful to everyone.

If you want to add attributes to the tag, such as the src attribute in img and the href attribute in a tag, you need to use

attrs to add instead of props

{
 title: '操作',
 key: 'action',
 align: 'center',
 render: function (h, params) {
 return h('p', [
  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);
   }
  }
  }, '删除')
 ]);
 }
}
Copy after login

The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

JavaScript code to implement the upload preview function of txt files

Angular uses the operation event command ng-click Example of passing multiple parameters

Angular uses filter uppercase/lowercase to implement letter case conversion function example

The above is the detailed content of Detailed explanation of how to use the render function of the vue iview component table. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!