mv-iconfront 1.0.9 → 1.1.0
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.
- package/README.md +1 -14
- package/dist/mv-iconfront.es.js +7 -7
- package/dist/mv-iconfront.umd.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -99,17 +99,4 @@ import 'mv-iconfront/dist/style.css'
|
|
|
99
99
|
| `color` | String | `''` | 自定义颜色覆盖 (hex, rgb 等) |
|
|
100
100
|
| `size` | String/Number | `''` | 字体大小。纯数字会被视为 `px` 单位。 |
|
|
101
101
|
| `isRed` | Boolean | `false` | 设置图标为红色 (`#f56c6c`)。 |
|
|
102
|
-
| `disabled` | Boolean | `false` |
|
|
103
|
-
|
|
104
|
-
## 构建与发布
|
|
105
|
-
|
|
106
|
-
1. 构建库 (生成 JS 和 类型定义文件):
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
npm run build
|
|
110
|
-
```
|
|
111
|
-
2. 发布到 npm:
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
npm publish
|
|
115
|
-
```
|
|
102
|
+
| `disabled` | Boolean | `false` | 设置图标透明度为0.4 并将鼠标样式设为禁止。 |
|
package/dist/mv-iconfront.es.js
CHANGED
|
@@ -43,7 +43,7 @@ const m = a({
|
|
|
43
43
|
return {
|
|
44
44
|
iconStyle: c(() => {
|
|
45
45
|
const o = {};
|
|
46
|
-
if (e.disabled ? o.
|
|
46
|
+
if (e.disabled ? o.opacity = "0.4 !important" : e.isRed ? o.color = "#f56c6c !important" : e.color ? o.color = `${e.color} !important` : o.color = `${t} !important`, e.size) {
|
|
47
47
|
const n = e.size.toString();
|
|
48
48
|
o.fontSize = n.endsWith("px") || n.endsWith("rem") ? n : `${n}px`;
|
|
49
49
|
}
|
|
@@ -51,24 +51,24 @@ const m = a({
|
|
|
51
51
|
})
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
}),
|
|
54
|
+
}), p = (e, t) => {
|
|
55
55
|
const l = e.__vccOpts || e;
|
|
56
56
|
for (const [o, n] of t)
|
|
57
57
|
l[o] = n;
|
|
58
58
|
return l;
|
|
59
59
|
};
|
|
60
|
-
function
|
|
60
|
+
function y(e, t, l, o, n, g) {
|
|
61
61
|
return i(), f("i", s({
|
|
62
62
|
class: ["icon2", e.name, { "is-disabled": e.disabled }],
|
|
63
63
|
style: e.iconStyle
|
|
64
64
|
}, e.$attrs), null, 16);
|
|
65
65
|
}
|
|
66
|
-
const
|
|
67
|
-
t != null && t.defaultColor && d({ defaultColor: t.defaultColor }), e.component("MvIconfront",
|
|
66
|
+
const C = /* @__PURE__ */ p(m, [["render", y]]), F = (e, t) => {
|
|
67
|
+
t != null && t.defaultColor && d({ defaultColor: t.defaultColor }), e.component("MvIconfront", C);
|
|
68
68
|
}, $ = {
|
|
69
|
-
install:
|
|
69
|
+
install: F
|
|
70
70
|
};
|
|
71
71
|
export {
|
|
72
|
-
|
|
72
|
+
C as MvIconfront,
|
|
73
73
|
$ as default
|
|
74
74
|
};
|
package/dist/mv-iconfront.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(l,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(l=typeof globalThis<"u"?globalThis:l||self,t(l.MvIconfront={},l.Vue))})(this,function(l,t){"use strict";const f={defaultColor:"#FFFFFF"};function s(e){e.defaultColor&&(f.defaultColor=e.defaultColor)}function
|
|
1
|
+
(function(l,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(l=typeof globalThis<"u"?globalThis:l||self,t(l.MvIconfront={},l.Vue))})(this,function(l,t){"use strict";const f={defaultColor:"#FFFFFF"};function s(e){e.defaultColor&&(f.defaultColor=e.defaultColor)}function a(){return f}const d=t.defineComponent({name:"MvIconfront",props:{name:{type:String,default:""},color:{type:String,default:""},size:{type:[String,Number],default:""},isRed:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){const o=a().defaultColor||"#FFFFFF";return{iconStyle:t.computed(()=>{const n={};if(e.disabled?n.opacity="0.4 !important":e.isRed?n.color="#f56c6c !important":e.color?n.color=`${e.color} !important`:n.color=`${o} !important`,e.size){const i=e.size.toString();n.fontSize=i.endsWith("px")||i.endsWith("rem")?i:`${i}px`}return n})}}}),u=(e,o)=>{const r=e.__vccOpts||e;for(const[n,i]of o)r[n]=i;return r};function m(e,o,r,n,i,g){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=u(d,[["render",m]]),p={install:(e,o)=>{o!=null&&o.defaultColor&&s({defaultColor:o.defaultColor}),e.component("MvIconfront",c)}};l.MvIconfront=c,l.default=p,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|