Created
July 5, 2021 10:34
-
-
Save Purecaesar/fffe1c0f6e30adcdd989bbc96cf96d97 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
... | |
return { | |
get() { | |
if (!inited) { | |
inited = true; | |
triger.next(); | |
} | |
return originalDescriptor | |
? originalDescriptor.get.call(target) | |
: routerData; | |
}, | |
set(value: any) { | |
routerData = value; | |
if (originalDescriptor) originalDescriptor.set.call(target, routerData); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment