Skip to content

Table customRow dbclick dosen't work! #1437

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

Closed
1 task done
unique-craftsman opened this issue Nov 19, 2019 · 2 comments
Closed
1 task done

Table customRow dbclick dosen't work! #1437

unique-craftsman opened this issue Nov 19, 2019 · 2 comments
Labels

Comments

@unique-craftsman
Copy link

unique-craftsman commented Nov 19, 2019

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

Version

1.4.5

Environment

vue: 2.6.10,ant-design-vue:1.4.5,浏览器版本:chrome 77.0.3865.75(正式版本) (64 位)

Reproduction link

Edit on CodeSandbox

Steps to reproduce

<template>
<a-table
:columns="columns"
:rowKey="record => { return record.INDEX;}"
:dataSource="tableData"
:customRow="customClick"
/>
</template>
<script>
const columns = [
{
title: '序号',
dataIndex: 'INDEX'
},{
title: '主题大类',
dataIndex: 'THEME'
},{
title: '中文名称',
dataIndex: 'CN_NAME'
},{
title: '英文名称',
dataIndex: 'EN_NAME'
}
];
export default {
data () {
return {
columns,
tableData: [
{INDEX: 0, THEME: '基础数据', CN_NAME: '地址', EN_NAME: 'Address'},
{INDEX: 1, THEME: '基础数据', CN_NAME: '姓名', EN_NAME: 'Name'}
],
customClick: (record) => ({
on: {
click: () => {
window.console.log('click record:', record);
},
dbclick: () => {
window.console.log('doubleclick record:', record);
}
}
})
}
}
}
</script>

What is expected?

实现table行双击事件响应

What is actually happening?

单击事件click可以响应,双击dbclick事件不响应

@unique-craftsman
Copy link
Author

找到原因了,是文档的问题 https://www.antdv.com/components/table-cn/#api
应该是dblclick,文档写成dbclick了

@github-actions
Copy link

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 20, 2020
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