-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 文档支持在线调试 * feat: 提交skeleton骨架屏代码提交 * fix: 提交骨架屏的review代码
- Loading branch information
Showing
15 changed files
with
509 additions
and
8 deletions.
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
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 |
---|---|---|
|
@@ -49,6 +49,7 @@ const App = () => { | |
} | ||
export default App; | ||
``` | ||
::: | ||
|
||
|
||
## API | ||
|
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
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
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 @@ | ||
.content { | ||
.nut-switch { | ||
display: flex; | ||
margin: 0 16px 8px 0; | ||
} | ||
.container { | ||
display: flex; | ||
.right-content { | ||
margin-left: 19px; | ||
font-family: PingFangSC; | ||
display: flex; | ||
flex-direction: column; | ||
.title { | ||
font-size: 14px; | ||
color: rgba(51, 51, 51, 1); | ||
} | ||
.desc { | ||
margin-top: 10px; | ||
font-size: 13px; | ||
color: rgba(154, 155, 157, 1); | ||
} | ||
} | ||
} | ||
} |
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,47 @@ | ||
import React, { useState } from 'react' | ||
import { Skeleton } from './skeleton' | ||
import Switch from '@/packages/switch' | ||
import Avatar from '@/packages/avatar' | ||
import './demo.scss' | ||
|
||
const SkeletonDemo = () => { | ||
const [checked, setChecked] = useState(false) | ||
const changeStatus = (value: boolean, event: React.MouseEvent<Element, MouseEvent>) => { | ||
console.log(`触发了change事件,开关状态:${value}`) | ||
setChecked(value) | ||
} | ||
return ( | ||
<> | ||
<div className="demo"> | ||
<h2>基础用法</h2> | ||
<Skeleton width={250} height={15} animated></Skeleton> | ||
<h2>传入多行</h2> | ||
<Skeleton width={250} height={15} row={3} title animated></Skeleton> | ||
<h2>显示头像</h2> | ||
<Skeleton width={250} height={15} row={3} title animated avatar></Skeleton> | ||
<h2>标题段落圆角风格</h2> | ||
<Skeleton width={250} height={15} animated round></Skeleton> | ||
<h2>显示子组件</h2> | ||
<div className="content"> | ||
<Switch size="15px" change={(value, event) => changeStatus(value, event)}></Switch> | ||
<Skeleton width={250} height={15} title animated avatar row={3} loading={checked}> | ||
<div className="container"> | ||
<Avatar | ||
size="50" | ||
icon="https://img14.360buyimg.com/imagetools/jfs/t1/167902/2/8762/791358/603742d7E9b4275e3/e09d8f9a8bf4c0ef.png" | ||
/> | ||
<div className="right-content"> | ||
<span className="title">NutUI-React</span> | ||
<div className="desc"> | ||
一套京东风格的轻量级移动端React组件库,提供丰富的基础组件和业务组件,帮助开发者快速搭建移动应用。 | ||
</div> | ||
</div> | ||
</div> | ||
</Skeleton> | ||
</div> | ||
</div> | ||
</> | ||
) | ||
} | ||
|
||
export default SkeletonDemo |
Oops, something went wrong.