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
|
@ -8,11 +8,13 @@
|
|||
</template>
|
||||
<script>
|
||||
import { oneOf } from '../../utils/assist';
|
||||
import Emitter from '../../mixins/emitter';
|
||||
|
||||
const prefixCls = 'ivu-switch';
|
||||
|
||||
export default {
|
||||
name: 'Switch',
|
||||
mixins: [ Emitter ],
|
||||
props: {
|
||||
value: {
|
||||
type: Boolean,
|
||||
|
@ -58,8 +60,7 @@
|
|||
this.currentValue = checked;
|
||||
this.$emit('input', checked);
|
||||
this.$emit('on-change', checked);
|
||||
// todo 事件
|
||||
// this.$dispatch('on-form-change', this.checked);
|
||||
this.dispatch('FormItem', 'on-form-change', data.checked);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue