mirror of https://gitee.com/topiam/eiam
🐛 短信消息模板保存
parent
8352af67b6
commit
541a88ad0c
|
@ -345,13 +345,13 @@ export default (props: { visible: boolean }) => {
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
onFinish={async (values) => {
|
onFinish={async (values) => {
|
||||||
const fieldsValue = editorFormRef.current?.getFieldsValue();
|
|
||||||
const templates: { type: string; code: string }[] = [];
|
const templates: { type: string; code: string }[] = [];
|
||||||
editableKeys?.forEach((i, index) => {
|
editableKeys?.forEach((key) => {
|
||||||
if (fieldsValue?.[index]?.code !== undefined) {
|
const fieldValue = editorFormRef.current?.getFieldValue(key);
|
||||||
|
if (fieldValue !== undefined) {
|
||||||
const config: { type: string; code: string } = {
|
const config: { type: string; code: string } = {
|
||||||
type: `${i}`,
|
type: `${key}`,
|
||||||
code: fieldsValue[index].code,
|
code: fieldValue?.code,
|
||||||
};
|
};
|
||||||
templates.push(config);
|
templates.push(config);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue