git_pull 重构,样式优化

This commit is contained in:
whyour
2021-04-01 23:50:24 +08:00
parent 4ca49edf01
commit d5b9bca68b
12 changed files with 278 additions and 290 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ const Crontab = () => {
request
.get(`${config.apiPrefix}config/shareCode`)
.then((data) => {
setValue(data.content);
setValue(data.data);
})
.finally(() => setLoading(false));
};
+1 -2
View File
@@ -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));
};
+21 -3
View File
@@ -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"
+2 -2
View File
@@ -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));
};
+1 -1
View File
@@ -17,7 +17,7 @@ const Crontab = () => {
request
.get(`${config.apiPrefix}config/diy`)
.then((data) => {
setValue(data.content);
setValue(data.data);
})
.finally(() => setLoading(false));
};