Skip to content

Commit

Permalink
fix: 修复View组件children类型的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
0xLLLLH committed Dec 17, 2020
1 parent 4485b2b commit 966c13a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/View.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ interface ViewProps {
ox?: number;
oy?: number;
oz?: number;
children: null;
children?: null;
}

const View: React.FC<ViewProps> = ({ children, ...viewAttrs }) => {
Expand All @@ -49,7 +49,7 @@ const View: React.FC<ViewProps> = ({ children, ...viewAttrs }) => {
renderer?.setTag('view', null, { ...viewAttrs });
}, [viewAttrs]);

return <div className="view"></div>;
return <div className="view">{children}</div>;
};

export default View;

0 comments on commit 966c13a

Please sign in to comment.