bug修复

This commit is contained in:
张锐 committed 2026-11-25 08:14:27 +08:00
1 parent 18b5c1e9e1
commit 654d08c8c8
4 files changed
+42 -48

No files matched your search

+4 -2
View File
@@ -14,7 +14,7 @@ type Field = {
maxLength?: number | null;
required: boolean;
systemField: boolean;
optionsJson: string;
optionsJson: string | null;
widthType: string;
sortNo: number;
};
@@ -146,13 +146,14 @@ export default function InquirySettingsPanel() {
const saveForm = async () => {
if (!editing) return;
try {
setNotice("");
setSaving(true);
await post("/inquiries/forms/save", {
...editing,
siteCode: SITE,
fields: editing.fields.map((field, index) => ({
...field,
optionsJson: field.optionsJson.trim() || null,
optionsJson: field.optionsJson?.trim() || null,
sortNo: index,
})),
});
@@ -212,6 +213,7 @@ export default function InquirySettingsPanel() {
</button>
</div>
</div>
{notice && <div className="notice">{notice}</div>}
<div className="inquiry-editor-layout">
<div className="editor-main">
<section className="edit-section">