Error in nextTick: "RangeError: Maximum call stack size exceeded"

vue yekong 951℃

vue项目报Error in nextTick: "RangeError: Maximum call stack size exceeded"错误,排查发现,当前组件名和被引用的组件名称一样

将 name: "item1",改成其他避免和引用的组件重名即可

<template>
  <div class="item6body">
    <item1></item1>
    <item2></item2>
    <item3></item3>
  </div>
</template>

<script>
import item1 from './item6/item1'
import item2 from './item6/item2'
import item3 from './item6/item3'

export default {
  name: "item1",
  components: {item1, item2, item3},
}
</script>

修改后

<template>
  <div class="item6body">
    <item1></item1>
    <item2></item2>
    <item3></item3>
  </div>
</template>

<script>
import item1 from './item6/item1'
import item2 from './item6/item2'
import item3 from './item6/item3'

export default {
  name: "items",
  components: {item1, item2, item3},
}
</script>
喜欢 (0)