jiaqingjiayi-xiaochengxu/甲情_甲意/node_modules/antd-mini/es/Checkbox/index.js

18 lines
495 B
JavaScript
Raw Normal View History

2024-11-15 03:51:28 +00:00
import { CheckboxDefaultProps } from './props';
import { Component, triggerEvent } from '../_util/simply';
import mixinValue from '../mixins/value';
Component(CheckboxDefaultProps, {
onChange: function (e) {
var value = !this.getValue();
if (!this.isControlled()) {
this.update(value);
}
triggerEvent(this, 'change', value, e);
},
}, null, [
mixinValue({
valueKey: 'checked',
defaultValueKey: 'defaultChecked',
}),
]);