智慧水务管理系统 - 精河县供水工程综合管理平台

index.d.ts 1.6KB

12345678910111213141516171819202122232425262728293031323334
  1. import { EpPropFinalized } from "../../utils/vue/props/types.js";
  2. import * as _$vue from "vue";
  3. import { InjectionKey, Ref } from "vue";
  4. //#region ../../packages/hooks/use-empty-values/index.d.ts
  5. type ValueOnClear = string | number | boolean | Function | null;
  6. interface UseEmptyValuesProps {
  7. /**
  8. * @description empty values supported by the component
  9. */
  10. emptyValues?: unknown[];
  11. /**
  12. * @description return value when cleared, if you want to set `undefined`, use `() => undefined`
  13. */
  14. valueOnClear?: ValueOnClear;
  15. }
  16. declare const emptyValuesContextKey: InjectionKey<Ref<UseEmptyValuesProps>>;
  17. declare const SCOPE = "use-empty-values";
  18. declare const DEFAULT_EMPTY_VALUES: (string | null | undefined)[];
  19. declare const DEFAULT_VALUE_ON_CLEAR: undefined;
  20. /**
  21. * @deprecated Removed after 3.0.0, Use `UseEmptyValuesProps` instead.
  22. */
  23. declare const useEmptyValuesProps: {
  24. readonly emptyValues: ArrayConstructor;
  25. readonly valueOnClear: EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown, undefined, boolean>;
  26. };
  27. declare const useEmptyValues: (props: UseEmptyValuesProps, defaultValue?: null | undefined) => {
  28. emptyValues: _$vue.ComputedRef<unknown[]>;
  29. valueOnClear: _$vue.ComputedRef<any>;
  30. isEmptyValue: (value: unknown) => boolean;
  31. };
  32. //#endregion
  33. export { DEFAULT_EMPTY_VALUES, DEFAULT_VALUE_ON_CLEAR, SCOPE, UseEmptyValuesProps, emptyValuesContextKey, useEmptyValues, useEmptyValuesProps };