修复调试保存文件默认目录和任务视图创建

This commit is contained in:
whyour
2022-12-09 22:59:38 +08:00
parent 3b389259c1
commit bb2e8cb287
3 changed files with 59 additions and 29 deletions
+1 -1
View File
@@ -272,7 +272,7 @@ const EditModal = ({
content:
editorRef.current &&
editorRef.current.getValue().replace(/\r\n/g, '\n'),
filename: cNode?.title,
...cNode,
}}
/>
<SettingModal
+2 -2
View File
@@ -17,7 +17,7 @@ const SaveModal = ({
const handleOk = async (values: any) => {
setLoading(true);
const payload = { ...file, ...values, originFilename: file.filename };
const payload = { ...file, ...values, originFilename: file.title };
request
.post(`${config.apiPrefix}scripts`, {
data: payload,
@@ -60,7 +60,7 @@ const SaveModal = ({
form={form}
layout="vertical"
name="script_modal"
initialValues={file}
initialValues={{ filename: file?.title, path: file?.parent || '' }}
>
<Form.Item
name="filename"