2024-12-01 11:56:54 +00:00
|
|
|
import { Component, triggerEvent } from '../_util/simply';
|
|
|
|
import { RadioDefaultProps } from './props';
|
|
|
|
import mixinValue from '../mixins/value';
|
|
|
|
Component(RadioDefaultProps, {
|
|
|
|
onChange: function (e) {
|
|
|
|
var value = e.detail.value;
|
|
|
|
if (!this.isControlled()) {
|
|
|
|
this.update(value);
|
2024-11-10 07:01:22 +00:00
|
|
|
}
|
2024-12-01 11:56:54 +00:00
|
|
|
triggerEvent(this, 'change', value, e);
|
2024-11-10 07:01:22 +00:00
|
|
|
},
|
2024-12-01 11:56:54 +00:00
|
|
|
}, null, [
|
|
|
|
mixinValue({
|
|
|
|
valueKey: 'checked',
|
|
|
|
defaultValueKey: 'defaultChecked',
|
|
|
|
}),
|
|
|
|
]);
|