mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-17 01:14:50 +08:00
git_pull 重构,样式优化
This commit is contained in:
@@ -17,7 +17,7 @@ const Crontab = () => {
|
||||
request
|
||||
.get(`${config.apiPrefix}config/shareCode`)
|
||||
.then((data) => {
|
||||
setValue(data.content);
|
||||
setValue(data.data);
|
||||
})
|
||||
.finally(() => setLoading(false));
|
||||
};
|
||||
|
||||
@@ -4,7 +4,6 @@ import config from '@/utils/config';
|
||||
import { PageContainer } from '@ant-design/pro-layout';
|
||||
import { Controlled as CodeMirror } from 'react-codemirror2';
|
||||
import { request } from '@/utils/http';
|
||||
import QRCode from 'qrcode.react';
|
||||
|
||||
const Config = () => {
|
||||
const [width, setWdith] = useState('100%');
|
||||
@@ -18,7 +17,7 @@ const Config = () => {
|
||||
request
|
||||
.get(`${config.apiPrefix}config/config`)
|
||||
.then((data) => {
|
||||
setValue(data.content);
|
||||
setValue(data.data);
|
||||
})
|
||||
.finally(() => setLoading(false));
|
||||
};
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
import React, { PureComponent, Fragment, useState, useEffect } from 'react';
|
||||
import { Button, notification, Modal, Table, Tag, Space } from 'antd';
|
||||
import {
|
||||
Button,
|
||||
notification,
|
||||
Modal,
|
||||
Table,
|
||||
Tag,
|
||||
Space,
|
||||
Typography,
|
||||
} from 'antd';
|
||||
import { EditOutlined, DeleteOutlined } from '@ant-design/icons';
|
||||
import config from '@/utils/config';
|
||||
import { PageContainer } from '@ant-design/pro-layout';
|
||||
@@ -7,6 +15,8 @@ import { request } from '@/utils/http';
|
||||
import QRCode from 'qrcode.react';
|
||||
import CookieModal from './modal';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
enum Status {
|
||||
'正常',
|
||||
'失效',
|
||||
@@ -197,7 +207,11 @@ const Config = () => {
|
||||
const deleteCookie = (record: any, index: number) => {
|
||||
Modal.confirm({
|
||||
title: '确认删除',
|
||||
content: `确认删除Cookie ${record.cookie} 吗`,
|
||||
content: (
|
||||
<>
|
||||
确认删除Cookie <Text type="warning">{record.cookie}</Text> 吗
|
||||
</>
|
||||
),
|
||||
onOk() {
|
||||
request
|
||||
.delete(`${config.apiPrefix}cookie`, {
|
||||
@@ -270,7 +284,11 @@ const Config = () => {
|
||||
>
|
||||
<Table
|
||||
columns={columns}
|
||||
pagination={{ hideOnSinglePage: true }}
|
||||
pagination={{
|
||||
hideOnSinglePage: true,
|
||||
showSizeChanger: true,
|
||||
defaultPageSize: 20,
|
||||
}}
|
||||
dataSource={value}
|
||||
rowKey="pin"
|
||||
size="middle"
|
||||
|
||||
@@ -16,7 +16,7 @@ const Crontab = () => {
|
||||
|
||||
const getConfig = () => {
|
||||
request.get(`${config.apiPrefix}config/config`).then((data) => {
|
||||
setValue(data.content);
|
||||
setValue(data.data);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -25,7 +25,7 @@ const Crontab = () => {
|
||||
request
|
||||
.get(`${config.apiPrefix}config/sample`)
|
||||
.then((data) => {
|
||||
setSample(data.content);
|
||||
setSample(data.data);
|
||||
})
|
||||
.finally(() => setLoading(false));
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ const Crontab = () => {
|
||||
request
|
||||
.get(`${config.apiPrefix}config/diy`)
|
||||
.then((data) => {
|
||||
setValue(data.content);
|
||||
setValue(data.data);
|
||||
})
|
||||
.finally(() => setLoading(false));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user