iview table里面 插入下拉列表组件(自定义组件)一定要加key,不加key,table开始会加载所有数据,然后再从第2页点回第一页,就会走onChange事件,混乱的逻辑,切记加:key
关键字:key
<template slot-scope="{ row, index }" slot="belongDept" v-if="belongDeptVif"> <sysSelectBelongDept v-model="row.belongDept" :disabled="getDisabled(row)" :key="row.id" :bdRow="row" @onChangeEmit="belongDeptOnChange"></sysSelectBelongDept> <!--<Button type="primary" size="small" style="margin-right: 5px" @click="show(index)">View</Button>--> <!--<Button type="error" size="small" @click="remove(index)">Delete</Button>--> </template>