

<template>
<el-select v-model="selectValue" placeholder="请输入" clearable style="width: 240px"
filterable remote :remote-method="querySearch"
@change="onSelectChange" reserve-keyword>
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</template>
<script setup>
import {ref} from "vue";
// 搜索框
let selectValue = ref('')
const options = [
{
value: 'Option1-value',
label: 'Option1-label',
},
{
value: 'Option2-value',
label: 'Option2-label',
}
]
const querySearch = (query) => {
console.log('querySearch', query)
}
const onSelectChange = (value) => {
console.log('onSelectChange', value)
}
</script>
<style scoped lang="scss">
</style>
下拉框选中内容后,光标在输入框最前面,且无法移动。
该如何让光标默然在后面
版本:
"dependencies": {
"@element-plus/icons-vue": "^2.3.1",
"axios": "^1.7.9",
"element-plus": "^2.9.0",
"pinia": "^2.3.0",
"pinia-plugin-persistedstate": "^4.1.3",
"vue": "^3.5.13",
"vue-router": "^4.5.0"
}