Skip to content

Commit

Permalink
build: Travis CI automatic compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
juzi214032 committed Dec 21, 2020
1 parent 1309944 commit 1855a7a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
32 changes: 18 additions & 14 deletions examples/dist/rate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Component({
/**
* 组件的属性列表
*/
externalClasses: ['l-class', 'l-class-icon','l-class-image', 'l-icon-class','l-image-class'],
externalClasses: ['l-class', 'l-class-icon', 'l-class-image', 'l-icon-class', 'l-image-class'],
options: {
multipleSlots: true // 在组件定义时的选项中启用多slot支持
},
Expand All @@ -13,7 +13,7 @@ Component({
type: Number,
value: 5
},
score:{
score: {
type: Number,
value: 0
},
Expand All @@ -30,12 +30,16 @@ Component({
type: String,
value: '#FFE5E5'
},
name:{
type:String,
value:'favor-fill'
name: {
type: String,
value: 'favor-fill'
},
activeImage:String,
inActiveImage:String
activeImage: String,
inActiveImage: String,
itemGap: {
type: Number,
value: 10
}
},

/**
Expand All @@ -49,21 +53,21 @@ Component({
* 组件的方法列表
*/
methods: {
handleClick(e){
if(this.data.disabled) return;
const {index} = e.currentTarget.dataset;
handleClick(e) {
if (this.data.disabled) return;
const { index } = e.currentTarget.dataset;
this.setData({
score:index + 1
score: index + 1
});
this.triggerEvent('linchange',{score:index+1});
eventBus.emit(`lin-form-change-${this.id}`,this.id);
this.triggerEvent('linchange', { score: index + 1 });
eventBus.emit(`lin-form-change-${this.id}`, this.id);
},
getValues() {
return this.data.score;
},
reset() {
this.setData({
score:0
score: 0
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/dist/rate/index.wxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<view class="l-rate l-class">
<view wx:for="{{count}}" wx:key="item" class="l-rate-star" data-index="{{index}}" mut-bind:tap="handleClick">
<view style="{{itemGap&&index!=0?'margin-left:'+itemGap+'rpx':''}}" wx:for="{{count}}" wx:key="item" class="l-rate-star" data-index="{{index}}" mut-bind:tap="handleClick">
<view class="icon-checked" wx:if="{{score > index}}" hover-class="none" hover-stop-propagation="false" data-rate="{{score-index}}" style="width:{{score-index<1?(score-index)*100:100}}%">
<image wx:if="{{activeImage && inActiveImage}}" class="image-item l-class-image l-image-class" src="{{activeImage}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false"></image>
<l-icon wx:else name="{{name}}" l-class="l-class-icon l-icon-class" size="{{size}}" color="{{activeColor}}" />
Expand Down
2 changes: 1 addition & 1 deletion examples/dist/rate/index.wxss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
.l-rate,.l-rate-star{display:inline-flex}.l-rate-star{position:relative}.l-rate-star~.l-rate-star{margin-left:10rpx}.icon-checked{position:absolute;overflow:hidden;display:flex}.image-item{width:80rpx;height:80rpx}
.l-rate,.l-rate-star{display:inline-flex}.l-rate-star{position:relative}.icon-checked{position:absolute;overflow:hidden;display:flex}.image-item{width:80rpx;height:80rpx}

0 comments on commit 1855a7a

Please sign in to comment.