mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
定时任务外漏标签改为 10 个
This commit is contained in:
parent
20c6a1e8bf
commit
0d9eba4b6e
|
@ -62,6 +62,7 @@ import { noop, omit } from 'lodash';
|
||||||
|
|
||||||
const { Text, Paragraph, Link } = Typography;
|
const { Text, Paragraph, Link } = Typography;
|
||||||
const { Search } = Input;
|
const { Search } = Input;
|
||||||
|
const SHOW_TAB_COUNT = 10;
|
||||||
|
|
||||||
const Crontab = () => {
|
const Crontab = () => {
|
||||||
const { headerStyle, isPhone, theme } = useOutletContext<SharedContext>();
|
const { headerStyle, isPhone, theme } = useOutletContext<SharedContext>();
|
||||||
|
@ -805,7 +806,7 @@ const Crontab = () => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (viewConf && enabledCronViews && enabledCronViews.length > 0) {
|
if (viewConf && enabledCronViews && enabledCronViews.length > 0) {
|
||||||
const view = enabledCronViews.slice(4).find((x) => x.id === viewConf.id);
|
const view = enabledCronViews.slice(SHOW_TAB_COUNT).find((x) => x.id === viewConf.id);
|
||||||
setMoreMenuActive(!!view);
|
setMoreMenuActive(!!view);
|
||||||
}
|
}
|
||||||
}, [viewConf, enabledCronViews]);
|
}, [viewConf, enabledCronViews]);
|
||||||
|
@ -835,7 +836,7 @@ const Crontab = () => {
|
||||||
viewAction(key);
|
viewAction(key);
|
||||||
},
|
},
|
||||||
items: [
|
items: [
|
||||||
...[...enabledCronViews].slice(4).map((x) => ({
|
...[...enabledCronViews].slice(SHOW_TAB_COUNT).map((x) => ({
|
||||||
label: (
|
label: (
|
||||||
<Space style={{ display: 'flex', justifyContent: 'space-between' }}>
|
<Space style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||||
<span>{x.name}</span>
|
<span>{x.name}</span>
|
||||||
|
@ -955,7 +956,7 @@ const Crontab = () => {
|
||||||
}
|
}
|
||||||
onTabClick={tabClick}
|
onTabClick={tabClick}
|
||||||
items={[
|
items={[
|
||||||
...[...enabledCronViews].slice(0, 4).map((x) => ({
|
...[...enabledCronViews].slice(0, SHOW_TAB_COUNT).map((x) => ({
|
||||||
key: x.id,
|
key: x.id,
|
||||||
label: x.name,
|
label: x.name,
|
||||||
})),
|
})),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user