Skip to content

Commit

Permalink
feat(doc): 完善 Noticebar 展示页
Browse files Browse the repository at this point in the history
  • Loading branch information
koppthe committed Aug 2, 2018
1 parent 63f5de4 commit 8a61a97
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/components/icon/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

.at-icon-close-2::before { content: "\e916"; }

.at-icon-close-1::before { content: "\e917"; }
.at-icon-close::before { content: "\e917"; }

.at-icon-credit-card::before { content: "\e918"; }

Expand Down
17 changes: 8 additions & 9 deletions src/pages/view/noticebar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import Taro from '@tarojs/taro'
import { View } from '@tarojs/components'

import AtNoticebar from '../../../components/noticebar/index'
import DocsHeader from '../../components/doc-header'

import './index.scss'

export default class NoticebarPage extends Taro.Component {
config = {
navigationBarTitleText: 'Noticebar Page'
navigationBarTitleText: 'Taro UI'
}

constructor () {
Expand All @@ -21,9 +22,7 @@ export default class NoticebarPage extends Taro.Component {
return (
<View className='page'>
{/* S Header */}
<View className='doc-header'>
<View className='doc-header__title'>通告栏</View>
</View>
<DocsHeader title='NoticeBar 通告栏'></DocsHeader>
{/* E Header */}

{/* S Body */}
Expand All @@ -32,10 +31,10 @@ export default class NoticebarPage extends Taro.Component {
<View className='panel'>
<View className='panel__title'>基础通告栏</View>
<View className='panel__content'>
<View className='example'>
<View className='bar-item'>
<AtNoticebar>这是 NoticeBar 通告栏。单行</AtNoticebar>
</View>
<View className='example'>
<View className='bar-item'>
<AtNoticebar icon='icon-notice'>这是 NoticeBar 通告栏。单行、带 icon</AtNoticebar>
</View>
</View>
Expand All @@ -45,13 +44,13 @@ export default class NoticebarPage extends Taro.Component {
<View className='panel'>
<View className='panel__title'>基础通告栏(带关闭按钮)</View>
<View className='panel__content'>
<View className='example'>
<View className='bar-item'>
<AtNoticebar close single moreUrl='https://taro.aotu.io/'>这是 NoticeBar 通告栏。带关闭按钮、查看更多链接、单行</AtNoticebar>
</View>
<View className='example'>
<View className='bar-item'>
<AtNoticebar close single>这是 NoticeBar 通告栏。带关闭按钮、单行</AtNoticebar>
</View>
<View className='example'>
<View className='bar-item'>
<AtNoticebar close>这是 NoticeBar 通告栏。这是 NoticeBar 通告栏。这是 NoticeBar 通告栏。这是 NoticeBar 通告栏。这是 NoticeBar 通告栏。带关闭按钮、多行</AtNoticebar>
</View>
</View>
Expand Down
9 changes: 9 additions & 0 deletions src/pages/view/noticebar/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.panel__content {
.bar-item {
margin-bottom: 20px;

&:last-child {
margin-bottom: 0;
}
}
}

0 comments on commit 8a61a97

Please sign in to comment.