@elmethis/core 1.0.0-alpha.177 → 1.0.0-alpha.178
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,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, normalizeStyle, normalizeClass, createCommentVNode, createTextVNode, createVNode, toDisplayString, unref } from "vue";
|
|
1
|
+
import { defineComponent, ref, createElementBlock, openBlock, normalizeStyle, normalizeClass, createCommentVNode, createTextVNode, createVNode, toDisplayString, unref } from "vue";
|
|
2
2
|
import { Icon } from "@iconify/vue";
|
|
3
3
|
const _hoisted_1 = ["href", "target"];
|
|
4
4
|
const _hoisted_2 = ["src"];
|
|
@@ -21,8 +21,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
props.onClick();
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
+
const faviconSrc = ref(props.favicon);
|
|
24
25
|
const handleError = () => {
|
|
25
|
-
|
|
26
|
+
faviconSrc.value = `data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="gray" d="M17.9 17.39c-.26-.8-1.01-1.39-1.9-1.39h-1v-3a1 1 0 0 0-1-1H8v-2h2a1 1 0 0 0 1-1V7h2a2 2 0 0 0 2-2v-.41a7.984 7.984 0 0 1 2.9 12.8M11 19.93c-3.95-.49-7-3.85-7-7.93c0-.62.08-1.22.21-1.79L9 15v1a2 2 0 0 0 2 2m1-16A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2"/></svg>`;
|
|
26
27
|
};
|
|
27
28
|
return (_ctx, _cache) => {
|
|
28
29
|
return openBlock(), createElementBlock("a", {
|
|
@@ -33,9 +34,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
34
|
rel: "noopener noreferrer",
|
|
34
35
|
onClick: handleClick
|
|
35
36
|
}, [
|
|
36
|
-
|
|
37
|
+
faviconSrc.value ? (openBlock(), createElementBlock("img", {
|
|
37
38
|
key: 0,
|
|
38
|
-
src:
|
|
39
|
+
src: faviconSrc.value,
|
|
39
40
|
alt: "favicon",
|
|
40
41
|
onError: handleError,
|
|
41
42
|
class: normalizeClass(_ctx.$style.icon)
|