Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

table customRow 属性中事件不触发 #3121

Closed
1 task
wzohxia opened this issue Nov 4, 2020 · 1 comment
Closed
1 task

table customRow 属性中事件不触发 #3121

wzohxia opened this issue Nov 4, 2020 · 1 comment
Labels

Comments

@wzohxia
Copy link

wzohxia commented Nov 4, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.0.0-beta.13

Environment

vite rc9 vue3.0.2 Chrome86.0.4240.75

Reproduction link

https://2x.antdv.com/components/table-cn/

Steps to reproduce

<template>
  <a-table :columns="columns" :data-source="source" :customRow="test"></a-table>
</template>

<script>
import { reactive, toRef, defineComponent, toRefs } from 'vue'
export default defineComponent({
  name: 'App',
  setup() {
    const info = reactive({
      columns: [
        { dataIndex: 'name', key: 'name' },
        { title: 'Age', dataIndex: 'age', key: 'age' },
        { title: 'Address', dataIndex: 'address', key: 'address' },
        { title: 'Action', key: 'action' },
      ],
      source: [
        {
          key: '1',
          name: 'John Brown',
          age: 32,
          address: 'New York No. 1 Lake Park',
        },
        {
          key: '2',
          name: 'Jim Green',
          age: 42,
          address: 'London No. 1 Lake Park',
        },
        {
          key: '3',
          name: 'Joe Black',
          age: 32,
          address: 'Sidney No. 1 Lake Park',
        },
      ],
    })

    const test = (record) => {
      return {
        onClick: (event) => {
          console.log(1)
        },
      }
    }

    return { ...toRefs(info), test }
  },
})
</script>

What is expected?

属性事件触发

What is actually happening?

table中customRow 属性中事件不触发

@github-actions
Copy link

github-actions bot commented Nov 6, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants