uni-rate.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. (global.webpackJsonp = global.webpackJsonp || []).push([ [ "components/uni-rate/uni-rate" ], {
  2. 497: function(n, e, t) {
  3. t.r(e);
  4. var o = t(498), r = t(500);
  5. for (var c in r) "default" !== c && function(n) {
  6. t.d(e, n, function() {
  7. return r[n];
  8. });
  9. }(c);
  10. t(502);
  11. var i = t(13), a = Object(i.default)(r.default, o.render, o.staticRenderFns, !1, null, "b7a28ab8", null, !1, o.components, void 0);
  12. a.options.__file = "components/uni-rate/uni-rate.vue", e.default = a.exports;
  13. },
  14. 498: function(n, e, t) {
  15. t.r(e);
  16. var o = t(499);
  17. t.d(e, "render", function() {
  18. return o.render;
  19. }), t.d(e, "staticRenderFns", function() {
  20. return o.staticRenderFns;
  21. }), t.d(e, "recyclableRender", function() {
  22. return o.recyclableRender;
  23. }), t.d(e, "components", function() {
  24. return o.components;
  25. });
  26. },
  27. 499: function(n, e, t) {
  28. var o;
  29. t.r(e), t.d(e, "render", function() {
  30. return r;
  31. }), t.d(e, "staticRenderFns", function() {
  32. return i;
  33. }), t.d(e, "recyclableRender", function() {
  34. return c;
  35. }), t.d(e, "components", function() {
  36. return o;
  37. });
  38. try {
  39. o = {
  40. uniIcons: function() {
  41. return Promise.all([ t.e("common/vendor"), t.e("components/uni-icons/uni-icons") ]).then(t.bind(null, 541));
  42. }
  43. };
  44. } catch (n) {
  45. if (-1 === n.message.indexOf("Cannot find module") || -1 === n.message.indexOf(".vue")) throw n;
  46. console.error(n.message), console.error("1. 排查组件名称拼写是否正确"), console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),
  47. console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件");
  48. }
  49. var r = function() {
  50. var n = this;
  51. n.$createElement;
  52. n._self._c;
  53. }, c = !1, i = [];
  54. r._withStripped = !0;
  55. },
  56. 500: function(n, e, t) {
  57. t.r(e);
  58. var o = t(501), r = t.n(o);
  59. for (var c in o) "default" !== c && function(n) {
  60. t.d(e, n, function() {
  61. return o[n];
  62. });
  63. }(c);
  64. e.default = r.a;
  65. },
  66. 501: function(n, e, t) {
  67. Object.defineProperty(e, "__esModule", {
  68. value: !0
  69. }), e.default = void 0;
  70. var o = {
  71. name: "UniRate",
  72. components: {
  73. uniIcons: function() {
  74. Promise.all([ t.e("common/vendor"), t.e("components/uni-icons/uni-icons") ]).then(function() {
  75. return resolve(t(541));
  76. }.bind(null, t)).catch(t.oe);
  77. }
  78. },
  79. props: {
  80. isFill: {
  81. type: [ Boolean, String ],
  82. default: !0
  83. },
  84. color: {
  85. type: String,
  86. default: "#ececec"
  87. },
  88. activeColor: {
  89. type: String,
  90. default: "#ffca3e"
  91. },
  92. size: {
  93. type: [ Number, String ],
  94. default: 24
  95. },
  96. value: {
  97. type: [ Number, String ],
  98. default: 0
  99. },
  100. max: {
  101. type: [ Number, String ],
  102. default: 5
  103. },
  104. margin: {
  105. type: [ Number, String ],
  106. default: 0
  107. },
  108. disabled: {
  109. type: [ Boolean, String ],
  110. default: !1
  111. }
  112. },
  113. data: function() {
  114. return {
  115. valueSync: ""
  116. };
  117. },
  118. computed: {
  119. stars: function() {
  120. for (var n = this.valueSync ? this.valueSync : 0, e = [], t = Math.floor(n), o = Math.ceil(n), r = 0; r < this.max; r++) t > r ? e.push({
  121. activeWitch: "100%"
  122. }) : o - 1 === r ? e.push({
  123. activeWitch: 100 * (n - t) + "%"
  124. }) : e.push({
  125. activeWitch: "0"
  126. });
  127. return console.log("starList[4]: " + e[4].activeWitch), e;
  128. }
  129. },
  130. created: function() {
  131. this.valueSync = Number(this.value);
  132. },
  133. methods: {
  134. _onClick: function(n) {
  135. this.disabled || (this.valueSync = n + 1, this.$emit("change", {
  136. value: this.valueSync
  137. }));
  138. }
  139. }
  140. };
  141. e.default = o;
  142. },
  143. 502: function(n, e, t) {
  144. t.r(e);
  145. var o = t(503), r = t.n(o);
  146. for (var c in o) "default" !== c && function(n) {
  147. t.d(e, n, function() {
  148. return o[n];
  149. });
  150. }(c);
  151. e.default = r.a;
  152. },
  153. 503: function(n, e, t) {}
  154. } ]), (global.webpackJsonp = global.webpackJsonp || []).push([ "components/uni-rate/uni-rate-create-component", {
  155. "components/uni-rate/uni-rate-create-component": function(n, e, t) {
  156. t("1").createComponent(t(497));
  157. }
  158. }, [ [ "components/uni-rate/uni-rate-create-component" ] ] ]);