fix(style): chart grid right margin
This commit is contained in:
@@ -30,6 +30,7 @@ const ContentWrapper = styled.div<{ $hasTitle: boolean }>`
|
|||||||
? 'var(--ant-color-text-secondary)'
|
? 'var(--ant-color-text-secondary)'
|
||||||
: 'var(--ant-color-text)'};
|
: 'var(--ant-color-text)'};
|
||||||
font-weight: var(--font-weight-500);
|
font-weight: var(--font-weight-500);
|
||||||
|
white-space: pre-line;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const AlertInfo: React.FC<AlertInfoProps> = (props) => {
|
const AlertInfo: React.FC<AlertInfoProps> = (props) => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { useMemo } from 'react';
|
|||||||
|
|
||||||
export const grid = {
|
export const grid = {
|
||||||
left: 0,
|
left: 0,
|
||||||
right: 20,
|
right: 0,
|
||||||
bottom: 20,
|
bottom: 20,
|
||||||
containLabel: true
|
containLabel: true
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import _ from 'lodash';
|
|||||||
import qs from 'query-string';
|
import qs from 'query-string';
|
||||||
import { useEffect, useRef, useState } from 'react';
|
import { useEffect, useRef, useState } from 'react';
|
||||||
|
|
||||||
|
type EventsType = 'CREATE' | 'UPDATE' | 'DELETE' | 'INSERT';
|
||||||
|
|
||||||
type WatchConfig =
|
type WatchConfig =
|
||||||
| { watch?: false | undefined; API?: string; polling?: boolean }
|
| { watch?: false | undefined; API?: string; polling?: boolean }
|
||||||
| { watch: true; API: string; polling?: false | undefined }
|
| { watch: true; API: string; polling?: false | undefined }
|
||||||
@@ -18,6 +20,7 @@ export default function useTableFetch<ListItem>(
|
|||||||
deleteAPI?: (id: number, params?: any) => Promise<any>;
|
deleteAPI?: (id: number, params?: any) => Promise<any>;
|
||||||
contentForDelete?: string;
|
contentForDelete?: string;
|
||||||
defaultData?: any[];
|
defaultData?: any[];
|
||||||
|
events?: EventsType[];
|
||||||
} & WatchConfig
|
} & WatchConfig
|
||||||
) {
|
) {
|
||||||
const {
|
const {
|
||||||
@@ -27,7 +30,8 @@ export default function useTableFetch<ListItem>(
|
|||||||
API,
|
API,
|
||||||
polling = false,
|
polling = false,
|
||||||
watch,
|
watch,
|
||||||
defaultData = []
|
defaultData = [],
|
||||||
|
events = ['UPDATE', 'DELETE', 'INSERT']
|
||||||
} = options;
|
} = options;
|
||||||
const pollingRef = useRef<any>(null);
|
const pollingRef = useRef<any>(null);
|
||||||
const chunkRequedtRef = useRef<any>(null);
|
const chunkRequedtRef = useRef<any>(null);
|
||||||
@@ -57,7 +61,7 @@ export default function useTableFetch<ListItem>(
|
|||||||
});
|
});
|
||||||
const { setChunkRequest } = useSetChunkRequest();
|
const { setChunkRequest } = useSetChunkRequest();
|
||||||
const { updateChunkedList, cacheDataListRef } = useUpdateChunkedList({
|
const { updateChunkedList, cacheDataListRef } = useUpdateChunkedList({
|
||||||
events: ['UPDATE', 'DELETE', 'INSERT'],
|
events: events,
|
||||||
dataList: dataSource.dataList,
|
dataList: dataSource.dataList,
|
||||||
setDataList(list, opts?: any) {
|
setDataList(list, opts?: any) {
|
||||||
setDataSource((pre) => {
|
setDataSource((pre) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user