index.js 2.0 KB

123456789101112131415161718192021222324252627282930313233
  1. !(function (t) {
  2. const e = {};function n(r) {
  3. if (e[r]) return e[r].exports;const o = e[r] = { i: r, l: !1, exports: {} };return t[r].call(o.exports, o, o.exports, n), o.l = !0, o.exports;
  4. }n.m = t, n.c = e, n.d = function (t, e, r) {
  5. n.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: r });
  6. }, n.r = function (t) {
  7. 'undefined' !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: 'Module' }), Object.defineProperty(t, '__esModule', { value: !0 });
  8. }, n.t = function (t, e) {
  9. if (1 & e && (t = n(t)), 8 & e) return t;if (4 & e && 'object' === typeof t && t && t.__esModule) return t;const r = Object.create(null);if (n.r(r), Object.defineProperty(r, 'default', { enumerable: !0, value: t }), 2 & e && 'string' !== typeof t) for (const o in t)n.d(r, o, (e => t[e]).bind(null, o));return r;
  10. }, n.n = function (t) {
  11. const e = t && t.__esModule ? function () {
  12. return t.default;
  13. } : function () {
  14. return t;
  15. };return n.d(e, 'a', e), e;
  16. }, n.o = function (t, e) {
  17. return Object.prototype.hasOwnProperty.call(t, e);
  18. }, n.p = '', n(n.s = 25);
  19. }({ 25(t, e) {
  20. Component({ externalClasses: ['ext-class'], options: { addGlobalClass: !0 }, properties: { name: { type: String, value: '' }, color: { type: String, value: '' }, size: { type: [Number, String], value: '24px' }, src: { type: String, value: '' } }, data: { styles: '' }, ready() {
  21. this._addUnit(this.data.size), this._addColor(this.data.color);
  22. }, methods: { _addUnit(t) {
  23. const e = function (t) {
  24. return +t ? ''.concat(t, 'px') : t;
  25. };if (this.data.src) {
  26. const n = e(t);this.setData({ styles: this.data.styles + 'width: '.concat(n, ';') + 'height: '.concat(n, ';') });
  27. } else {
  28. const r = e(t);this.setData({ styles: this.data.styles + 'font-size: '.concat(r, ';') });
  29. }
  30. }, _addColor(t) {
  31. this.setData({ styles: this.data.styles + (this.data.color ? 'color: '.concat(this.data.color, ';') : '') });
  32. } } });
  33. } }));