Source: vue-imready/src/vue-imready/useReady.ts

  1. import { ImReadyReactiveProps } from "@egjs/imready";
  2. import { useImReady, VueImReadyResult } from "./useImReady";
  3. /**
  4. * Vue hook to check if the images or videos are loaded. (only `useReady` and `useError` are true) Since this is deprecated, use useImReady instead.
  5. * @ko 이미지와 비디오들이 로드가 됐는지 체크하는 vue hook.(`useReady`와 `useError`만 true) deprecated 되었으므로 useImReady를 이용해주세요.
  6. * @deprecated
  7. * @memberof VueImReady
  8. * @param - Vue ImReady's props <ko>Vue ImReady의 props.</ko>
  9. * @example
  10. * ```js
  11. * import { useReady } from "@egjs/vue-imready";
  12. *
  13. * setup() {
  14. * const im = useReady({
  15. * selector: "img",
  16. * });
  17. *
  18. * return {
  19. * im,
  20. * }
  21. * }
  22. * // {{im.isReady}}
  23. * // &lt;div v-bind:ref="im.register()"&gt;&lt;/div&gt;
  24. * ```
  25. */
  26. export function useReady(
  27. props: Partial<ImReadyReactiveProps> = {}
  28. ): VueImReadyResult {
  29. return useImReady(props);
  30. }
comments powered by Disqus