-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Description
- 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' }
],
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 {
on: {
click: (event) => { console.log(1) },
dblclick: (event) => { console.log(1) },
contextmenu: (event) => { console.log(1) },
mouseenter: (event) => { console.log(1) },
mouseleave: (event) => { console.log(1) },
},
}
}
return { ...toRefs(info), test }
},
})
</script>
What is expected?
属性事件触发
What is actually happening?
table中customRow 属性中事件不触发