diff --git a/src/uni_modules/uview-plus/components/u-form-item/u-form-item.vue b/src/uni_modules/uview-plus/components/u-form-item/u-form-item.vue index 33112faa5..80a7a1a3e 100644 --- a/src/uni_modules/uview-plus/components/u-form-item/u-form-item.vue +++ b/src/uni_modules/uview-plus/components/u-form-item/u-form-item.vue @@ -115,7 +115,8 @@ labelWidth: 45, // 错误提示方式 errorType: 'message' - } + }, + color: color } }, // 组件创建完成时,将当前实例保存到u-form中 @@ -131,7 +132,6 @@ methods: { addStyle, addUnit, - color, init() { // 父组件的实例 this.updateParentData() diff --git a/src/uni_modules/uview-plus/components/u-steps-item/u-steps-item.vue b/src/uni_modules/uview-plus/components/u-steps-item/u-steps-item.vue index 8cec78e87..09ea38398 100644 --- a/src/uni_modules/uview-plus/components/u-steps-item/u-steps-item.vue +++ b/src/uni_modules/uview-plus/components/u-steps-item/u-steps-item.vue @@ -130,22 +130,22 @@ } }, statusColor() { - let color = '' + let colorTmp = '' switch (this.statusClass) { case 'finish': - color = this.parentData.activeColor + colorTmp = this.parentData.activeColor break case 'error': - color = color.error + colorTmp = color.error break case 'process': - color = this.parentData.dot ? this.parentData.activeColor : 'transparent' + colorTmp = this.parentData.dot ? this.parentData.activeColor : 'transparent' break default: - color = this.parentData.inactiveColor + colorTmp = this.parentData.inactiveColor break } - return color + return colorTmp }, contentStyle() { const style = {}