Skip to content

Commit

Permalink
把 Badage 改为 Badge
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhubaofu committed Jul 24, 2017
1 parent 78bc91d commit 8235eeb
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 34 deletions.
55 changes: 27 additions & 28 deletions example/Badage.md → example/Badge.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Badage
## Badge

`Badage`组件,配合图标、按钮组件使用,用于标识一些文字,数字等。
`Badge`组件,配合图标、按钮组件使用,用于标识一些文字,数字等。

#### 示例

Expand Down Expand Up @@ -36,21 +36,21 @@
按钮
</san-button>
</san-badage>
</section>
</section>
</template>
<script>
import Badage from '../src/Badage';
import Badge from '../src/Badge';
import Icon from '../src/Icon';
import {IconButton, Button} from '../src/Button';
import '../src/Badage/Badage.styl';
import '../src/Badge/Badge.styl';
import '../src/Icon/Icon.styl';
import '../src/Button/Button.styl';
export default {
components: {
'san-badage': Badage,
'san-badage': Badge,
'san-icon-button': IconButton,
'san-icon': Icon,
'san-button': Button
Expand All @@ -60,8 +60,8 @@ export default {
<style>
.badage-demo {
padding: 20px;
display: flex;
padding: 20px;
display: flex;
align-items: center;
justify-content: space-around;
}
Expand Down Expand Up @@ -89,19 +89,19 @@ export default {
assignment
</san-icon-button>
</san-badage>
</section>
</section>
</template>
<script>
import Badage from '../src/Badage';
import Badge from '../src/Badge';
import {IconButton, Button} from '../src/Button';
import '../src/Badage/Badage.styl';
import '../src/Badge/Badge.styl';
import '../src/Button/Button.styl';
export default {
components: {
'san-badage': Badage,
'san-badage': Badge,
'san-icon-button': IconButton
},
initData() {
Expand All @@ -116,8 +116,8 @@ export default {
<style>
.badage-demo {
padding: 20px;
display: flex;
padding: 20px;
display: flex;
align-items: center;
justify-content: space-around;
}
Expand Down Expand Up @@ -147,21 +147,21 @@ export default {
按钮
</san-button>
</san-badage>
</section>
</section>
</template>
<script>
import Badage from '../src/Badage';
import Badge from '../src/Badge';
import Icon from '../src/Icon';
import {IconButton, Button} from '../src/Button';
import '../src/Badage/Badage.styl';
import '../src/Badge/Badge.styl';
import '../src/Icon/Icon.styl';
import '../src/Button/Button.styl';
export default {
components: {
'san-badage': Badage,
'san-badage': Badge,
'san-icon-button': IconButton,
'san-icon': Icon,
'san-button': Button
Expand All @@ -171,8 +171,8 @@ export default {
<style>
.badage-demo {
padding: 20px;
display: flex;
padding: 20px;
display: flex;
align-items: center;
justify-content: space-around;
}
Expand All @@ -195,19 +195,19 @@ export default {
点击按钮以隐藏通知
</san-button>
</san-badage>
</section>
</section>
</template>
<script>
import Badage from '../src/Badage';
import Badge from '../src/Badge';
import {IconButton, Button} from '../src/Button';
import '../src/Badage/Badage.styl';
import '../src/Badge/Badge.styl';
import '../src/Button/Button.styl';
export default {
components: {
'san-badage': Badage,
'san-badage': Badge,
'san-icon-button': IconButton,
'san-button': Button
},
Expand All @@ -224,8 +224,8 @@ export default {
<style>
.badage-demo {
padding: 20px;
display: flex;
padding: 20px;
display: flex;
align-items: center;
justify-content: space-around;
}
Expand All @@ -242,11 +242,10 @@ export default {
| color | String | | 颜色 |
| max | Number | | 最大值,超过最大值会显示 '{max}+',要求 content 是 Number 类型 |
| hidden | Boolean | false | 隐藏badage |

### Slots

| 名称 | 描述|
| --- | --- |
| default | 可填充Icon, IconButton, Button, 分发需要加入badage内部的组件 |
| content | 可填充Icon,用于自定义badage形状,但该slot会被content属性覆盖 |

2 changes: 1 addition & 1 deletion example/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Main from '../README.md';
import AppBar from './AppBar.md';
import Avatar from './Avatar.md';
import Button from './Button.md';
import Badage from './Badage.md';
import Badge from './Badge.md';
import Card from './Card.md';
import Carousel from './Carousel.md';
import Checkbox from './Checkbox.md';
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/Badage/index.js → src/Badge/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
* @author malingyang(malingyang@baidu.com)
*/

export default from './Badage';
export default from './Badge';
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import AppBar from './AppBar';
import Button from './Button';
import Badage from './Badage';
import Badge from './Badge';
import Card from './Card';
import Checkbox from './Checkbox';
import DatePicker from './DatePicker';
Expand Down Expand Up @@ -35,7 +35,7 @@ import Carousel from './Carousel';
export {
AppBar,
Button,
Badage,
Badge,
Card,
Checkbox,
DatePicker,
Expand Down
4 changes: 2 additions & 2 deletions src/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

@require './AppBar/AppBar.styl'
@require './Button/Button.styl'
@require './Badage/Badage.styl'
@require './Badge/Badge.styl'

@require './Card/Card.styl'
@require './Card/CardActions.styl'
Expand Down Expand Up @@ -69,4 +69,4 @@

@require './Carousel/Carousel.styl'

@require './Uploader/Uploader.styl'
@require './Uploader/Uploader.styl'

0 comments on commit 8235eeb

Please sign in to comment.