some comps support dispatch event to FormItem
some comps support dispatch event to FormItem
This commit is contained in:
parent
7778edfa02
commit
cd78c9c488
14 changed files with 57 additions and 48 deletions
|
@ -4,10 +4,12 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Emitter from '../../mixins/emitter';
|
||||
const prefixCls = 'ivu-checkbox-group';
|
||||
|
||||
export default {
|
||||
name: 'CheckboxGroup',
|
||||
mixins: [ Emitter ],
|
||||
props: {
|
||||
value: {
|
||||
type: Array,
|
||||
|
@ -46,8 +48,7 @@
|
|||
this.currentValue = data;
|
||||
this.$emit('input', data);
|
||||
this.$emit('on-change', data);
|
||||
// todo 事件
|
||||
// this.$dispatch('on-form-change', data);
|
||||
this.dispatch('FormItem', 'on-form-change', data);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
|
@ -22,10 +22,13 @@
|
|||
</label>
|
||||
</template>
|
||||
<script>
|
||||
import Emitter from '../../mixins/emitter';
|
||||
|
||||
const prefixCls = 'ivu-checkbox';
|
||||
|
||||
export default {
|
||||
name: 'Checkbox',
|
||||
mixins: [ Emitter ],
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
|
@ -106,8 +109,7 @@
|
|||
this.$parent.change(this.model);
|
||||
} else {
|
||||
this.$emit('on-change', checked);
|
||||
// todo 事件
|
||||
// this.$dispatch('on-form-change', checked);
|
||||
this.dispatch('FormItem', 'on-form-change', checked);
|
||||
}
|
||||
},
|
||||
updateModel () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue