mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(editor): datasource自动补全用鼠标操作出错
This commit is contained in:
parent
f9ba8b8df5
commit
7b2fd6ebd4
@ -16,7 +16,6 @@
|
||||
"
|
||||
style="width: 100%"
|
||||
@blur="blurHandler"
|
||||
@change="changeHandler"
|
||||
@input="inputHandler"
|
||||
@select="selectHandler"
|
||||
>
|
||||
@ -111,6 +110,8 @@ const blurHandler = () => {
|
||||
isFocused.value = false;
|
||||
|
||||
setDisplayState();
|
||||
|
||||
emit('change', state.value);
|
||||
};
|
||||
|
||||
const changeHandler = (v: string) => {
|
||||
@ -314,5 +315,7 @@ const selectHandler = async ({ value, type }: { value: string; type: 'dataSource
|
||||
newSelectionStart = dotIndex + suggestText.length + 1;
|
||||
}
|
||||
input.value?.setSelectionRange(newSelectionStart, newSelectionStart);
|
||||
|
||||
changeHandler(state.value);
|
||||
};
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user