some comps support dispatch event to FormItem

some comps support dispatch event to FormItem
This commit is contained in:
梁灏 2017-03-09 11:14:40 +08:00
parent 7778edfa02
commit cd78c9c488
14 changed files with 57 additions and 48 deletions

View file

@ -44,10 +44,12 @@
import List from './list.vue';
import Operation from './operation.vue';
import { t } from '../../locale';
import Emitter from '../../mixins/emitter';
const prefixCls = 'ivu-transfer';
export default {
mixins: [ Emitter ],
render (createElement) {
function cloneVNode (vnode) {
@ -256,8 +258,11 @@
this.$refs[opposite].toggleSelectAll(false);
this.$emit('on-change', newTargetKeys, direction, moveKeys);
// todo
// this.$dispatch('on-form-change', newTargetKeys, direction, moveKeys);
this.dispatch('FormItem', 'on-form-change', {
tarketKeys: newTargetKeys,
direction: direction,
moveKeys: moveKeys
});
},
handleLeftCheckedKeysChange (keys) {
this.leftCheckedKeys = keys;