uniapp develops WeChat applet v-bind to pass the function to the sub-component. The this in the function is not the parent component and the second is the this of the sub-component.

Solution: The subcomponent caches the subcomponent this and then uses bind to rewrite this

Because this method defines the global variable that, the variable can only be used once, otherwise it will be overwritten by assignment.

Either abandon the v-bind incoming function and use emit to pass in custom events.

[uniapp] uview(1.x) secondary encapsulation of u-navbar leads to :custom-back function this.$emit / this.$props failure problem handling_iOSTianNan's blog-CSDN blog

Guess you like

Origin blog.csdn.net/m0_57033755/article/details/134139404