Skip to content

Commit

Permalink
chore: rc-util remove all the .js suffix file (#610)
Browse files Browse the repository at this point in the history
* fix: fix

* fix: fix

* fix: fix

* fix: fix

* fix: fix

* fix: fix

* fix: fix lint

* fix: up dependencies

* chore: update father targets

* fix: fix
  • Loading branch information
li-jia-nan authored Jan 7, 2025
1 parent fab86ea commit a3465f0
Show file tree
Hide file tree
Showing 38 changed files with 129 additions and 853 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"build": "dumi build",
"compile": "father build",
"coverage": "npm test -- --coverage",
"lint": "eslint src/ --ext .tsx,.ts & eslint tests/ --ext .js",
"lint": "eslint src/ --ext .tsx,.ts & eslint tests/ --ext .tsx,.ts",
"prepare": "husky install",
"prepublishOnly": "npm run compile && np --yolo --no-publish",
"start": "dumi dev",
Expand All @@ -38,7 +38,6 @@
]
},
"dependencies": {
"@babel/runtime": "^7.18.3",
"react-is": "^18.2.0"
},
"devDependencies": {
Expand All @@ -52,7 +51,6 @@
"@types/responselike": "^1.0.0",
"@types/warning": "^3.0.0",
"@umijs/fabric": "^3.0.0",
"create-react-class": "^15.6.3",
"cross-env": "^7.0.2",
"dumi": "^2.1.3",
"eslint": "^8.54.0",
Expand Down
10 changes: 0 additions & 10 deletions src/Children/mapSelf.js

This file was deleted.

72 changes: 0 additions & 72 deletions src/ContainerRender.js

This file was deleted.

20 changes: 0 additions & 20 deletions src/Dom/addEventListener.js

This file was deleted.

28 changes: 0 additions & 28 deletions src/Dom/class.js

This file was deleted.

113 changes: 0 additions & 113 deletions src/Dom/css.js

This file was deleted.

26 changes: 0 additions & 26 deletions src/Dom/support.js

This file was deleted.

12 changes: 5 additions & 7 deletions src/PortalWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable no-underscore-dangle,react/require-default-props */
import * as React from 'react';
import raf from './raf';
import Portal, { PortalRef } from './Portal';
import Portal from './Portal';
import type { PortalRef } from './Portal';
import canUseDom from './Dom/canUseDom';
import switchScrollingEffect from './switchScrollingEffect';
import setStyle from './setStyle';
import ScrollLocker from './Dom/scrollLocker';

Expand Down Expand Up @@ -59,7 +59,7 @@ export interface PortalWrapperProps {
class PortalWrapper extends React.Component<PortalWrapperProps> {
container?: HTMLElement;

componentRef: React.RefObject<PortalRef> = React.createRef();
componentRef = React.createRef<PortalRef>();

rafId?: number;

Expand All @@ -73,8 +73,8 @@ class PortalWrapper extends React.Component<PortalWrapperProps> {
}

renderComponent?: (info: {
afterClose: Function;
onClose: Function;
afterClose: (...params: any[]) => void;
onClose: (...params: any[]) => void;
visible: boolean;
}) => void;

Expand Down Expand Up @@ -206,7 +206,6 @@ class PortalWrapper extends React.Component<PortalWrapperProps> {
*/
switchScrollingEffect = () => {
if (openCount === 1 && !Object.keys(cacheOverflow).length) {
switchScrollingEffect();
// Must be set after switchScrollingEffect
cacheOverflow = setStyle({
overflow: 'hidden',
Expand All @@ -216,7 +215,6 @@ class PortalWrapper extends React.Component<PortalWrapperProps> {
} else if (!openCount) {
setStyle(cacheOverflow);
cacheOverflow = {};
switchScrollingEffect(true);
}
};

Expand Down
Loading

0 comments on commit a3465f0

Please sign in to comment.