@huyooo/ui 0.10.1 → 0.10.2
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/dist/components/Download/DesktopDownloads.vue.d.ts +1 -6
- package/dist/components/Download/DownloadDropdown.vue.d.ts +0 -2
- package/dist/composables/useDownloads.d.ts +1 -3
- package/dist/composables.js +1 -1
- package/dist/main.js +85 -93
- package/dist/style.css +1 -1
- package/dist/useDownloads-COXmopbe.js +57 -0
- package/package.json +1 -1
- package/dist/useDownloads-CpbLR--j.js +0 -52
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { g as f } from "./apiClients-DJchWBAG.js";
|
|
3
|
+
import { Message as u } from "@arco-design/web-vue";
|
|
4
|
+
import { ref as e } from "vue";
|
|
5
|
+
function g(s) {
|
|
6
|
+
const o = e(!1), n = e(), a = e(!1), l = e(""), r = e("");
|
|
7
|
+
function t(i) {
|
|
8
|
+
u.success(i), a.value = !1, o.value = !1, s("confirm");
|
|
9
|
+
}
|
|
10
|
+
function c() {
|
|
11
|
+
a.value = !1, console.log("handleClose"), s("cancel");
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
loading: o,
|
|
15
|
+
formRef: n,
|
|
16
|
+
submitSuccess: t,
|
|
17
|
+
modelType: l,
|
|
18
|
+
changeType: r,
|
|
19
|
+
show: a,
|
|
20
|
+
handleCancel: c
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function h() {
|
|
24
|
+
const s = e([]), o = e(!1), n = e(""), a = e("");
|
|
25
|
+
async function l() {
|
|
26
|
+
o.value = !0, n.value = "";
|
|
27
|
+
try {
|
|
28
|
+
const t = await (await fetch(`${f.onesPrefixUrl}/releases/latest`, {
|
|
29
|
+
method: "POST",
|
|
30
|
+
headers: {
|
|
31
|
+
"Content-Type": "application/json",
|
|
32
|
+
"app-id": f.appId
|
|
33
|
+
},
|
|
34
|
+
body: JSON.stringify({})
|
|
35
|
+
})).json();
|
|
36
|
+
a.value = t.version, s.value = t.downloads.map((c) => ({
|
|
37
|
+
...c,
|
|
38
|
+
icon: ""
|
|
39
|
+
}));
|
|
40
|
+
} catch {
|
|
41
|
+
n.value = "获取版本信息失败,请刷新重试";
|
|
42
|
+
} finally {
|
|
43
|
+
o.value = !1;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
downloads: s,
|
|
48
|
+
loading: o,
|
|
49
|
+
error: n,
|
|
50
|
+
version: a,
|
|
51
|
+
fetchDownloads: l
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
h as a,
|
|
56
|
+
g as u
|
|
57
|
+
};
|
package/package.json
CHANGED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/* empty css */
|
|
2
|
-
import "./apiClients-DJchWBAG.js";
|
|
3
|
-
import { Message as f } from "@arco-design/web-vue";
|
|
4
|
-
import { ref as e } from "vue";
|
|
5
|
-
function p(n) {
|
|
6
|
-
const o = e(!1), s = e(), a = e(!1), c = e(""), l = e("");
|
|
7
|
-
function u(r) {
|
|
8
|
-
f.success(r), a.value = !1, o.value = !1, n("confirm");
|
|
9
|
-
}
|
|
10
|
-
function t() {
|
|
11
|
-
a.value = !1, console.log("handleClose"), n("cancel");
|
|
12
|
-
}
|
|
13
|
-
return {
|
|
14
|
-
loading: o,
|
|
15
|
-
formRef: s,
|
|
16
|
-
submitSuccess: u,
|
|
17
|
-
modelType: c,
|
|
18
|
-
changeType: l,
|
|
19
|
-
show: a,
|
|
20
|
-
handleCancel: t
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function h() {
|
|
24
|
-
const n = e([]), o = e(!1), s = e(""), a = e("");
|
|
25
|
-
async function c({
|
|
26
|
-
versionApi: l
|
|
27
|
-
}) {
|
|
28
|
-
o.value = !0, s.value = "";
|
|
29
|
-
try {
|
|
30
|
-
const t = await (await fetch(l)).json();
|
|
31
|
-
a.value = t.version, n.value = t.downloads.map((r) => ({
|
|
32
|
-
...r,
|
|
33
|
-
icon: ""
|
|
34
|
-
}));
|
|
35
|
-
} catch {
|
|
36
|
-
s.value = "获取版本信息失败,请刷新重试";
|
|
37
|
-
} finally {
|
|
38
|
-
o.value = !1;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return {
|
|
42
|
-
downloads: n,
|
|
43
|
-
loading: o,
|
|
44
|
-
error: s,
|
|
45
|
-
version: a,
|
|
46
|
-
fetchDownloads: c
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
export {
|
|
50
|
-
h as a,
|
|
51
|
-
p as u
|
|
52
|
-
};
|