feat .calude
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
---
|
||||
category: Component
|
||||
---
|
||||
|
||||
# tryOnScopeDispose
|
||||
|
||||
Safe `onScopeDispose`. Call `onScopeDispose()` if it's inside an effect scope lifecycle, if not, do nothing
|
||||
|
||||
## Usage
|
||||
|
||||
```ts
|
||||
import { tryOnScopeDispose } from '@vueuse/core'
|
||||
|
||||
tryOnScopeDispose(() => {
|
||||
|
||||
})
|
||||
```
|
||||
|
||||
## Type Declarations
|
||||
|
||||
```ts
|
||||
/**
|
||||
* Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing
|
||||
*
|
||||
* @param fn
|
||||
*/
|
||||
export declare function tryOnScopeDispose(
|
||||
fn: Fn,
|
||||
failSilently?: boolean,
|
||||
): boolean
|
||||
```
|
||||
Reference in New Issue
Block a user