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">&nbsp;&nbsp;</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 及以上版本。

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐