Commit f75ac5e7 by zhaochengxiang

模型定位

parent 60725296
...@@ -5,7 +5,7 @@ import SmoothScroll from 'smooth-scroll'; ...@@ -5,7 +5,7 @@ import SmoothScroll from 'smooth-scroll';
import { dispatchLatest } from '../../../../model'; import { dispatchLatest } from '../../../../model';
import { showMessage, getQueryParam } from '../../../../util'; import { showMessage, getQueryParam } from '../../../../util';
import { AnchorId } from '../../../../util/constant'; import { AnchorId, AnchorTimestamp } from '../../../../util/constant';
import './ModelTable.less'; import './ModelTable.less';
...@@ -17,6 +17,8 @@ const ModelTable = (props) => { ...@@ -17,6 +17,8 @@ const ModelTable = (props) => {
const [modal, contextHolder] = Modal.useModal(); const [modal, contextHolder] = Modal.useModal();
const anchorId = getQueryParam(AnchorId, props.location.search); const anchorId = getQueryParam(AnchorId, props.location.search);
const anchorTimestamp = getQueryParam(AnchorTimestamp, props.location.search);
const shouldScrollRef = useRef(false); const shouldScrollRef = useRef(false);
useEffect(() => { useEffect(() => {
...@@ -33,7 +35,7 @@ const ModelTable = (props) => { ...@@ -33,7 +35,7 @@ const ModelTable = (props) => {
} }
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
}, [anchorId]) }, [anchorTimestamp])
useEffect(() => { useEffect(() => {
if (shouldScrollRef.current) { if (shouldScrollRef.current) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment