line_push/node_modules/vuetify/es5/components/VDatePicker/util/eventHelpers.js
2022-07-17 13:16:16 +08:00

30 lines
892 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createItemTypeNativeListeners = createItemTypeNativeListeners;
exports.createItemTypeListeners = createItemTypeListeners;
function createItemTypeNativeListeners(instance, itemTypeSuffix, value) {
return Object.keys(instance.$listeners).reduce(function (on, eventName) {
if (eventName.endsWith(itemTypeSuffix)) {
on[eventName.slice(0, -itemTypeSuffix.length)] = function (event) {
return instance.$emit(eventName, value, event);
};
}
return on;
}, {});
}
function createItemTypeListeners(instance, itemTypeSuffix) {
return Object.keys(instance.$listeners).reduce(function (on, eventName) {
if (eventName.endsWith(itemTypeSuffix)) {
on[eventName] = instance.$listeners[eventName];
}
return on;
}, {});
}
//# sourceMappingURL=eventHelpers.js.map