-
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
38 changed files
with
626 additions
and
584 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 |
---|---|---|
@@ -1,15 +1,10 @@ | ||
import Taro from '@tarojs/taro' | ||
import Taro, { Component } from '@tarojs/taro' | ||
import { View } from '@tarojs/components' | ||
|
||
import AtActionSheetItem from './item/index.js' | ||
|
||
import './index.scss' | ||
|
||
export default class AtActionSheetBody extends Taro.Component { | ||
static Item = AtActionSheetItem | ||
|
||
export default class AtActionSheetBody extends Component { | ||
render () { | ||
const { children } = this.props | ||
return <View className='at-action-sheet-body'>{children}</View> | ||
return <View className='at-action-sheet-body'>{this.props.children}</View> | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,41 +1,47 @@ | ||
import Taro from '@tarojs/taro' | ||
import { View, Text, Image } from '@tarojs/components' | ||
|
||
import { View, Text } from '@tarojs/components' | ||
|
||
import AtIcon from '../icon/index' | ||
import PropTypes from 'prop-types' | ||
|
||
import './index.scss' | ||
|
||
export default class AtCard extends Taro.Component { | ||
render () { | ||
const { | ||
children, | ||
title, | ||
note, | ||
icon, | ||
iconColor, | ||
iconSize, | ||
extra | ||
} = this.props | ||
const { title, note, extra, thumb, onClick } = this.props | ||
|
||
return ( | ||
<View className='at-card'> | ||
<View className='at-card' onClick={onClick}> | ||
<View className='at-card-header'> | ||
<View className='at-card-header__icon'> | ||
<AtIcon value={icon} size={iconSize} color={iconColor} /> | ||
</View> | ||
{thumb && ( | ||
<View className='at-card-header__thumb'> | ||
<Image | ||
className='at-card-header__thumb-info' | ||
mode='scaleToFill' | ||
src={thumb} | ||
/> | ||
</View> | ||
)} | ||
<Text className='at-card-header__title'>{title}</Text> | ||
<Text className='at-card-header__extra'>{extra}</Text> | ||
{extra && <Text className='at-card-header__extra'>{extra}</Text>} | ||
</View> | ||
<View className='at-card-content'> | ||
<View className='at-card-content__info'>{children}</View> | ||
<View className='at-card-content__note'>{note}</View> | ||
<View className='at-card-content__info'>{this.props.children}</View> | ||
{note && <View className='at-card-content__note'>{note}</View>} | ||
</View> | ||
</View> | ||
) | ||
} | ||
} | ||
|
||
AtCard.defaultProps = { | ||
iconSize: 18 | ||
iconSize: 18, | ||
onClick: () => {} | ||
} | ||
|
||
AtCard.propTypes = { | ||
note: PropTypes.string, | ||
thumb: PropTypes.string, | ||
title: PropTypes.string, | ||
extra: PropTypes.string, | ||
onClick: PropTypes.func | ||
} |
Oops, something went wrong.