Created
March 23, 2018 09:00
-
-
Save manico/e7732835d259c07a90e20175ae86f584 to your computer and use it in GitHub Desktop.
Vue Render Merge
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
Vue.config.optionMergeStrategies.render = (parentVal, childVal) => { | |
if (parentVal) { | |
const mergedParentVal = function render(...args) { | |
args.push([childVal.apply(this, args)]); | |
return parentVal.apply(this, args); | |
}; | |
return mergedParentVal; | |
} | |
return childVal; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment