-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
141 additions
and
245 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,24 @@ | ||
import React from 'react'; | ||
import { Image } from 'tdesign-mobile-react'; | ||
import './style/index.less'; | ||
|
||
const CropDemo = React.memo(() => ( | ||
<> | ||
<div className="t-image__demo-base"> | ||
<div className="t-image__demo-wrap"> | ||
<Image src="https://tdesign.gtimg.com/site/upload1.png" fit="cover" style={{ width: 72, height: 72 }} /> | ||
<h5>裁切</h5> | ||
</div> | ||
<div className="t-image__demo-wrap"> | ||
<Image src="https://tdesign.gtimg.com/site/upload1.png" fit="contain" style={{ width: 89, height: 72 }} /> | ||
<h5>适应高</h5> | ||
</div> | ||
<div className="t-image__demo-wrap"> | ||
<Image src="https://tdesign.gtimg.com/site/upload1.png" fit="fill" style={{ width: 134, height: 72 }} /> | ||
<h5>拉伸</h5> | ||
</div> | ||
</div> | ||
</> | ||
)); | ||
|
||
export default CropDemo; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,24 @@ | ||
import React from 'react'; | ||
import { Image } from 'tdesign-mobile-react'; | ||
import './style/index.less'; | ||
|
||
const LoadingErrorDemo = React.memo(() => ( | ||
<> | ||
<div className="t-image__demo-base"> | ||
<div className="t-image__demo-wrap"> | ||
<Image src="https://tdesign.gtimg.com/site/upload111.png" style={{ width: 72, height: 72 }} /> | ||
<h5>默认提示</h5> | ||
</div> | ||
<div className="t-image__demo-wrap"> | ||
<Image | ||
src="https://tdesign.gtimg.com/site/upload1111.png" | ||
error={<span style={{ fontSize: 12 }}>加载失败</span>} | ||
style={{ width: 72, height: 72 }} | ||
/> | ||
<h5>自定义提示</h5> | ||
</div> | ||
</div> | ||
</> | ||
)); | ||
|
||
export default LoadingErrorDemo; |
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,21 @@ | ||
import React from 'react'; | ||
import { Image } from 'tdesign-mobile-react'; | ||
import { LoadingIcon } from 'tdesign-icons-react'; | ||
import './style/index.less'; | ||
|
||
const LoadingTipDemo = React.memo(() => ( | ||
<> | ||
<div className="t-image__demo-base"> | ||
<div className="t-image__demo-wrap"> | ||
<Image src="" style={{ width: 72, height: 72 }} /> | ||
<h5>默认提示</h5> | ||
</div> | ||
<div className="t-image__demo-wrap"> | ||
<Image src="" loading={<LoadingIcon size="1.5em" />} style={{ width: 72, height: 72 }} /> | ||
<h5>自定义提示</h5> | ||
</div> | ||
</div> | ||
</> | ||
)); | ||
|
||
export default LoadingTipDemo; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,24 @@ | ||
import React from 'react'; | ||
import { Image } from 'tdesign-mobile-react'; | ||
import './style/index.less'; | ||
|
||
const RoundDemo = React.memo(() => ( | ||
<> | ||
<div className="t-image__demo-base"> | ||
<div className="t-image__demo-wrap"> | ||
<Image src="https://tdesign.gtimg.com/site/upload1.png" shape="square" style={{ width: 72, height: 72 }} /> | ||
<h5>方形</h5> | ||
</div> | ||
<div className="t-image__demo-wrap"> | ||
<Image src="https://tdesign.gtimg.com/site/upload1.png" shape="round" style={{ width: 72, height: 72 }} /> | ||
<h5>圆角方形</h5> | ||
</div> | ||
<div className="t-image__demo-wrap"> | ||
<Image src="https://tdesign.gtimg.com/site/upload1.png" shape="circle" style={{ width: 72, height: 72 }} /> | ||
<h5>圆角</h5> | ||
</div> | ||
</div> | ||
</> | ||
)); | ||
|
||
export default RoundDemo; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.