Skip to content

Commit

Permalink
fix(rate): 更换图标
Browse files Browse the repository at this point in the history
  • Loading branch information
jimczj committed Aug 6, 2018
1 parent d060638 commit fe57ab9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/components/rate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import './index.scss'
/**
* @author: chenzeji
* @description 评分组件
* @prop size {Number|String} 评分星星大小 default:30
* @prop size {Number|String} 评分星星大小 default:20
* @prop value {Number} 当前评分 default:0
* @prop max {Number} 最大评分 default:5
* @prop onChange {Function} 监听函数,数值改变时触发
Expand All @@ -31,12 +31,12 @@ class AtRate extends Taro.Component {
}
}
return <View className='at-rate' >
{rateArr.map((color, i) => <View className='at-rate__icon' key={i} onClick={this.handleClick.bind(this, i)}><AtIcon value='star' size={size} color={color} /></View>)}
{rateArr.map((color, i) => <View className='at-rate__icon' key={i} onClick={this.handleClick.bind(this, i)}><AtIcon value='star-2' size={size} color={color} /></View>)}
</View>
}
}
AtRate.defaultProps = {
size: 30,
size: 20,
value: 0,
max: 5,
onChange: () => {}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/form/rate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default class Index extends Taro.Component {
<View className='panel__title'>自定义星星大小</View>
<View className='panel__content'>
<View className='example-item'>
<AtRate size='20' value={this.state.rateValue} onChange={this.handleRateChange.bind(this)} />
<AtRate size='12' value={this.state.rateValue} onChange={this.handleRateChange.bind(this)} />
</View>
</View>
</View>
Expand Down

0 comments on commit fe57ab9

Please sign in to comment.