From a9aa35e3ae92cb4e3753875b3b938df788903a84 Mon Sep 17 00:00:00 2001 From: tiantian010110 Date: Sat, 15 Jan 2022 21:15:46 +0800 Subject: [PATCH] Update u-radio.vue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复94行错误 --- uview-ui/components/u-radio/u-radio.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uview-ui/components/u-radio/u-radio.vue b/uview-ui/components/u-radio/u-radio.vue index 1d9a439e..388218bf 100644 --- a/uview-ui/components/u-radio/u-radio.vue +++ b/uview-ui/components/u-radio/u-radio.vue @@ -91,7 +91,9 @@ this.parent = false; // 支付宝小程序不支持provide/inject,所以使用这个方法获取整个父组件,在created定义,避免循环引用 this.updateParentData(); - this.parent.children.push(this); + // this.parent.children.push(this); parent已经是false,应该是$parent.$children + // 如果父组件不是u-radio-group呢,是不是也有问题? + this.$parent.$children.push(this); }, computed: { // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置