@vmz/plugin-iconify 0.2.3 → 0.2.4
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/components/Iconify.vmz +8 -9
- package/package.json +2 -2
package/components/Iconify.vmz
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
2
|
+
<span v-html="html != null ? html : iconFallback(name)" class="iconify-host" />
|
|
3
3
|
</template>
|
|
4
|
-
|
|
5
4
|
<script client>
|
|
6
|
-
import { loadIconSvg, iconFallback } from
|
|
5
|
+
import { loadIconSvg, iconFallback } from "@vmz/plugin-iconify/runtime";
|
|
7
6
|
|
|
8
7
|
export default class Iconify {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
/** Iconify id, e.g. `mdi:home`. */
|
|
9
|
+
public name: string = "";
|
|
10
|
+
html: string | null = null;
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
async onMount() {
|
|
13
|
+
this.html = (await loadIconSvg(this.name)) || iconFallback(this.name);
|
|
14
|
+
}
|
|
16
15
|
}
|
|
17
16
|
</script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vmz/plugin-iconify",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "VMZ Iconify adapter - <Iconify>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@vmz/plugin": "0.2.
|
|
20
|
+
"@vmz/plugin": "0.2.4"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@iconify/utils": ">=2"
|