(fn: Fn, sync = true, target?: ComponentInternalInstance | null)
| 12 | * @param target |
| 13 | */ |
| 14 | export function tryOnMounted(fn: Fn, sync = true, target?: ComponentInternalInstance | null) { |
| 15 | const instance = getLifeCycleTarget(target) |
| 16 | if (instance) |
| 17 | onMounted(fn, target) |
| 18 | else if (sync) |
| 19 | fn() |
| 20 | else |
| 21 | nextTick(fn) |
| 22 | } |
no test coverage detected