init
This commit is contained in:
10
components/xiao-star-component/xiao-star-component.js
Normal file
10
components/xiao-star-component/xiao-star-component.js
Normal file
@@ -0,0 +1,10 @@
|
||||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/xiao-star-component/xiao-star-component"],{2869:function(t,r,s){"use strict";s.r(r);var a=s("b5d2"),n=s("62aa");for(var i in n)["default"].indexOf(i)<0&&function(t){s.d(r,t,(function(){return n[t]}))}(i);s("705d");var u=s("828b"),o=Object(u["a"])(n["default"],a["b"],a["c"],!1,null,"23be533a",null,!1,a["a"],void 0);r["default"]=o.exports},"32cc":function(t,r,s){},"62aa":function(t,r,s){"use strict";s.r(r);var a=s("ec8f"),n=s.n(a);for(var i in a)["default"].indexOf(i)<0&&function(t){s.d(r,t,(function(){return a[t]}))}(i);r["default"]=n.a},"705d":function(t,r,s){"use strict";var a=s("32cc"),n=s.n(a);n.a},b5d2:function(t,r,s){"use strict";s.d(r,"b",(function(){return a})),s.d(r,"c",(function(){return n})),s.d(r,"a",(function(){}));var a=function(){var t=this.$createElement;this._self._c},n=[]},ec8f:function(t,r,s){"use strict";var a=s("47a9");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=a(s("af34")),i={data:function(){return{starArr:[],star_count:0,isTapZuihou:!1}},props:{starCount:{type:Number,default:0},isEvaluate:{type:Boolean,default:!1}},watch:{starCount:function(t,r){this.star_count=JSON.parse(JSON.stringify(t))}},mounted:function(){this.star_count=JSON.parse(JSON.stringify(this.starCount));var t=this.star_count/2;if(-1!=String(this.starCount).indexOf(".")){var r=parseInt(t);this.starPushFn(!1,r)}else{var s=parseInt(t);this.starPushFn(!0,s)}},methods:{evaluateTap:function(t,r){var s=this;if(this.isEvaluate){var a=this.starArr.slice(r),i=this.starArr.slice(0,r),u=r+1;if(1==t){var o=[];if(a.forEach((function(t,r){o.push(2)})),i.length<=0&&this.isTapZuihou)return this.starArr=[],this.starFor((function(t){s.starArr.push(2)})),this.isTapZuihou=!1,void(this.star_count=0);i.length<=0&&(this.isTapZuihou=!0),3==i.length?this.star_count=8:2==i.length?this.star_count=6:1==i.length?this.star_count=4:0==i.length&&(this.star_count=2),this.$emit("evaluateChange",this.star_count),this.starArr=[].concat((0,n.default)(i),o)}else 4==r?this.star_count=10:3==r?this.star_count=8:2==r?this.star_count=6:1==r?this.star_count=4:0==r&&(this.star_count=2);this.starFor((function(t){t<u&&(2==s.starArr[t]&&(s.starArr[t]=1),s.starArr=Object.assign([],s.starArr))})),this.$emit("evaluateChange",this.star_count)}},starFor:function(t){for(var r=0;r<5;r++)t(r)},starPushFn:function(t,r){var s=this;t?this.starFor((function(t){t<r?s.starArr.push(1):s.starArr.push(2)})):this.starFor((function(t){t<r?s.starArr.push(1):t<=r?s.starArr.push(3):s.starArr.push(2)}))}}};r.default=i}}]);
|
||||
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
||||
'components/xiao-star-component/xiao-star-component-create-component',
|
||||
{
|
||||
'components/xiao-star-component/xiao-star-component-create-component':(function(module, exports, __webpack_require__){
|
||||
__webpack_require__('df3c')['createComponent'](__webpack_require__("2869"))
|
||||
})
|
||||
},
|
||||
[['components/xiao-star-component/xiao-star-component-create-component']]
|
||||
]);
|
||||
4
components/xiao-star-component/xiao-star-component.json
Normal file
4
components/xiao-star-component/xiao-star-component.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
components/xiao-star-component/xiao-star-component.wxml
Normal file
1
components/xiao-star-component/xiao-star-component.wxml
Normal file
@@ -0,0 +1 @@
|
||||
<view class="star-container data-v-23be533a"><view class="star-view star-view data-v-23be533a" style="display:flex;align-items:center;height:36rpx;overflow:hidden;margin-top:2rpx;"><view class="star-icon-con data-v-23be533a"><block wx:for="{{starArr}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['evaluateTap',['$0',index],[[['starArr','',index]]]]]]]}}" class="{{['data-v-23be533a',item==3?'iconfont star-icon-item-font iconai65':item==1?'iconfont star-icon-item-font iconwujiaoxing1':'']}}" bindtap="__e"></view></block></view></view></view>
|
||||
1
components/xiao-star-component/xiao-star-component.wxss
Normal file
1
components/xiao-star-component/xiao-star-component.wxss
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user