diff --git a/examples/dist/rate/index.js b/examples/dist/rate/index.js index bf9a43c4..a99af63b 100644 --- a/examples/dist/rate/index.js +++ b/examples/dist/rate/index.js @@ -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支持 }, @@ -13,7 +13,7 @@ Component({ type: Number, value: 5 }, - score:{ + score: { type: Number, value: 0 }, @@ -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 + } }, /** @@ -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 }); } } diff --git a/examples/dist/rate/index.wxml b/examples/dist/rate/index.wxml index a80300d9..abce9c20 100644 --- a/examples/dist/rate/index.wxml +++ b/examples/dist/rate/index.wxml @@ -1,5 +1,5 @@ - + diff --git a/examples/dist/rate/index.wxss b/examples/dist/rate/index.wxss index ea751324..e9d82042 100644 --- a/examples/dist/rate/index.wxss +++ b/examples/dist/rate/index.wxss @@ -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} \ No newline at end of file +.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} \ No newline at end of file