Skip to content

Commit

Permalink
feat: 新增项目管理\代码审计-重新编译
Browse files Browse the repository at this point in the history
  • Loading branch information
youngster-yj committed Dec 3, 2024
1 parent 825980e commit 015f92a
Show file tree
Hide file tree
Showing 7 changed files with 229 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
useDebounceEffect,
useMemoizedFn,
useThrottleFn,
useUpdateEffect,
useVirtualList
} from "ahooks"
import {useRef, useState} from "react"
Expand Down Expand Up @@ -46,7 +47,7 @@ export const YakitVirtualList = <T extends any>(props: YakitVirtualListProps<T>)
const containerRef = useRef<HTMLDivElement>(null)
const wrapperRef = useRef<HTMLDivElement>(null)

const [list] = useVirtualList(data, {
const [list, scrollTo] = useVirtualList(data, {
containerTarget: containerRef,
wrapperTarget: wrapperRef,
itemHeight: 48,
Expand All @@ -68,10 +69,14 @@ export const YakitVirtualList = <T extends any>(props: YakitVirtualListProps<T>)
setScroll(true)
}
},
[vlistHeigth, wrapperRef.current?.clientHeight, refresh, hasMore],
[vlistHeigth, wrapperRef.current?.clientHeight, hasMore],
{wait: 200}
)

useUpdateEffect(() => {
scrollTo(0)
}, [refresh])

const onScrollCapture = useThrottleFn(
() => {
if (wrapperRef && containerRef && !loading && hasMore) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const YakRunnerProjectManager: React.FC<YakRunnerProjectManagerProps> = (
<WaterMark content={waterMarkStr} style={{overflow: "hidden", height: "100%"}}>
<div className={styles["yakrunner-project-manager"]} id='yakrunner-project-manager'>
<AuditHistoryTable
pageType="projectManager"
pageType='projectManager'
onExecuteAudit={() => {
setShowCompileModal(true)
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ export const YakitRiskTable: React.FC<YakitRiskTableProps> = React.memo((props)
<div className={styles["virtual-table-heard-right-item"]}>
<span className={styles["virtual-table-heard-right-text"]}>Total</span>
<span className={styles["virtual-table-heard-right-number"]}>
{response.Total}
{allTotal}
</span>
</div>
<Divider type='vertical' />
Expand Down
Loading

0 comments on commit 015f92a

Please sign in to comment.