Skip to content

Commit a42a193

Browse files
committed
fix: mentions keyDown didn't work
1 parent 5339c08 commit a42a193

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

components/vc-mentions/src/Mentions.jsx

+2-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import classNames from 'classnames';
21
import omit from 'omit.js';
32
import KeyCode from '../../_util/KeyCode';
43
import BaseMixin from '../../_util/BaseMixin';
@@ -32,17 +31,8 @@ const Mentions = {
3231
},
3332
props: initDefaultProps(vcMentionsProps, defaultProps),
3433
provide() {
35-
const { notFoundContent } = this.$props;
36-
const { activeIndex } = this.$data;
3734
return {
38-
mentionsContext: {
39-
notFoundContent,
40-
activeIndex,
41-
setActiveIndex: this.setActiveIndex,
42-
selectOption: this.selectOption,
43-
onFocus: this.onDropdownFocus,
44-
onBlur: this.onDropdownBlur,
45-
},
35+
mentionsContext: this,
4636
};
4737
},
4838
data() {
@@ -289,7 +279,7 @@ const Mentions = {
289279
const options = measuring ? this.getOptions() : [];
290280

291281
return (
292-
<div class={classNames(prefixCls)} style={getStyle(this)}>
282+
<div class={prefixCls} style={getStyle(this)}>
293283
<textarea
294284
ref="textarea"
295285
{...{

0 commit comments

Comments
 (0)