-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1241 from AdamCaoQAQ/feat_hummer_mode
feat: hummer mode setup support
- Loading branch information
Showing
3 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { | ||
effectScope as vueEffectScope, | ||
getCurrentScope as getCurrentVueScope, | ||
onScopeDispose | ||
} from 'vue' | ||
|
||
export { | ||
// watch | ||
watchEffect, | ||
watchSyncEffect, | ||
watchPostEffect, | ||
watch, | ||
// reactive | ||
reactive, | ||
isReactive, | ||
shallowReactive, | ||
set, | ||
del, | ||
markRaw, | ||
// ref | ||
ref, | ||
unref, | ||
toRef, | ||
toRefs, | ||
isRef, | ||
customRef, | ||
shallowRef, | ||
triggerRef, | ||
// computed | ||
computed, | ||
// instance | ||
getCurrentInstance | ||
} from 'vue' | ||
|
||
const noop = () => { | ||
} | ||
|
||
const fixEffectScope = (scope) => { | ||
scope.pause = noop | ||
scope.resume = noop | ||
} | ||
|
||
const effectScope = (detached) => fixEffectScope(vueEffectScope(detached)) | ||
const getCurrentScope = () => fixEffectScope(getCurrentVueScope()) | ||
|
||
export { | ||
// effectScope | ||
effectScope, | ||
getCurrentScope, | ||
onScopeDispose | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters