当前位置:网站首页>A-table mouse over the display hand, the current line can be clicked

A-table mouse over the display hand, the current line can be clicked

2022-06-25 04:18:00 Angry devil

 demand : When you mouse over a single row of a table , Small hands appear , Clicking time , You can jump to the edit page 
 Document address :https://antdv.com/components/table-cn/
 Practical operation :
<template>
    <a-table
      :loading="loading"
      :columns="columns"
      :data-source="dataSource.list"
      rowKey="Id"
      :pagination="paginationSet"
      :locale="locale"
      v-if="!cardloading"
      :customRow="click"  //  Key points 
    >
    <!--  Business content  -->
    </a-table>
</template>
<script>
 export default {
    methods: {
      toEdit (Id) {
        this.$router.push({ path: '/route/EditRoute', query: { pId: Id } })
      },
      click (record, index) {
        return {
          style: {
            'cursor': 'pointer'
          },
          on: {
            click: () => {
              console.log(record, index)
              this.toEdit(record.Id)
            }
          }
        }
      }
    }
 }
</script>

 

原网站

版权声明
本文为[Angry devil]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202210535178859.html