tryOnBeforeMount 
安全な`onBeforeMount`。コンポーネントのライフサイクル内にある場合は`onBeforeMount()`を呼び出し、そうでない場合は関数を直接呼び出します。
使用方法 
js
import { tryOnBeforeMount } from '@vueuse/core'
tryOnBeforeMount(() => {
})型定義 
typescript
/**
 * Call onBeforeMount() if it's inside a component lifecycle, if not, just call the function
 *
 * @param fn
 * @param sync if set to false, it will run in the nextTick() of Vue
 * @param target
 */
export declare function tryOnBeforeMount(
  fn: Fn,
  sync?: boolean,
  target?: any,
): void