From 16f80ddfc338bc65a893c1b7eb93d1d9861158b2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 02 七月 2023 23:05:17 +0800 Subject: [PATCH] Merge branch 'develop' --- src/tabviews/zshare/mutilform/mkSwitch/index.jsx | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/tabviews/zshare/mutilform/mkSwitch/index.jsx b/src/tabviews/zshare/mutilform/mkSwitch/index.jsx index 0601054..62f8822 100644 --- a/src/tabviews/zshare/mutilform/mkSwitch/index.jsx +++ b/src/tabviews/zshare/mutilform/mkSwitch/index.jsx @@ -2,6 +2,8 @@ import PropTypes from 'prop-types' import { Switch } from 'antd' +import MKEmitter from '@/utils/events.js' + class MKSwitch extends Component { static propTpyes = { config: PropTypes.object, @@ -15,10 +17,21 @@ onChange = (val) => { const { config } = this.props + let other = {} + if (config.subFields) { + let _val = val ? config.openText : config.closeText + config.subFields.forEach((n, i) => { + other[n.field] = _val || '' + setTimeout(() => { + MKEmitter.emit('mkFC', 'input', n.uuid, _val || '') + }, i * 5) + }) + } + if (val) { - this.props.onChange(config.openVal) + this.props.onChange(config.openVal, other) } else { - this.props.onChange(config.closeVal) + this.props.onChange(config.closeVal, other) } } -- Gitblit v1.8.0