uni-rate.js 2.4 KB

12345678910
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/uni-rate/uni-rate"],{"2c4c":function(t,n,e){"use strict";var i=e("462d"),u=e.n(i);u.a},"462d":function(t,n,e){},"4b37":function(t,n,e){"use strict";e.d(n,"b",(function(){return u})),e.d(n,"c",(function(){return c})),e.d(n,"a",(function(){return i}));var i={uniIcons:function(){return Promise.all([e.e("common/vendor"),e.e("components/uni-icons/uni-icons")]).then(e.bind(null,"50b1"))}},u=function(){var t=this,n=t.$createElement;t._self._c},c=[]},"7dd6":function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=function(){Promise.all([e.e("common/vendor"),e.e("components/uni-icons/uni-icons")]).then(function(){return resolve(e("50b1"))}.bind(null,e)).catch(e.oe)},u={name:"UniRate",components:{uniIcons:i},props:{isFill:{type:[Boolean,String],default:!0},color:{type:String,default:"#ececec"},activeColor:{type:String,default:"#ffca3e"},size:{type:[Number,String],default:24},value:{type:[Number,String],default:0},max:{type:[Number,String],default:5},margin:{type:[Number,String],default:0},disabled:{type:[Boolean,String],default:!1}},data:function(){return{valueSync:""}},computed:{stars:function(){for(var t=this.valueSync?this.valueSync:0,n=[],e=Math.floor(t),i=Math.ceil(t),u=0;u<this.max;u++)e>u?n.push({activeWitch:"100%"}):i-1===u?n.push({activeWitch:100*(t-e)+"%"}):n.push({activeWitch:"0"});return console.log("starList[4]: "+n[4].activeWitch),n}},created:function(){this.valueSync=Number(this.value)},methods:{_onClick:function(t){this.disabled||(this.valueSync=t+1,this.$emit("change",{value:this.valueSync}))}}};n.default=u},b100:function(t,n,e){"use strict";e.r(n);var i=e("7dd6"),u=e.n(i);for(var c in i)"default"!==c&&function(t){e.d(n,t,(function(){return i[t]}))}(c);n["default"]=u.a},eafb:function(t,n,e){"use strict";e.r(n);var i=e("4b37"),u=e("b100");for(var c in u)"default"!==c&&function(t){e.d(n,t,(function(){return u[t]}))}(c);e("2c4c");var a,o=e("f0c5"),r=Object(o["a"])(u["default"],i["b"],i["c"],!1,null,"8c63e638",null,!1,i["a"],a);n["default"]=r.exports}}]);
  2. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  3. 'components/uni-rate/uni-rate-create-component',
  4. {
  5. 'components/uni-rate/uni-rate-create-component':(function(module, exports, __webpack_require__){
  6. __webpack_require__('543d')['createComponent'](__webpack_require__("eafb"))
  7. })
  8. },
  9. [['components/uni-rate/uni-rate-create-component']]
  10. ]);