We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问题描述 vue2中 provide/inject 用法,provide一个对象,h5中可以实现响应式,小程序异常
复现步骤
// TestPage.vue <template> <view> <view>TestPage num:{{ num }}</view> <button @click="num += 1"> + </button> <TestCom /> </view> </template> <script> import TestCom from './TestCom.vue'; export default { components: { TestCom }, provide() { return { TestPage: this }; }, data() { return { num: 1, }; }, }; </script>
// TestCom.vue <template> <view> TestCom num: {{ TestPage.num }} <view /> </view> </template> <script> export default { inject: ['TestPage'], created() { console.log(this.TestPage.num); }, }; </script>
预期结果 h5中可以实现响应式
实际结果 微信小程序中异常
系统信息:
补充信息 如果是产品特性应该在文档内明确指出,免得开发者掉坑里出不来 .
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题描述
vue2中 provide/inject 用法,provide一个对象,h5中可以实现响应式,小程序异常
复现步骤
预期结果
h5中可以实现响应式
实际结果
微信小程序中异常
系统信息:
补充信息
如果是产品特性应该在文档内明确指出,免得开发者掉坑里出不来
.The text was updated successfully, but these errors were encountered: