Skip to content

Commit

Permalink
replase 1.2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
fengxinhhh committed Jul 25, 2022
1 parent b8cbee2 commit 2e933d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/concis-react/src/Modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Modal: FC<ModalProps> = (props: ModalProps) => {
});
}, []);

useOverFlowScroll('body', visible);
useOverFlowScroll('body', visible as boolean);

const finish = () => {
onOk && onOk();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const useOverFlowScroll = (container: string, hidden: boolean) => {
};
const setContainerHidden = () => {
//设置滚动条隐藏

const dom = document.querySelector(`${container}`) as HTMLElement;
if (dom && dom.style.overflow !== 'hidden') {
console.log(dom);
dom.style.width = `calc(100% - ${getScrollBarWidth(dom)}px)`;
dom.style.overflow = 'hidden';
isHidden.current = true;
Expand All @@ -26,7 +26,6 @@ const useOverFlowScroll = (container: string, hidden: boolean) => {

const resetContainer = () => {
//恢复
console.log('恢复');
if (isHidden.current && document.querySelector(`${container}`)) {
isHidden.current = false;
const dom = document.querySelector(`${container}`) as HTMLElement;
Expand Down

0 comments on commit 2e933d0

Please sign in to comment.