From 389cad1e21348f4f1be4bc00d5fb1670a81f2ed3 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 25 三月 2022 10:15:21 +0800 Subject: [PATCH] 2022-03-25 --- src/menu/components/share/actioncomponent/actionform/index.jsx | 43 ++++++++++++++++++++++++++++++------------- 1 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index 3d0d78e..8eaa6b3 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -645,19 +645,36 @@ { required: item.required, message: dict['form.required.select'] + item.label + '!' } ] - content = <Select - showSearch - allowClear={item.allowClear === true} - filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} - onChange={(value) => {this.optionChange(item.key, value)}} - getPopupContainer={() => document.getElementById('winter')} - > - {item.options.map((option, index) => - <Select.Option key={index} value={(option.value || option.field)}> - {(option.text || option.label)} - </Select.Option> - )} - </Select> + if (item.extendName) { + content = <Select + showSearch + allowClear={item.allowClear === true} + filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 || + option.props.extend.toLowerCase().indexOf(input.toLowerCase()) >= 0} + onChange={(value) => {this.optionChange(item.key, value)}} + getPopupContainer={() => document.getElementById('winter')} + > + {item.options.map((option, index) => + <Select.Option key={index} extend={option[item.extendName] || ''} value={(option.value || option.field)}> + {(option.text || option.label)} + </Select.Option> + )} + </Select> + } else { + content = <Select + showSearch + allowClear={item.allowClear === true} + filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} + onChange={(value) => {this.optionChange(item.key, value)}} + getPopupContainer={() => document.getElementById('winter')} + > + {item.options.map((option, index) => + <Select.Option key={index} value={(option.value || option.field)}> + {(option.text || option.label)} + </Select.Option> + )} + </Select> + } } else if (item.type === 'radio') { rules = [ { required: item.required, message: dict['form.required.select'] + item.label + '!' } -- Gitblit v1.8.0