关于在vue项目中二次封装组件时如果全局注册组件
import elUpload from './components/elUpload/index.vue'
Vue.component('elUpload', elUpload)
然后再模块中使用
<template>
<div class="bg">
<elUpload />
</div>
</template>
会报错[Vue warn]: Error in nextTick: “InternalError: too much recursion”
Nextick中的错误:“InternalError:递归过多”
而在模块中局部注册就可以正常运行了
<template>
<div class="bg">
<elUpload />
</div>
</template>
<script>
import elUpload from '@/components/elUpload'
import { GetStorage } from '@/utils/auth'
import { mapActions } from 'vuex'
export default {
components: { elUpload },
data() {