1. 问题描述
在 vue3 中使用 <el-select> 出现以下错误。
<el-select v-model="registerData.country" placeholder="Select" style="width: 80px;margin-right: 3px;">
<el-option
v-for="item in counties"
:key="item.value"
:label="item.value"
:value="item.value">
<span style="float: left">{{ item.label }}</span>
<span style="float: left"> </span>
<span style="float: right;color: var(--el-text-color-secondary);">
{{ item.value }}
</span>
</el-optio>
</el-select>
Uncaught (in promise) Maximum recursive updates exceeded in component <ElSelectDropdown>.This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.
2. 解决方法
https://github.com/vuejs/core/issues/11712
该问题属于 vue 的 bug,以被修复,使用 vue 3.5.2 及以上版本。