@huyooo/ui 0.4.74 → 0.4.77
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/common/downloadOptions.d.ts +56 -0
- package/dist/components/Download/BrowserExtensions.vue.d.ts +8 -0
- package/dist/components/Download/DesktopDownloads.vue.d.ts +7 -0
- package/dist/components/Download/DownloadCard.vue.d.ts +17 -0
- package/dist/components/Download/DownloadDropdown.vue.d.ts +5 -0
- package/dist/components/Download/DownloadGrid.vue.d.ts +17 -0
- package/dist/components/Download/DownloadSectionHeader.vue.d.ts +6 -0
- package/dist/components/Download/ExtensionCard.vue.d.ts +21 -0
- package/dist/components/Download/MobileDownloads.vue.d.ts +8 -0
- package/dist/composables/useDownloads.d.ts +39 -0
- package/dist/composables.d.ts +1 -0
- package/dist/composables.js +14 -13
- package/dist/download.d.ts +23 -0
- package/dist/index.js +714 -154
- package/dist/main.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/useDownloads-BkDo_wOR.js +103 -0
- package/package.json +1 -1
- package/dist/viewTransitions-C-ZLwiJ0.js +0 -55
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { Message as w } from "@arco-design/web-vue";
|
|
4
|
+
import { ref as l } from "vue";
|
|
5
|
+
function g(e) {
|
|
6
|
+
const o = l(!1), t = l(), a = l(!1), r = l(""), d = l("");
|
|
7
|
+
function n(s) {
|
|
8
|
+
w.success(s), a.value = !1, o.value = !1, e("confirm");
|
|
9
|
+
}
|
|
10
|
+
function i() {
|
|
11
|
+
a.value = !1, console.log("handleClose"), e("cancel");
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
loading: o,
|
|
15
|
+
formRef: t,
|
|
16
|
+
submitSuccess: n,
|
|
17
|
+
modelType: r,
|
|
18
|
+
changeType: d,
|
|
19
|
+
show: a,
|
|
20
|
+
handleCancel: i
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const f = l({
|
|
24
|
+
key: "",
|
|
25
|
+
name: ""
|
|
26
|
+
});
|
|
27
|
+
function D() {
|
|
28
|
+
function e(o, t) {
|
|
29
|
+
f.value.key = o, f.value.name = t;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
activeDoc: f,
|
|
33
|
+
setActiveDoc: e
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function b(e, o = "default") {
|
|
37
|
+
const t = document;
|
|
38
|
+
if (t && typeof t.startViewTransition == "function") {
|
|
39
|
+
const a = document.body;
|
|
40
|
+
a.classList.add(`vt-${o}`), t.startViewTransition(() => {
|
|
41
|
+
try {
|
|
42
|
+
e();
|
|
43
|
+
} catch {
|
|
44
|
+
}
|
|
45
|
+
}).finished.finally(() => {
|
|
46
|
+
a.classList.remove(`vt-${o}`);
|
|
47
|
+
});
|
|
48
|
+
} else
|
|
49
|
+
e();
|
|
50
|
+
}
|
|
51
|
+
let u = null, v = "", c = null;
|
|
52
|
+
function T() {
|
|
53
|
+
const e = l([]), o = l(!1), t = l(""), a = l("");
|
|
54
|
+
async function r({
|
|
55
|
+
versionApi: d
|
|
56
|
+
}) {
|
|
57
|
+
if (u) {
|
|
58
|
+
e.value = u, a.value = v;
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (c) {
|
|
62
|
+
await c, e.value = u || [], a.value = v;
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
o.value = !0, t.value = "", c = fetch(d).then((n) => {
|
|
66
|
+
if (!n.ok)
|
|
67
|
+
throw new Error(`HTTP error! status: ${n.status}`);
|
|
68
|
+
return n.json();
|
|
69
|
+
}).then((n) => {
|
|
70
|
+
const i = n.downloads.map((s) => ({
|
|
71
|
+
id: s.id,
|
|
72
|
+
name: s.name,
|
|
73
|
+
description: s.description,
|
|
74
|
+
version: s.version,
|
|
75
|
+
updateDate: s.updateDate,
|
|
76
|
+
icon: "",
|
|
77
|
+
// 将在组件中动态设置
|
|
78
|
+
downloadUrl: s.downloadUrl,
|
|
79
|
+
platform: s.platform,
|
|
80
|
+
requirements: s.requirements,
|
|
81
|
+
badge: s.badge
|
|
82
|
+
}));
|
|
83
|
+
u = i, v = n.version, e.value = i, a.value = n.version;
|
|
84
|
+
}).catch((n) => {
|
|
85
|
+
t.value = n.message || "获取版本信息失败", console.error("Failed to fetch downloads:", n);
|
|
86
|
+
}).finally(() => {
|
|
87
|
+
o.value = !1, c = null;
|
|
88
|
+
}), await c;
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
downloads: e,
|
|
92
|
+
loading: o,
|
|
93
|
+
error: t,
|
|
94
|
+
version: a,
|
|
95
|
+
fetchDownloads: r
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
export {
|
|
99
|
+
D as a,
|
|
100
|
+
T as b,
|
|
101
|
+
g as u,
|
|
102
|
+
b as w
|
|
103
|
+
};
|
package/package.json
CHANGED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/* empty css */
|
|
2
|
-
/* empty css */
|
|
3
|
-
import { Message as u } from "@arco-design/web-vue";
|
|
4
|
-
import { ref as s } from "vue";
|
|
5
|
-
function y(e) {
|
|
6
|
-
const t = s(!1), n = s(), o = s(!1), a = s(""), i = s("");
|
|
7
|
-
function l(r) {
|
|
8
|
-
u.success(r), o.value = !1, t.value = !1, e("confirm");
|
|
9
|
-
}
|
|
10
|
-
function f() {
|
|
11
|
-
o.value = !1, console.log("handleClose"), e("cancel");
|
|
12
|
-
}
|
|
13
|
-
return {
|
|
14
|
-
loading: t,
|
|
15
|
-
formRef: n,
|
|
16
|
-
submitSuccess: l,
|
|
17
|
-
modelType: a,
|
|
18
|
-
changeType: i,
|
|
19
|
-
show: o,
|
|
20
|
-
handleCancel: f
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
const c = s({
|
|
24
|
-
key: "",
|
|
25
|
-
name: ""
|
|
26
|
-
});
|
|
27
|
-
function h() {
|
|
28
|
-
function e(t, n) {
|
|
29
|
-
c.value.key = t, c.value.name = n;
|
|
30
|
-
}
|
|
31
|
-
return {
|
|
32
|
-
activeDoc: c,
|
|
33
|
-
setActiveDoc: e
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
function w(e, t = "default") {
|
|
37
|
-
const n = document;
|
|
38
|
-
if (n && typeof n.startViewTransition == "function") {
|
|
39
|
-
const o = document.body;
|
|
40
|
-
o.classList.add(`vt-${t}`), n.startViewTransition(() => {
|
|
41
|
-
try {
|
|
42
|
-
e();
|
|
43
|
-
} catch {
|
|
44
|
-
}
|
|
45
|
-
}).finished.finally(() => {
|
|
46
|
-
o.classList.remove(`vt-${t}`);
|
|
47
|
-
});
|
|
48
|
-
} else
|
|
49
|
-
e();
|
|
50
|
-
}
|
|
51
|
-
export {
|
|
52
|
-
h as a,
|
|
53
|
-
y as u,
|
|
54
|
-
w
|
|
55
|
-
};
|