fixed bug under Vue 2.4.1

This commit is contained in:
梁灏 2017-07-14 15:13:09 +08:00
parent 68b308ee83
commit e6e970352d
2 changed files with 55 additions and 264 deletions

View file

@ -3,7 +3,7 @@
<ul v-if="data && data.length" :class="[prefixCls + '-menu']">
<Casitem
v-for="item in data"
:key="item"
:key="getKey()"
:prefix-cls="prefixCls"
:data="item"
:tmp-item="tmpItem"
@ -17,6 +17,8 @@
import Emitter from '../../mixins/emitter';
import { findComponentUpward } from '../../utils/assist';
let key = 1;
export default {
name: 'Caspanel',
mixins: [ Emitter ],
@ -109,6 +111,9 @@
} else {
this.$parent.$parent.updateResult(result);
}
},
getKey () {
return key++;
}
},
mounted () {