Created
December 21, 2021 11:14
-
-
Save anish2690/633f313cec401fb381e3c974101b46e0 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
| Vue.prototype.$forceCompute= function(computedName, forceUpdate /* default: true */) { | |
| if (this._computedWatchers[computedName]) { | |
| this._computedWatchers[computedName].run(); | |
| if (forceUpdate || typeof forceUpdate == 'undefined') this.$forceUpdate() | |
| } | |
| } | |
| this.$forceCompute('title') | |
| this.$forceCompute('title', false) // No force update | |
| // https://github.com/vuejs/vue/issues/214#issuecomment-692064376 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment