mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修复手机端配置文件编辑
This commit is contained in:
parent
ace820efd9
commit
603dc07581
|
@ -1,4 +1,10 @@
|
||||||
import React, { PureComponent, Fragment, useState, useEffect, useRef } from 'react';
|
import React, {
|
||||||
|
PureComponent,
|
||||||
|
Fragment,
|
||||||
|
useState,
|
||||||
|
useEffect,
|
||||||
|
useRef,
|
||||||
|
} from 'react';
|
||||||
import { Button, message, Modal, TreeSelect } from 'antd';
|
import { Button, message, Modal, TreeSelect } from 'antd';
|
||||||
import config from '@/utils/config';
|
import config from '@/utils/config';
|
||||||
import { PageContainer } from '@ant-design/pro-layout';
|
import { PageContainer } from '@ant-design/pro-layout';
|
||||||
|
@ -34,7 +40,9 @@ const Config = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateConfig = () => {
|
const updateConfig = () => {
|
||||||
const content = editorRef.current.getValue().replace(/\r\n/g, '\n');
|
const content = editorRef.current
|
||||||
|
? editorRef.current.getValue().replace(/\r\n/g, '\n')
|
||||||
|
: value;
|
||||||
|
|
||||||
request
|
request
|
||||||
.post(`${config.apiPrefix}configs/save`, {
|
.post(`${config.apiPrefix}configs/save`, {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user