mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-25 00:16:06 +08:00
修复windows换行符
This commit is contained in:
parent
6ed4aa6bf4
commit
ace820efd9
|
@ -34,7 +34,7 @@ const Config = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateConfig = () => {
|
const updateConfig = () => {
|
||||||
const content = editorRef.current.getValue(1);
|
const content = editorRef.current.getValue().replace(/\r\n/g, '\n');
|
||||||
|
|
||||||
request
|
request
|
||||||
.post(`${config.apiPrefix}configs/save`, {
|
.post(`${config.apiPrefix}configs/save`, {
|
||||||
|
|
|
@ -179,7 +179,7 @@ const EditModal = ({
|
||||||
setSaveModalVisible(false);
|
setSaveModalVisible(false);
|
||||||
}}
|
}}
|
||||||
isNewFile={isNewFile}
|
isNewFile={isNewFile}
|
||||||
file={{ content: editorRef.current && editorRef.current.getValue(1), filename: fileName }}
|
file={{ content: editorRef.current && editorRef.current.getValue().replace(/\r\n/g, '\n'), filename: fileName }}
|
||||||
/>
|
/>
|
||||||
<SettingModal
|
<SettingModal
|
||||||
visible={settingModalVisible}
|
visible={settingModalVisible}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user