Skip to content

Commit e3f867b

Browse files
committed
fix: update dbclick to dblclick #1437
1 parent cece733 commit e3f867b

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

components/table/index.en-US.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Same as `customRow` `customHeaderRow` `customCell` `customHeaderCell`. Follow [V
8888
},
8989
on: {
9090
click: (event) => {}, // click row
91-
dbclick: (event) => {}, // double click row
91+
dblclick: (event) => {}, // double click row
9292
contextmenu: (event) => {} // right button click row
9393
mouseenter: (event) => {} // mouse enter row
9494
mouseleave: (event) => {} // mouse leave row

components/table/index.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const columns = [
8888
},
8989
on: { // 事件
9090
click: (event) => {}, // 点击行
91-
dbclick: (event) => {},
91+
dblclick: (event) => {},
9292
contextmenu: (event) => {},
9393
mouseenter: (event) => {}, // 鼠标移入行
9494
mouseleave: (event) => {}

components/tree/DirectoryTree.jsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import BaseMixin from '../_util/BaseMixin';
1010
import { initDefaultProps, getOptionProps } from '../_util/props-util';
1111
import { ConfigConsumerProps } from '../config-provider';
1212

13-
// export type ExpandAction = false | 'click' | 'dbclick'; export interface
13+
// export type ExpandAction = false | 'click' | 'dblclick'; export interface
1414
// DirectoryTreeProps extends TreeProps { expandAction?: ExpandAction; }
1515
// export interface DirectoryTreeState { expandedKeys?: string[];
1616
// selectedKeys?: string[]; }
@@ -33,7 +33,7 @@ export default {
3333
props: initDefaultProps(
3434
{
3535
...TreeProps(),
36-
expandAction: PropTypes.oneOf([false, 'click', 'doubleclick', 'dbclick']),
36+
expandAction: PropTypes.oneOf([false, 'click', 'doubleclick', 'dblclick']),
3737
},
3838
{
3939
showIcon: true,
@@ -104,12 +104,12 @@ export default {
104104
const { expandAction } = this.$props;
105105

106106
// Expand the tree
107-
if (expandAction === 'dbclick' || expandAction === 'doubleclick') {
107+
if (expandAction === 'dblclick' || expandAction === 'doubleclick') {
108108
this.onDebounceExpand(event, node);
109109
}
110110

111111
this.$emit('doubleclick', event, node);
112-
this.$emit('dbclick', event, node);
112+
this.$emit('dblclick', event, node);
113113
},
114114

115115
onSelect(keys, event) {
@@ -185,7 +185,7 @@ export default {
185185
const { _expandedKeys: expandedKeys, _selectedKeys: selectedKeys } = this.$data;
186186
warning(
187187
!this.$listeners.doubleclick,
188-
'`doubleclick` is deprecated. please use `dbclick` instead.',
188+
'`doubleclick` is deprecated. please use `dblclick` instead.',
189189
);
190190
const treeProps = {
191191
props: {
@@ -201,7 +201,7 @@ export default {
201201
...omit(this.$listeners, ['update:selectedKeys']),
202202
select: this.onSelect,
203203
click: this.onClick,
204-
dbclick: this.onDoubleClick,
204+
dblclick: this.onDoubleClick,
205205
expand: this.onExpand,
206206
},
207207
};

components/tree/index.en-US.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ One of the Tree `treeNode` prop for describing the tree's node, TreeNode has the
6666

6767
| Property | Description | Type | Default |
6868
| ------------ | ------------------------------------------------------------ | ------ | ------- |
69-
| expandAction | Directory open logic, optional `false` `'click'` `'dbclick'` | string | click |
69+
| expandAction | Directory open logic, optional `false` `'click'` `'dblclick'` | string | click |
7070

7171
## FAQ
7272

components/tree/index.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666

6767
| 参数 | 说明 | 类型 | 默认值 |
6868
| ------------ | ------------------------------------------------ | ------ | ------ |
69-
| expandAction | 目录展开逻辑,可选 `false` `'click'` `'dbclick'` | string | click |
69+
| expandAction | 目录展开逻辑,可选 `false` `'click'` `'dblclick'` | string | click |
7070

7171
## FAQ
7272

components/vc-cascader/Menus.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default {
6161
},
6262
on: {
6363
click: onSelect,
64-
dbclick: onItemDoubleClick,
64+
dblclick: onItemDoubleClick,
6565
mousedown: e => e.preventDefault(),
6666
},
6767
key: Array.isArray(key) ? key.join('__ant__') : key,

components/vc-table/demo/rowAndCellClick.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export default {
116116
customRow={(record, index) => ({
117117
on: {
118118
click: onRowClick.bind(null, record, index),
119-
dbclick: onRowDoubleClick.bind(null, record, index),
119+
dblclick: onRowDoubleClick.bind(null, record, index),
120120
},
121121
})}
122122
/>

components/vc-tree/src/Tree.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ const Tree = {
380380
},
381381

382382
onNodeDoubleClick(e, treeNode) {
383-
this.__emit('dbclick', e, treeNode);
383+
this.__emit('dblclick', e, treeNode);
384384
},
385385

386386
onNodeSelect(e, treeNode) {

types/tree/dictionary-tree.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Tree } from './tree';
77

88
export declare class DictionaryTree extends Tree {
99
/**
10-
* Directory open logic, optional false 'click' 'doubleclick'
10+
* Directory open logic, optional false 'click' 'dblclick'
1111
* @default 'click'
1212
* @type string
1313
*/

0 commit comments

Comments
 (0)