-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathluvely.es.js
62 lines (62 loc) · 1.98 KB
/
luvely.es.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("button{color:#fff;background:#00f;border:0;cursor:pointer;padding:5px 10px;border-radius:5px}button:hover{color:#fff;background:navy;border:0;cursor:pointer;padding:5px 10px;border-radius:5px}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
import { defineComponent as a, ref as u, openBlock as l, createElementBlock as p, createElementVNode as c, toDisplayString as o, unref as _ } from "vue";
async function d(e, t = "https://your-restful-endpoint") {
console.log("pending"), e.value = "pending", await fetch(t).then((n) => (n.ok ? e.value = "success" : e.value = "error", console.log(e.value), n)).catch(() => {
e.value = "error", console.log(e.value);
});
}
const f = { "data-testid": "span" }, m = { "data-testid": "state" }, g = /* @__PURE__ */ a({
__name: "TestComponent",
props: {
text: { type: String, default: "State" }
},
setup(e) {
const t = u("idle"), n = () => d(t);
return (r, s) => (l(), p("button", {
onClick: n,
"data-testid": "TestComponent"
}, [
c(
"span",
f,
o(e.text) + ": ",
1
/* TEXT */
),
c(
"span",
m,
o(t.value),
1
/* TEXT */
)
]));
}
}), i = (e, t) => {
const n = e.__vccOpts || e;
for (const [r, s] of t)
n[r] = s;
return n;
}, y = /* @__PURE__ */ i(g, [["__file", "/app/lib/components/TestComponent.vue"]]);
function v(e) {
return e === void 0 ? "Hello!" : `Hello ${e}!`;
}
const h = /* @__PURE__ */ a({
__name: "TestGreeting",
props: {
name: { type: String, required: !1 }
},
setup(e) {
return (t, n) => (l(), p(
"h1",
null,
o(_(v)(t.name)),
1
/* TEXT */
));
}
}), C = /* @__PURE__ */ i(h, [["__file", "/app/lib/components/TestGreeting.vue"]]);
export {
y as TestComponent,
C as TestGreeting
};