Skip to content

Commit 89f632a

Browse files
hyxingyuefeng
authored andcommitted
fix: 修改报错
1 parent 91010f5 commit 89f632a

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

packages/core/src/MaskLayer/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export interface MaskLayerProps extends RNModalProps {
4545
children?: Array<JSX.Element> | JSX.Element;
4646
}
4747

48-
export default (props: MaskLayerProps = {}) => {
48+
const MaskLayer = (props: MaskLayerProps = {}) => {
4949
const {
5050
maskClosable = true,
5151
children,
@@ -114,3 +114,5 @@ export default (props: MaskLayerProps = {}) => {
114114
</Modal>
115115
);
116116
};
117+
118+
export default MaskLayer;

packages/core/src/Modal/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface ModalProps extends MaskLayerProps {
1010
onClosed?: () => void;
1111
}
1212

13-
export default (props: ModalProps = {}) => {
13+
const Modal = (props: ModalProps = {}) => {
1414
const { onClosed, visible, children, placement = 'bottom', ...otherProps } = props;
1515
const AnimatedOpacity: Animated.Value = useRef(new Animated.Value(0)).current;
1616
// const [display] = useState<'none' | 'flex'>('none');
@@ -112,6 +112,8 @@ export default (props: ModalProps = {}) => {
112112
);
113113
};
114114

115+
export default Modal;
116+
115117
const styles = StyleSheet.create({
116118
content: {
117119
position: 'absolute',

website/.eslintrc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
{
2-
"extends": ["react-app", "react-app/jest"],
2+
"extends": [
3+
"react-app",
4+
"react-app/jest"
5+
],
36
"rules": {
47
"react-hooks/exhaustive-deps": 0,
5-
"no-mixed-operators": 0
8+
"no-mixed-operators": 0,
9+
"import/no-anonymous-default-export": 0,
10+
"array-callback-return": 0
611
}
7-
}
12+
}

0 commit comments

Comments
 (0)