Skip to content

Commit ce40b26

Browse files
huangxiaojie02kagol
authored andcommitted
fix: #1439
1 parent 967cd0a commit ce40b26

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/devui-vue/devui/mention/src/mention.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineComponent, ref, onMounted, watch, onUnmounted, nextTick, computed, getCurrentInstance } from 'vue';
1+
import { defineComponent, ref, onMounted, watch, onUnmounted, computed, getCurrentInstance } from 'vue';
22
import { IMentionSuggestionItem, mentionProps, type MentionProps } from './mention-types';
33
import DTextarea from '../../textarea/src/textarea';
44
import DIcon from '../../icon/src/icon';
@@ -30,10 +30,10 @@ export default defineComponent({
3030
if (props.trigger.includes(val[0])) {
3131
showSuggestions.value = true;
3232
if (props.position === 'top') {
33-
nextTick(() => {
33+
setTimeout(() => {
3434
const height = window.getComputedStyle(suggestionsDom.value as Element, null).height;
3535
suggestionsTop.value = -Number(height.replace('px', ''));
36-
});
36+
}, 0);
3737
}
3838
filteredSuggestions.value = (suggestions.value as IMentionSuggestionItem[]).filter((item: IMentionSuggestionItem) =>
3939
String(item[props.dmValueParse.value as keyof IMentionSuggestionItem])

0 commit comments

Comments
 (0)