添加重置ql reset命令,支持批量操作ck

This commit is contained in:
hanhh
2021-06-07 21:54:49 +08:00
parent 64aadb7eb8
commit 9e666f4348
11 changed files with 166 additions and 39 deletions
+3 -3
View File
@@ -176,7 +176,7 @@ const Crontab = () => {
},
];
const [width, setWdith] = useState('100%');
const [width, setWidth] = useState('100%');
const [marginLeft, setMarginLeft] = useState(0);
const [marginTop, setMarginTop] = useState(-72);
const [value, setValue] = useState<any[]>([]);
@@ -524,11 +524,11 @@ const Crontab = () => {
useEffect(() => {
if (document.body.clientWidth < 768) {
setWdith('auto');
setWidth('auto');
setMarginLeft(0);
setMarginTop(0);
} else {
setWdith('100%');
setWidth('100%');
setMarginLeft(0);
setMarginTop(-72);
}
+17 -1
View File
@@ -27,6 +27,7 @@ const CronLogModal = ({
const [value, setValue] = useState<string>('启动中...');
const [loading, setLoading] = useState<any>(true);
const [excuting, setExcuting] = useState<any>(true);
const [isPhone, setIsPhone] = useState(false);
const getCronLog = (isFirst?: boolean) => {
if (isFirst) {
@@ -86,6 +87,10 @@ const CronLogModal = ({
}
}, [cron]);
useEffect(() => {
setIsPhone(document.body.clientWidth < 768);
}, []);
return (
<Modal
title={titleElement()}
@@ -100,7 +105,18 @@ const CronLogModal = ({
onCancel={() => cancel()}
>
{!loading && value && (
<pre style={{ whiteSpace: 'break-spaces', lineHeight: '17px' }}>
<pre
style={
!isPhone
? { whiteSpace: 'break-spaces', lineHeight: '17px' }
: {
whiteSpace: 'break-spaces',
lineHeight: '17px',
width: 375,
zoom: 0.88,
}
}
>
{value}
</pre>
)}