@huyooo/ui 0.14.4 → 0.14.8
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/WidthContainer-DSxG-FRN.js +688 -0
- package/dist/analytics.d.ts +1 -0
- package/dist/analytics.js +1 -0
- package/dist/common.js +1 -1
- package/dist/composables.js +16 -16
- package/dist/head.d.ts +2 -5
- package/dist/main.d.ts +1 -1
- package/dist/main.js +549 -1007
- package/dist/style.css +1 -1
- package/dist/types/api/log.generated.d.ts +63 -0
- package/dist/types/api/ones.generated.d.ts +0 -63
- package/dist/types/api/webhook.generated.d.ts +14 -0
- package/dist/useRoutePermission-CxRJlooW.js +212 -0
- package/dist/useSEO-DFmbAH-7.js +153 -0
- package/package.json +9 -2
- package/dist/WidthContainer-B5gW9ACv.js +0 -691
- package/dist/useDownloads-BC0QyEFr.js +0 -67
- package/dist/useSEO-BWAREYk4.js +0 -669
|
@@ -334,6 +334,43 @@ export type Api = {
|
|
|
334
334
|
};
|
|
335
335
|
};
|
|
336
336
|
};
|
|
337
|
+
system: {
|
|
338
|
+
dataRetentionPolicy: {
|
|
339
|
+
/** 获取 log-server 数据保留策略配置 */
|
|
340
|
+
post: {
|
|
341
|
+
return: any;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
'apps-statistics': {
|
|
346
|
+
batch: {
|
|
347
|
+
/** 批量获取多个应用的统计数据 */
|
|
348
|
+
post: {
|
|
349
|
+
body: {
|
|
350
|
+
appIds: string[];
|
|
351
|
+
};
|
|
352
|
+
return: any;
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
single: {
|
|
356
|
+
/** 获取单个应用的详细统计数据 */
|
|
357
|
+
post: {
|
|
358
|
+
body: {
|
|
359
|
+
appId: string;
|
|
360
|
+
};
|
|
361
|
+
return: any;
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
'organization-overview': {
|
|
365
|
+
/** 获取组织下所有应用的概览统计 */
|
|
366
|
+
post: {
|
|
367
|
+
body: {
|
|
368
|
+
organizationId: string;
|
|
369
|
+
};
|
|
370
|
+
return: any;
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
};
|
|
337
374
|
analytics: {
|
|
338
375
|
find: {
|
|
339
376
|
/** 分页查询分析数据列表 */
|
|
@@ -824,6 +861,32 @@ export interface ApiClient {
|
|
|
824
861
|
}, config?: RequestConfig) => Promise<ApiResponse<any>>;
|
|
825
862
|
};
|
|
826
863
|
};
|
|
864
|
+
system: {
|
|
865
|
+
dataRetentionPolicy: {
|
|
866
|
+
/** 获取 log-server 数据保留策略配置 */
|
|
867
|
+
post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
|
|
868
|
+
};
|
|
869
|
+
};
|
|
870
|
+
'apps-statistics': {
|
|
871
|
+
batch: {
|
|
872
|
+
/** 批量获取多个应用的统计数据 */
|
|
873
|
+
post: (body: {
|
|
874
|
+
appIds: string[];
|
|
875
|
+
}, config?: RequestConfig) => Promise<ApiResponse<any>>;
|
|
876
|
+
};
|
|
877
|
+
single: {
|
|
878
|
+
/** 获取单个应用的详细统计数据 */
|
|
879
|
+
post: (body: {
|
|
880
|
+
appId: string;
|
|
881
|
+
}, config?: RequestConfig) => Promise<ApiResponse<any>>;
|
|
882
|
+
};
|
|
883
|
+
'organization-overview': {
|
|
884
|
+
/** 获取组织下所有应用的概览统计 */
|
|
885
|
+
post: (body: {
|
|
886
|
+
organizationId: string;
|
|
887
|
+
}, config?: RequestConfig) => Promise<ApiResponse<any>>;
|
|
888
|
+
};
|
|
889
|
+
};
|
|
827
890
|
analytics: {
|
|
828
891
|
find: {
|
|
829
892
|
/** 分页查询分析数据列表 */
|
|
@@ -1209,43 +1209,6 @@ export type Api = {
|
|
|
1209
1209
|
};
|
|
1210
1210
|
};
|
|
1211
1211
|
};
|
|
1212
|
-
system: {
|
|
1213
|
-
dataRetentionPolicy: {
|
|
1214
|
-
/** 获取系统数据保留策略配置 */
|
|
1215
|
-
post: {
|
|
1216
|
-
return: any;
|
|
1217
|
-
};
|
|
1218
|
-
};
|
|
1219
|
-
};
|
|
1220
|
-
'apps-statistics': {
|
|
1221
|
-
batch: {
|
|
1222
|
-
/** 批量获取多个应用的统计数据 */
|
|
1223
|
-
post: {
|
|
1224
|
-
body: {
|
|
1225
|
-
appIds: string[];
|
|
1226
|
-
};
|
|
1227
|
-
return: any;
|
|
1228
|
-
};
|
|
1229
|
-
};
|
|
1230
|
-
single: {
|
|
1231
|
-
/** 获取单个应用的详细统计数据 */
|
|
1232
|
-
post: {
|
|
1233
|
-
body: {
|
|
1234
|
-
appId: string;
|
|
1235
|
-
};
|
|
1236
|
-
return: any;
|
|
1237
|
-
};
|
|
1238
|
-
};
|
|
1239
|
-
'organization-overview': {
|
|
1240
|
-
/** 获取组织下所有应用的概览统计 */
|
|
1241
|
-
post: {
|
|
1242
|
-
body: {
|
|
1243
|
-
organizationId: string;
|
|
1244
|
-
};
|
|
1245
|
-
return: any;
|
|
1246
|
-
};
|
|
1247
|
-
};
|
|
1248
|
-
};
|
|
1249
1212
|
};
|
|
1250
1213
|
/** API 客户端类型(提供完整的 IDE 智能提示) */
|
|
1251
1214
|
export interface ApiClient {
|
|
@@ -2150,32 +2113,6 @@ export interface ApiClient {
|
|
|
2150
2113
|
}, config?: RequestConfig) => Promise<ApiResponse<any>>;
|
|
2151
2114
|
};
|
|
2152
2115
|
};
|
|
2153
|
-
system: {
|
|
2154
|
-
dataRetentionPolicy: {
|
|
2155
|
-
/** 获取系统数据保留策略配置 */
|
|
2156
|
-
post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
|
|
2157
|
-
};
|
|
2158
|
-
};
|
|
2159
|
-
'apps-statistics': {
|
|
2160
|
-
batch: {
|
|
2161
|
-
/** 批量获取多个应用的统计数据 */
|
|
2162
|
-
post: (body: {
|
|
2163
|
-
appIds: string[];
|
|
2164
|
-
}, config?: RequestConfig) => Promise<ApiResponse<any>>;
|
|
2165
|
-
};
|
|
2166
|
-
single: {
|
|
2167
|
-
/** 获取单个应用的详细统计数据 */
|
|
2168
|
-
post: (body: {
|
|
2169
|
-
appId: string;
|
|
2170
|
-
}, config?: RequestConfig) => Promise<ApiResponse<any>>;
|
|
2171
|
-
};
|
|
2172
|
-
'organization-overview': {
|
|
2173
|
-
/** 获取组织下所有应用的概览统计 */
|
|
2174
|
-
post: (body: {
|
|
2175
|
-
organizationId: string;
|
|
2176
|
-
}, config?: RequestConfig) => Promise<ApiResponse<any>>;
|
|
2177
|
-
};
|
|
2178
|
-
};
|
|
2179
2116
|
}
|
|
2180
2117
|
/** API 客户端类型别名(基于 EdenClient 推断,提供完整类型检查) */
|
|
2181
2118
|
export type ApiClientType = EdenClient<Api>;
|
|
@@ -168,6 +168,14 @@ export type Api = {
|
|
|
168
168
|
};
|
|
169
169
|
};
|
|
170
170
|
};
|
|
171
|
+
system: {
|
|
172
|
+
dataRetentionPolicy: {
|
|
173
|
+
/** 获取 webhook-server 数据保留策略配置 */
|
|
174
|
+
post: {
|
|
175
|
+
return: any;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
171
179
|
};
|
|
172
180
|
/** API 客户端类型(提供完整的 IDE 智能提示) */
|
|
173
181
|
export interface ApiClient {
|
|
@@ -298,6 +306,12 @@ export interface ApiClient {
|
|
|
298
306
|
}, config?: RequestConfig) => Promise<ApiResponse<any>>;
|
|
299
307
|
};
|
|
300
308
|
};
|
|
309
|
+
system: {
|
|
310
|
+
dataRetentionPolicy: {
|
|
311
|
+
/** 获取 webhook-server 数据保留策略配置 */
|
|
312
|
+
post: (config?: RequestConfig) => Promise<ApiResponse<any>>;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
301
315
|
}
|
|
302
316
|
/** API 客户端类型别名(基于 EdenClient 推断,提供完整类型检查) */
|
|
303
317
|
export type ApiClientType = EdenClient<Api>;
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { ref as w, computed as b, watch as S } from "vue";
|
|
2
|
+
import { useRouter as I, useRoute as T } from "vue-router";
|
|
3
|
+
import { u as k } from "./useAuthkitAppsAuthPageInfo-nCjfAjiw.js";
|
|
4
|
+
import { u as M } from "./useAuthkitUsersProfile-BC5EsA2f.js";
|
|
5
|
+
const y = w({
|
|
6
|
+
key: "",
|
|
7
|
+
name: ""
|
|
8
|
+
});
|
|
9
|
+
function W() {
|
|
10
|
+
function t(r, s) {
|
|
11
|
+
y.value.key = r, y.value.name = s;
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
activeDoc: y,
|
|
15
|
+
setActiveDoc: t
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function j(t, r = "default") {
|
|
19
|
+
const s = document;
|
|
20
|
+
if (s && typeof s.startViewTransition == "function") {
|
|
21
|
+
const n = document.body;
|
|
22
|
+
n.classList.add(`vt-${r}`), s.startViewTransition(() => {
|
|
23
|
+
try {
|
|
24
|
+
t();
|
|
25
|
+
} catch {
|
|
26
|
+
}
|
|
27
|
+
}).finished.finally(() => {
|
|
28
|
+
n.classList.remove(`vt-${r}`);
|
|
29
|
+
});
|
|
30
|
+
} else
|
|
31
|
+
t();
|
|
32
|
+
}
|
|
33
|
+
function K(t) {
|
|
34
|
+
const r = /* @__PURE__ */ new Set();
|
|
35
|
+
r.add(t);
|
|
36
|
+
const s = t.split("/").filter(Boolean);
|
|
37
|
+
for (let n = s.length - 1; n > 0; n--)
|
|
38
|
+
r.add(`/${s.slice(0, n).join("/")}`);
|
|
39
|
+
return [...r];
|
|
40
|
+
}
|
|
41
|
+
function L(t, r) {
|
|
42
|
+
const s = new Set(r);
|
|
43
|
+
return K(t).some((n) => s.has(n));
|
|
44
|
+
}
|
|
45
|
+
function C(t, r) {
|
|
46
|
+
return Array.isArray(t == null ? void 0 : t.menuTypes) ? t.menuTypes.includes(r) : !1;
|
|
47
|
+
}
|
|
48
|
+
function z(t, r, s) {
|
|
49
|
+
for (let n = t.length - 1; n >= 0; n--) {
|
|
50
|
+
const f = t[n];
|
|
51
|
+
if (C(f.meta, r))
|
|
52
|
+
return f.path;
|
|
53
|
+
}
|
|
54
|
+
return s;
|
|
55
|
+
}
|
|
56
|
+
function R(t) {
|
|
57
|
+
return t.split("?")[0].split("#")[0];
|
|
58
|
+
}
|
|
59
|
+
function B(t, r, s) {
|
|
60
|
+
const n = R(r), f = (s == null ? void 0 : s.returnParentOnChildMatch) ?? !1;
|
|
61
|
+
function m(u, p) {
|
|
62
|
+
for (const a of u) {
|
|
63
|
+
if (R(a.path) === p)
|
|
64
|
+
return a.path;
|
|
65
|
+
if (a.children && a.children.length > 0) {
|
|
66
|
+
const e = m(a.children, p);
|
|
67
|
+
if (e)
|
|
68
|
+
return f ? a.path : e;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
const d = m(t, n);
|
|
74
|
+
if (d)
|
|
75
|
+
return d;
|
|
76
|
+
for (const u of t) {
|
|
77
|
+
const p = R(u.path);
|
|
78
|
+
if (n.startsWith(p + "/") || n === p) {
|
|
79
|
+
if (u.children && u.children.length > 0)
|
|
80
|
+
for (const a of u.children) {
|
|
81
|
+
const v = R(a.path);
|
|
82
|
+
if (n.startsWith(v + "/") || n === v)
|
|
83
|
+
return f ? u.path : a.path;
|
|
84
|
+
}
|
|
85
|
+
return u.path;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return s != null && s.fallback ? s.fallback(n) : n;
|
|
89
|
+
}
|
|
90
|
+
function F(t) {
|
|
91
|
+
const r = I(), {
|
|
92
|
+
appsData: s
|
|
93
|
+
} = k(), {
|
|
94
|
+
isLoggedIn: n,
|
|
95
|
+
userProfile: f
|
|
96
|
+
} = M(), m = b(() => {
|
|
97
|
+
var e;
|
|
98
|
+
return !n.value || !f.value ? [] : ((e = f.value.permissions) == null ? void 0 : e.map((c) => c.permissionKey)) || [];
|
|
99
|
+
});
|
|
100
|
+
function d(e) {
|
|
101
|
+
return (s.value.publicRoutes || []).some((l) => l.permissionKey === e);
|
|
102
|
+
}
|
|
103
|
+
function u(e) {
|
|
104
|
+
return n.value ? L(e, m.value) : !1;
|
|
105
|
+
}
|
|
106
|
+
function p(e) {
|
|
107
|
+
var c;
|
|
108
|
+
return {
|
|
109
|
+
path: e.path,
|
|
110
|
+
name: e.name,
|
|
111
|
+
meta: e.meta,
|
|
112
|
+
children: (c = e.children) == null ? void 0 : c.map((l) => p(l))
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
function a(e, c) {
|
|
116
|
+
const l = [];
|
|
117
|
+
for (const o of e) {
|
|
118
|
+
if (o.path === "/" || o.path === "/:catchAll(.*)")
|
|
119
|
+
continue;
|
|
120
|
+
const i = o.meta;
|
|
121
|
+
if (C(i, c)) {
|
|
122
|
+
const P = o.path;
|
|
123
|
+
if (d(P) || u(P)) {
|
|
124
|
+
const h = {
|
|
125
|
+
name: (i == null ? void 0 : i.menuName) || (i == null ? void 0 : i.title) || (typeof o.name == "string" ? o.name : o.path),
|
|
126
|
+
path: o.path,
|
|
127
|
+
icon: (i == null ? void 0 : i.menuIcon) || (i == null ? void 0 : i.icon),
|
|
128
|
+
description: (i == null ? void 0 : i.menuDescription) || (i == null ? void 0 : i.description),
|
|
129
|
+
hidden: i == null ? void 0 : i.hidden
|
|
130
|
+
};
|
|
131
|
+
if (o.children && o.children.length > 0) {
|
|
132
|
+
const g = a(o.children, c);
|
|
133
|
+
g.length > 0 && (h.children = g);
|
|
134
|
+
}
|
|
135
|
+
l.push(h);
|
|
136
|
+
}
|
|
137
|
+
} else if (o.children && o.children.length > 0) {
|
|
138
|
+
const P = a(o.children, c);
|
|
139
|
+
l.push(...P);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return l;
|
|
143
|
+
}
|
|
144
|
+
return {
|
|
145
|
+
menus: b(() => {
|
|
146
|
+
if (!t)
|
|
147
|
+
return [];
|
|
148
|
+
const e = r.getRoutes(), c = e.find((h) => h.path === "/"), l = c != null && c.children ? c.children.map((h) => p(h)) : [], o = new Set(l.map((h) => h.path)), P = e.filter((h) => h.path === "/" || h.path === "/:catchAll(.*)" || o.has(h.path) ? !1 : h.path.split("/").filter((D) => D).length === 1).map(p), A = [...l, ...P];
|
|
149
|
+
return a(A, t);
|
|
150
|
+
}),
|
|
151
|
+
isRoutePublic: d,
|
|
152
|
+
hasPermission: (e) => d(e) ? !0 : u(e),
|
|
153
|
+
isLoggedIn: n
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
function N() {
|
|
157
|
+
const t = I(), r = T(), {
|
|
158
|
+
appsData: s,
|
|
159
|
+
appsAuthPageInfoSuccess: n
|
|
160
|
+
} = k(), {
|
|
161
|
+
userProfile: f,
|
|
162
|
+
isLoggedIn: m,
|
|
163
|
+
usersProfileReady: d
|
|
164
|
+
} = M(), u = w(!1);
|
|
165
|
+
function p(e) {
|
|
166
|
+
return (s.value.publicRoutes || []).some((l) => l.permissionKey === e);
|
|
167
|
+
}
|
|
168
|
+
function a(e) {
|
|
169
|
+
var l;
|
|
170
|
+
if (!m.value || !f.value)
|
|
171
|
+
return !1;
|
|
172
|
+
const c = ((l = f.value.permissions) == null ? void 0 : l.map((o) => o.permissionKey)) || [];
|
|
173
|
+
return L(e, c);
|
|
174
|
+
}
|
|
175
|
+
function v(e) {
|
|
176
|
+
if (!n.value) {
|
|
177
|
+
u.value = !0;
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
if (u.value = !0, p(e)) {
|
|
181
|
+
u.value = !1;
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
if (!d.value) {
|
|
185
|
+
u.value = !0;
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
if (!m.value) {
|
|
189
|
+
t.replace("/"), u.value = !1;
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
a(e) || t.replace("/"), u.value = !1;
|
|
193
|
+
}
|
|
194
|
+
return S([() => r.path, n, d, m], () => {
|
|
195
|
+
v(r.path);
|
|
196
|
+
}, {
|
|
197
|
+
immediate: !0
|
|
198
|
+
}), {
|
|
199
|
+
isChecking: u,
|
|
200
|
+
isRoutePublic: p,
|
|
201
|
+
hasPermission: a
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
export {
|
|
205
|
+
z as a,
|
|
206
|
+
F as b,
|
|
207
|
+
N as c,
|
|
208
|
+
B as f,
|
|
209
|
+
R as g,
|
|
210
|
+
W as u,
|
|
211
|
+
j as w
|
|
212
|
+
};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { g } from "./apiClients-CkI47p36.js";
|
|
3
|
+
import { Message as f } from "@arco-design/web-vue";
|
|
4
|
+
import { ref as i, computed as r } from "vue";
|
|
5
|
+
import { useHead as p, useSeoMeta as m } from "@unhead/vue";
|
|
6
|
+
import { useRoute as w } from "vue-router";
|
|
7
|
+
function S(s) {
|
|
8
|
+
const o = i(!1), t = i(), e = i(!1), a = i(""), u = i("");
|
|
9
|
+
function l(c) {
|
|
10
|
+
f.success(c), e.value = !1, o.value = !1, s("confirm");
|
|
11
|
+
}
|
|
12
|
+
function n() {
|
|
13
|
+
e.value = !1, s("cancel");
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
loading: o,
|
|
17
|
+
formRef: t,
|
|
18
|
+
submitSuccess: l,
|
|
19
|
+
modelType: a,
|
|
20
|
+
changeType: u,
|
|
21
|
+
show: e,
|
|
22
|
+
handleCancel: n
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function C() {
|
|
26
|
+
const s = i([]), o = i(!1), t = i(""), e = i("");
|
|
27
|
+
async function a() {
|
|
28
|
+
o.value = !0, t.value = "";
|
|
29
|
+
try {
|
|
30
|
+
const l = await (await fetch(`${g.onesPrefixUrl}/releases/latest`, {
|
|
31
|
+
method: "POST",
|
|
32
|
+
headers: {
|
|
33
|
+
"Content-Type": "application/json",
|
|
34
|
+
"app-id": g.appId
|
|
35
|
+
},
|
|
36
|
+
body: JSON.stringify({})
|
|
37
|
+
})).json();
|
|
38
|
+
e.value = l.version, s.value = l.downloads.map((n) => {
|
|
39
|
+
const c = {
|
|
40
|
+
id: n.id,
|
|
41
|
+
name: n.name,
|
|
42
|
+
description: n.description,
|
|
43
|
+
version: n.version,
|
|
44
|
+
updateDate: n.updateDate,
|
|
45
|
+
icon: "",
|
|
46
|
+
downloadUrl: n.downloadUrl,
|
|
47
|
+
platform: n.platform,
|
|
48
|
+
requirements: n.requirements
|
|
49
|
+
};
|
|
50
|
+
return n.arch && (c.arch = n.arch), n.badge && (c.badge = n.badge), c;
|
|
51
|
+
});
|
|
52
|
+
} catch {
|
|
53
|
+
t.value = "获取版本信息失败,请刷新重试";
|
|
54
|
+
} finally {
|
|
55
|
+
o.value = !1;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
downloads: s,
|
|
60
|
+
loading: o,
|
|
61
|
+
error: t,
|
|
62
|
+
version: e,
|
|
63
|
+
fetchDownloads: a
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function O() {
|
|
67
|
+
function s(t) {
|
|
68
|
+
m({
|
|
69
|
+
ogSiteName: t.siteName,
|
|
70
|
+
ogLocale: t.locale
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function o(t) {
|
|
74
|
+
const {
|
|
75
|
+
title: e,
|
|
76
|
+
description: a,
|
|
77
|
+
keywords: u,
|
|
78
|
+
image: l,
|
|
79
|
+
url: n,
|
|
80
|
+
type: c = "website"
|
|
81
|
+
} = t, d = a && a.length > 155 ? `${a.substring(0, 152)}...` : a;
|
|
82
|
+
p({
|
|
83
|
+
title: e,
|
|
84
|
+
link: n ? [{
|
|
85
|
+
rel: "canonical",
|
|
86
|
+
href: n
|
|
87
|
+
}] : []
|
|
88
|
+
}), m({
|
|
89
|
+
description: d || a,
|
|
90
|
+
keywords: u,
|
|
91
|
+
ogTitle: e,
|
|
92
|
+
ogDescription: d || a,
|
|
93
|
+
ogType: c === "product" ? void 0 : c,
|
|
94
|
+
// product 类型不被支持,跳过
|
|
95
|
+
ogUrl: n,
|
|
96
|
+
ogImage: l,
|
|
97
|
+
twitterCard: "summary_large_image",
|
|
98
|
+
twitterTitle: e,
|
|
99
|
+
twitterDescription: d || a,
|
|
100
|
+
twitterImage: l
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
setGlobalSEO: s,
|
|
105
|
+
setPageSEO: o
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function U() {
|
|
109
|
+
const s = w(), o = () => s.meta;
|
|
110
|
+
p({
|
|
111
|
+
title: r(() => o().title || ""),
|
|
112
|
+
link: r(() => {
|
|
113
|
+
const t = o();
|
|
114
|
+
return t.url ? [{
|
|
115
|
+
rel: "canonical",
|
|
116
|
+
href: t.url
|
|
117
|
+
}] : [];
|
|
118
|
+
})
|
|
119
|
+
}), m({
|
|
120
|
+
description: r(() => {
|
|
121
|
+
const e = o().description;
|
|
122
|
+
if (e)
|
|
123
|
+
return e.length > 155 ? `${e.substring(0, 152)}...` : e;
|
|
124
|
+
}),
|
|
125
|
+
keywords: r(() => o().keywords),
|
|
126
|
+
ogTitle: r(() => o().title),
|
|
127
|
+
ogDescription: r(() => {
|
|
128
|
+
const e = o().description;
|
|
129
|
+
if (e)
|
|
130
|
+
return e.length > 155 ? `${e.substring(0, 152)}...` : e;
|
|
131
|
+
}),
|
|
132
|
+
ogType: r(() => {
|
|
133
|
+
const e = o().type || "website";
|
|
134
|
+
return e === "product" ? void 0 : e;
|
|
135
|
+
}),
|
|
136
|
+
ogUrl: r(() => o().url),
|
|
137
|
+
ogImage: r(() => o().image),
|
|
138
|
+
twitterCard: "summary_large_image",
|
|
139
|
+
twitterTitle: r(() => o().title),
|
|
140
|
+
twitterDescription: r(() => {
|
|
141
|
+
const e = o().description;
|
|
142
|
+
if (e)
|
|
143
|
+
return e.length > 155 ? `${e.substring(0, 152)}...` : e;
|
|
144
|
+
}),
|
|
145
|
+
twitterImage: r(() => o().image)
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
export {
|
|
149
|
+
C as a,
|
|
150
|
+
U as b,
|
|
151
|
+
O as c,
|
|
152
|
+
S as u
|
|
153
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huyooo/ui",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"import": "./dist/privateCom.js",
|
|
63
63
|
"types": "./dist/privateCom.d.ts"
|
|
64
64
|
},
|
|
65
|
+
"./analytics": {
|
|
66
|
+
"import": "./dist/analytics.js",
|
|
67
|
+
"types": "./dist/analytics.d.ts"
|
|
68
|
+
},
|
|
65
69
|
"./style.css": "./dist/style.css",
|
|
66
70
|
"./dist/*": "./dist/*"
|
|
67
71
|
},
|
|
@@ -90,13 +94,14 @@
|
|
|
90
94
|
"@arco-design/web-vue": ">=2.56.3",
|
|
91
95
|
"@huyooo/vue-tiptap": ">=0.3.25",
|
|
92
96
|
"@iconify/vue": ">=4.1.2",
|
|
97
|
+
"@unhead/vue": ">=2.0.19",
|
|
93
98
|
"@vueuse/core": ">=11.3.0",
|
|
94
99
|
"ant-design-x-vue": ">=1.2.6",
|
|
95
100
|
"vue": ">=3.4.37",
|
|
96
101
|
"vue-router": ">=4.0.0"
|
|
97
102
|
},
|
|
98
103
|
"dependencies": {
|
|
99
|
-
"@
|
|
104
|
+
"@huyooo/analytics": "^0.2.0",
|
|
100
105
|
"@vafast/api-client": "^0.3.6",
|
|
101
106
|
"cos-js-sdk-v5": "^1.10.1",
|
|
102
107
|
"json-bigint": "^1.0.0",
|
|
@@ -107,6 +112,7 @@
|
|
|
107
112
|
"@arco-plugins/vite-vue": "^1.4.5",
|
|
108
113
|
"@types/json-bigint": "^1.0.4",
|
|
109
114
|
"@types/node": "^22.5.1",
|
|
115
|
+
"@unhead/vue": "^2.0.19",
|
|
110
116
|
"@vafast/cli": "^0.2.1",
|
|
111
117
|
"@vitejs/plugin-vue": "^5.1.2",
|
|
112
118
|
"bumpp": "^10.2.0",
|
|
@@ -116,6 +122,7 @@
|
|
|
116
122
|
"typescript": "^5.5.3",
|
|
117
123
|
"vite": "^5.4.1",
|
|
118
124
|
"vite-plugin-dts": "^4.0.3",
|
|
125
|
+
"vue-router": "^4.4.3",
|
|
119
126
|
"vue-tsc": "^2.0.29"
|
|
120
127
|
},
|
|
121
128
|
"gitHead": "3b89c5f3e764bd2502a11e40fdb1a574d9ee508d"
|