mv-iconfront 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { defineComponent as r, computed as c, createElementBlock as l, openBlock as i, mergeProps as a } from "vue";
2
- const d = r({
1
+ import { defineComponent as c, computed as l, createElementBlock as r, openBlock as i, mergeProps as a } from "vue";
2
+ const d = c({
3
3
  name: "MvIconfront",
4
4
  props: {
5
5
  // The specific icon class, e.g. "icon-home"
@@ -17,6 +17,10 @@ const d = r({
17
17
  type: [String, Number],
18
18
  default: ""
19
19
  },
20
+ isRed: {
21
+ type: Boolean,
22
+ default: !1
23
+ },
20
24
  // Disabled state
21
25
  disabled: {
22
26
  type: Boolean,
@@ -25,34 +29,34 @@ const d = r({
25
29
  },
26
30
  setup(e) {
27
31
  return {
28
- iconStyle: c(() => {
32
+ iconStyle: l(() => {
29
33
  const t = {};
30
- if (e.disabled ? t.color = "#C0C4CC" : e.color && (t.color = e.color), e.size) {
31
- const n = e.size.toString();
32
- t.fontSize = n.endsWith("px") || n.endsWith("rem") ? n : `${n}px`;
34
+ if (e.disabled ? t.color = "#C0C4CC" : e.color && (t.color = e.color), e.isRed && (t.color = "#f56c6c"), e.size) {
35
+ const o = e.size.toString();
36
+ t.fontSize = o.endsWith("px") || o.endsWith("rem") ? o : `${o}px`;
33
37
  }
34
38
  return t;
35
39
  })
36
40
  };
37
41
  }
38
- }), f = (e, o) => {
42
+ }), f = (e, n) => {
39
43
  const t = e.__vccOpts || e;
40
- for (const [n, s] of o)
41
- t[n] = s;
44
+ for (const [o, s] of n)
45
+ t[o] = s;
42
46
  return t;
43
47
  };
44
- function p(e, o, t, n, s, y) {
45
- return i(), l("i", a({
48
+ function u(e, n, t, o, s, y) {
49
+ return i(), r("i", a({
46
50
  class: ["icon2", e.name, { "is-disabled": e.disabled }],
47
51
  style: e.iconStyle
48
52
  }, e.$attrs), null, 16);
49
53
  }
50
- const u = /* @__PURE__ */ f(d, [["render", p], ["__scopeId", "data-v-43694770"]]), m = (e) => {
51
- e.component("MvIconfront", u);
54
+ const p = /* @__PURE__ */ f(d, [["render", u], ["__scopeId", "data-v-4a2cb7e3"]]), m = (e) => {
55
+ e.component("MvIconfront", p);
52
56
  }, _ = {
53
57
  install: m
54
58
  };
55
59
  export {
56
- u as MvIconfront,
60
+ p as MvIconfront,
57
61
  _ as default
58
62
  };
@@ -1 +1 @@
1
- (function(n,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(n=typeof globalThis<"u"?globalThis:n||self,t(n.MvIconfront={},n.Vue))})(this,function(n,t){"use strict";const l=t.defineComponent({name:"MvIconfront",props:{name:{type:String,default:""},color:{type:String,default:"#FFFFFF"},size:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1}},setup(e){return{iconStyle:t.computed(()=>{const o={};if(e.disabled?o.color="#C0C4CC":e.color&&(o.color=e.color),e.size){const i=e.size.toString();o.fontSize=i.endsWith("px")||i.endsWith("rem")?i:`${i}px`}return o})}}}),d=(e,s)=>{const o=e.__vccOpts||e;for(const[i,r]of s)o[i]=r;return o};function f(e,s,o,i,r,p){return t.openBlock(),t.createElementBlock("i",t.mergeProps({class:["icon2",e.name,{"is-disabled":e.disabled}],style:e.iconStyle},e.$attrs),null,16)}const c=d(l,[["render",f],["__scopeId","data-v-43694770"]]),a={install:e=>{e.component("MvIconfront",c)}};n.MvIconfront=c,n.default=a,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(o,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(o=typeof globalThis<"u"?globalThis:o||self,t(o.MvIconfront={},o.Vue))})(this,function(o,t){"use strict";const r=t.defineComponent({name:"MvIconfront",props:{name:{type:String,default:""},color:{type:String,default:"#FFFFFF"},size:{type:[String,Number],default:""},isRed:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return{iconStyle:t.computed(()=>{const n={};if(e.disabled?n.color="#C0C4CC":e.color&&(n.color=e.color),e.isRed&&(n.color="#f56c6c"),e.size){const i=e.size.toString();n.fontSize=i.endsWith("px")||i.endsWith("rem")?i:`${i}px`}return n})}}}),d=(e,s)=>{const n=e.__vccOpts||e;for(const[i,l]of s)n[i]=l;return n};function f(e,s,n,i,l,p){return t.openBlock(),t.createElementBlock("i",t.mergeProps({class:["icon2",e.name,{"is-disabled":e.disabled}],style:e.iconStyle},e.$attrs),null,16)}const c=d(r,[["render",f],["__scopeId","data-v-4a2cb7e3"]]),a={install:e=>{e.component("MvIconfront",c)}};o.MvIconfront=c,o.default=a,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});