jiaqingjiayi-xiaochengxu/甲情_甲意/miniprogram/node_modules/antd-mini/less/ActionSheet/index.js

24 lines
1.0 KiB
JavaScript
Raw Normal View History

2024-11-10 07:01:22 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var props_1 = require("./props");
var fmtEvent_1 = tslib_1.__importDefault(require("../_util/fmtEvent"));
Component({
props: props_1.ActionSheetDefaultProps,
methods: {
onAction: function (e) {
var _a = e.target.dataset, item = _a.item, index = _a.index;
if (item === null || item === void 0 ? void 0 : item.disabled)
return;
var _b = this.props, onClose = _b.onClose, onAction = _b.onAction;
var event = (0, fmtEvent_1.default)(this.props, e);
onClose === null || onClose === void 0 ? void 0 : onClose(event);
onAction === null || onAction === void 0 ? void 0 : onAction(item, index, event);
},
onClose: function (e) {
var onClose = this.props.onClose;
var event = (0, fmtEvent_1.default)(this.props, e);
onClose === null || onClose === void 0 ? void 0 : onClose(event);
}
}
});