-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing export default #3525
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,48 @@ | ||
import * as numeral from 'numeral'; | ||
export { default as ChartCard } from './ChartCard'; | ||
export { default as Bar } from './Bar'; | ||
export { default as Pie } from './Pie'; | ||
export { default as Radar } from './Radar'; | ||
export { default as Gauge } from './Gauge'; | ||
export { default as MiniArea } from './MiniArea'; | ||
export { default as MiniBar } from './MiniBar'; | ||
export { default as MiniProgress } from './MiniProgress'; | ||
export { default as Field } from './Field'; | ||
export { default as WaterWave } from './WaterWave'; | ||
export { default as TagCloud } from './TagCloud'; | ||
export { default as TimelineChart } from './TimelineChart'; | ||
import { default as Bar } from './Bar'; | ||
import { default as ChartCard } from './ChartCard'; | ||
import { default as Field } from './Field'; | ||
import { default as Gauge } from './Gauge'; | ||
import { default as MiniArea } from './MiniArea'; | ||
import { default as MiniBar } from './MiniBar'; | ||
import { default as MiniProgress } from './MiniProgress'; | ||
import { default as Pie } from './Pie'; | ||
import { default as Radar } from './Radar'; | ||
import { default as TagCloud } from './TagCloud'; | ||
import { default as TimelineChart } from './TimelineChart'; | ||
import { default as WaterWave } from './WaterWave'; | ||
|
||
declare const yuan: (value: number | string) => string; | ||
|
||
export { yuan }; | ||
declare const Charts: { | ||
yuan: (value: number | string) => string; | ||
Bar: Bar; | ||
Pie: Pie; | ||
Gauge: Gauge; | ||
Radar: Radar; | ||
MiniBar: MiniBar; | ||
MiniArea: MiniArea; | ||
MiniProgress: MiniProgress; | ||
ChartCard: ChartCard; | ||
Field: Field; | ||
WaterWave: WaterWave; | ||
TagCloud: TagCloud; | ||
TimelineChart: TimelineChart; | ||
}; | ||
|
||
export { | ||
Charts as default, | ||
yuan, | ||
Bar, | ||
Pie, | ||
Gauge, | ||
Radar, | ||
MiniBar, | ||
MiniArea, | ||
MiniProgress, | ||
ChartCard, | ||
Field, | ||
WaterWave, | ||
TagCloud, | ||
TimelineChart, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import * as React from 'react'; | ||
export default class HeaderDropdown extends React.Component<any, any> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ export interface ILoginItemProps { | |
buttonText?: React.ReactNode; | ||
} | ||
|
||
export class LoginItem extends React.Component<ILoginItemProps, any> {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good job |
||
export default class LoginItem extends React.Component<ILoginItemProps, any> {} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这种写法是没有问题的,你的 ts 版本是?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.2.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应该有问题吧,少了默认导出。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export { default as ChartCard } from './ChartCard'
改成 import 主要是为了下面一起导出,需要导入。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
懂了,你需要一个 default,可以保持原样然后进行default导出的。
这样可以支持 treebreak