-
Notifications
You must be signed in to change notification settings - Fork 753
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
5 changed files
with
71 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Taro from '@tarojs/taro' | ||
import { View } from '@tarojs/components' | ||
import './index.scss' | ||
|
||
/** | ||
* @author:chenzeji | ||
* @description tabs 标签页 | ||
* @prop current {Number} 当前选中的tab index值,从0计数,default:0 | ||
* @prop color {String} 选中标签的颜色 | ||
* @prop scroll {Boolean} 是否横向滚动,default:false | ||
* @prop tabList {Array} tab 列表 eg: [{ title: '标签页1' }, { title: '标签页2' }] | ||
* @prop onClick {Function} 点击时触发事件,回调参数 {value: 1} | ||
*/ | ||
class AtTabsPane extends Taro.Component { | ||
render () { | ||
return <View className='tabs-pane'> | ||
{this.props.children} | ||
</View> | ||
} | ||
} | ||
|
||
export default AtTabsPane |
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,6 @@ | ||
.tabs-pane { | ||
display: inline-block; | ||
width: 100%; | ||
white-space: initial; | ||
vertical-align: top; | ||
} |
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