简体   繁体   中英

Vue Infinite Update Loop in Component Render Function

I am getting Vue warning as

infinite update loop in component render function

. I am writing a unit test and getting this warning. I am using Vuetify's data table for displaying data. My code is as follows:

<template>
  <v-data-table
    id="permission-table"
    v-model="selected"
    :headers="headers"
    :items="users"
    :items-per-page="10"
    class="elevation-1"
  >
    <template v-slot:header.admin="{ header }">
      <roles-tool-tip
        :description="header.description"
      />
      <span> {{header.text}}</span>
    </template>
<template v-slot:item.admin="{ item }">
      <v-checkbox class="cb-center cb-admin" v-model="item.admin" @change="updateUserPermission(item)"></v-checkbox>
    </template>
</v-data-table>
</template>

如果您使用的是 Vue Test Utils >v1.0.0-beta29 版本,您可能会遇到这个问题: https : //github.com/vuejs/vue-test-utils/issues/1407

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM