Skip to content

Commit

Permalink
定时任务外漏标签改为 10 个
Browse files Browse the repository at this point in the history
  • Loading branch information
whyour committed Oct 26, 2024
1 parent 20c6a1e commit 0d9eba4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pages/crontab/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ import { noop, omit } from 'lodash';

const { Text, Paragraph, Link } = Typography;
const { Search } = Input;
const SHOW_TAB_COUNT = 10;

const Crontab = () => {
const { headerStyle, isPhone, theme } = useOutletContext<SharedContext>();
Expand Down Expand Up @@ -805,7 +806,7 @@ const Crontab = () => {

useEffect(() => {
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);
}
}, [viewConf, enabledCronViews]);
Expand Down Expand Up @@ -835,7 +836,7 @@ const Crontab = () => {
viewAction(key);
},
items: [
...[...enabledCronViews].slice(4).map((x) => ({
...[...enabledCronViews].slice(SHOW_TAB_COUNT).map((x) => ({
label: (
<Space style={{ display: 'flex', justifyContent: 'space-between' }}>
<span>{x.name}</span>
Expand Down Expand Up @@ -955,7 +956,7 @@ const Crontab = () => {
}
onTabClick={tabClick}
items={[
...[...enabledCronViews].slice(0, 4).map((x) => ({
...[...enabledCronViews].slice(0, SHOW_TAB_COUNT).map((x) => ({
key: x.id,
label: x.name,
})),
Expand Down

0 comments on commit 0d9eba4

Please sign in to comment.