小程序源码
This commit is contained in:
23
source/wx/xzs-student/component/iView/rate/index.wxml
Normal file
23
source/wx/xzs-student/component/iView/rate/index.wxml
Normal file
@@ -0,0 +1,23 @@
|
||||
<view class="i-class i-rate"
|
||||
bindtouchmove="handleTouchMove">
|
||||
<input type="text" :name="name" wx:value="{{value}}" class="i-rate-hide-input" />
|
||||
<view
|
||||
wx:for="{{count}}"
|
||||
wx:key="{{item}}"
|
||||
class="i-rate-star {{ parse.getCurrent( value,index ) }}"
|
||||
data-index="{{index}}"
|
||||
bindtap="handleClick">
|
||||
<i-icon type="collection_fill" size="{{size}}"></i-icon>
|
||||
</view>
|
||||
<view class="i-rate-text" wx:if="{{ value !== 0 }}"><slot></slot></view>
|
||||
</view>
|
||||
<wxs module="parse">
|
||||
var prefixCls = 'i-rate';
|
||||
module.exports = {
|
||||
getCurrent : function( value,index ){
|
||||
if( index < value ){
|
||||
return prefixCls + '-current'
|
||||
}
|
||||
}
|
||||
}
|
||||
</wxs>
|
||||
Reference in New Issue
Block a user