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

@ -29,6 +29,7 @@
</template>
<script>
import { oneOf } from '../../utils/assist';
import Emitter from '../../mixins/emitter';
const prefixCls = 'ivu-input-number';
const iconPrefixCls = 'ivu-icon';
@ -62,6 +63,7 @@
export default {
name: 'InputNumber',
mixins: [ Emitter ],
props: {
max: {
type: Number,
@ -201,8 +203,7 @@
this.currentValue = val;
this.$emit('input', val);
this.$emit('on-change', val);
// todo
// this.$dispatch('on-form-change', val);
this.dispatch('FormItem', 'on-form-change', val);
});
},
focus () {