vft 0.0.46 → 0.0.47
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,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { addUnit as
|
|
3
|
-
import { useNamespace as
|
|
1
|
+
import { defineComponent as s, computed as n, unref as t, openBlock as i, createElementBlock as c, normalizeClass as l, normalizeStyle as d } from "vue";
|
|
2
|
+
import { addUnit as y } from "@vft/utils";
|
|
3
|
+
import { useNamespace as g } from "../../hooks/use-namespace/index.js";
|
|
4
4
|
import "@popperjs/core";
|
|
5
5
|
import "lodash";
|
|
6
6
|
import "../../hooks/use-z-index/index.js";
|
|
7
7
|
import "@vueuse/core";
|
|
8
8
|
import "../../utils/ns-cover.js";
|
|
9
9
|
import "../config-provider/index.js";
|
|
10
|
-
import { useGlobalConfig as
|
|
11
|
-
const
|
|
10
|
+
import { useGlobalConfig as z } from "../config-provider/hooks/use-global-config.js";
|
|
11
|
+
const k = ["src"], a = (
|
|
12
12
|
/* hoist-static*/
|
|
13
|
-
|
|
14
|
-
),
|
|
15
|
-
name:
|
|
16
|
-
}), N = /* @__PURE__ */
|
|
17
|
-
...
|
|
13
|
+
g("icon")
|
|
14
|
+
), p = s({
|
|
15
|
+
name: a.b()
|
|
16
|
+
}), N = /* @__PURE__ */ s({
|
|
17
|
+
...p,
|
|
18
18
|
props: {
|
|
19
19
|
icon: null,
|
|
20
20
|
size: { default: 14 },
|
|
@@ -24,22 +24,22 @@ const z = ["src"], s = (
|
|
|
24
24
|
scale: null
|
|
25
25
|
},
|
|
26
26
|
setup(e) {
|
|
27
|
-
const
|
|
27
|
+
const r = z(), m = n(() => ({
|
|
28
28
|
color: e.color,
|
|
29
|
-
fontSize: e.size ?
|
|
30
|
-
animation: e.rotate ? `${
|
|
29
|
+
fontSize: e.size ? y(e.size) : "14px",
|
|
30
|
+
animation: e.rotate ? `${r.value.namespace}-rotate 1s linear 0s infinite` : void 0,
|
|
31
31
|
cursor: e.cursor ? "pointer" : void 0,
|
|
32
32
|
transform: e.scale ? `scale(${e.scale})` : void 0
|
|
33
|
-
})),
|
|
34
|
-
return (o, v) => t(
|
|
33
|
+
})), u = (o) => o == null ? void 0 : o.includes("/"), f = n(() => u(e.icon));
|
|
34
|
+
return (o, v) => t(f) ? (i(), c("img", {
|
|
35
35
|
key: 0,
|
|
36
|
-
class:
|
|
36
|
+
class: l(t(a).e("image")),
|
|
37
37
|
src: e.icon,
|
|
38
38
|
alt: ""
|
|
39
|
-
}, null, 10,
|
|
39
|
+
}, null, 10, k)) : (i(), c("i", {
|
|
40
40
|
key: 1,
|
|
41
|
-
class:
|
|
42
|
-
style:
|
|
41
|
+
class: l([e.icon]),
|
|
42
|
+
style: d(t(m))
|
|
43
43
|
}, null, 6));
|
|
44
44
|
}
|
|
45
45
|
});
|
package/es/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@vft/utils"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@vft/utils"),u=require("../../hooks/use-namespace/index.cjs");require("@popperjs/core");require("lodash");require("../../hooks/use-z-index/index.cjs");require("@vueuse/core");require("../../utils/ns-cover.cjs");require("../config-provider/index.cjs");const a=require("../config-provider/hooks/use-global-config.cjs"),d=["src"],t=u.useNamespace("icon"),f=e.defineComponent({name:t.b()}),m=e.defineComponent({...f,props:{icon:null,size:{default:14},color:{default:"black"},rotate:{type:Boolean},cursor:{type:Boolean},scale:null},setup(n){const l=a.useGlobalConfig(),c=e.computed(()=>({color:n.color,fontSize:n.size?s.addUnit(n.size):"14px",animation:n.rotate?`${l.value.namespace}-rotate 1s linear 0s infinite`:void 0,cursor:n.cursor?"pointer":void 0,transform:n.scale?`scale(${n.scale})`:void 0})),i=o=>o==null?void 0:o.includes("/"),r=e.computed(()=>i(n.icon));return(o,q)=>e.unref(r)?(e.openBlock(),e.createElementBlock("img",{key:0,class:e.normalizeClass(e.unref(t).e("image")),src:n.icon,alt:""},null,10,d)):(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass([n.icon]),style:e.normalizeStyle(e.unref(c))},null,6))}});exports.default=m;
|
package/lib/package.json.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.47";exports.version=e;
|