antd-mini
Version:
antd-mini 是支付宝小程序 UI 组件库,遵循 Ant Design 规范。
37 lines (36 loc) • 1.05 kB
JavaScript
// @ts-nocheck
import { Component, getValueFromProps, triggerEvent, triggerEventOnly, } from '../_util/simply';
import { SenderProps } from './props';
Component(SenderProps, {
handleMainBtn: function () {
var loading = getValueFromProps(this, ['loading'])[0];
if (loading) {
this.handleCancel();
}
else {
this.handleSubmit();
}
},
handleConfirm: function () {
var value = getValueFromProps(this, ['value'])[0];
triggerEvent(this, 'confirm', value);
},
handleSubmit: function () {
var value = getValueFromProps(this, ['value'])[0];
triggerEvent(this, 'submit', value);
},
handleCancel: function () {
triggerEventOnly(this, 'cancel');
},
handleInput: function (e) {
triggerEvent(this, 'change', e.detail.value);
},
handleFocus: function () {
triggerEvent(this, 'focus');
},
handleBlur: function () {
triggerEvent(this, 'blur');
},
}, {}, [], {
multipleSlots: true,
});