@fast-china/utils 1.0.33 → 1.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14265,6 +14265,17 @@ var FastUtils = (function(exports, vue) {
14265
14265
  return "";
14266
14266
  }
14267
14267
  };
14268
+ const useEmits = (emits, emit, ignoreRawEmits) => {
14269
+ if (!emits) return vue.computed(() => ({}));
14270
+ return vue.computed(() => {
14271
+ const omittedRawEmits = emits ? omit(emits, ignoreRawEmits ?? []) : {};
14272
+ return Object.keys(omittedRawEmits).reduce((handlers, eventName) => {
14273
+ const handlerName = `on${eventName.split("-").map((part, index2) => index2 === 0 ? part.charAt(0).toUpperCase() + part.slice(1) : part.charAt(0).toUpperCase() + part.slice(1)).join("")}`;
14274
+ handlers[handlerName] = (...args) => emit(eventName, ...args);
14275
+ return handlers;
14276
+ }, {});
14277
+ });
14278
+ };
14268
14279
  const useExpose = (expose, exposed) => {
14269
14280
  expose(exposed);
14270
14281
  return exposed;
@@ -14361,6 +14372,7 @@ var FastUtils = (function(exports, vue) {
14361
14372
  exports.styleToString = styleToString;
14362
14373
  exports.throwError = throwError;
14363
14374
  exports.useConsole = useConsole;
14375
+ exports.useEmits = useEmits;
14364
14376
  exports.useExpose = useExpose;
14365
14377
  exports.useIdentity = useIdentity;
14366
14378
  exports.useProps = useProps;