@opendesign-plus-test/components 0.0.1-rc.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.cjs.js +1 -0
- package/dist/components.css +1 -0
- package/dist/components.es.js +1193 -0
- package/dist/components.umd.js +1 -0
- package/docs/design.md +27 -0
- package/docs/design_banner.md +41 -0
- package/docs/design_section.md +27 -0
- package/package.json +47 -0
- package/scripts/generate-components-index.js +81 -0
- package/src/assets/svg-icons/icon-chevron-right.svg +3 -0
- package/src/assets/svg-icons/icon-close.svg +3 -0
- package/src/assets/svg-icons/icon-delete.svg +3 -0
- package/src/assets/svg-icons/icon-header-back.svg +3 -0
- package/src/assets/svg-icons/icon-header-delete.svg +3 -0
- package/src/assets/svg-icons/icon-header-search.svg +4 -0
- package/src/assets/svg-icons/icon-moon.svg +3 -0
- package/src/assets/svg-icons/icon-sun.svg +3 -0
- package/src/components/OBanner.vue +390 -0
- package/src/components/OCookieNotice.vue +417 -0
- package/src/components/OCookieNoticeEl.vue +403 -0
- package/src/components/OHeaderSearch.vue +601 -0
- package/src/components/OPlusConfigProvider.vue +32 -0
- package/src/components/OSection.vue +178 -0
- package/src/components/OThemeSwitcher.vue +108 -0
- package/src/components/common/ClientOnlyWrapper.ts +21 -0
- package/src/components/common/ContentWrapper.vue +85 -0
- package/src/draft/Banner.vue +265 -0
- package/src/draft/ButtonCards.vue +106 -0
- package/src/draft/Feature.vue +134 -0
- package/src/draft/Footer.vue +512 -0
- package/src/draft/HorizontalAnchor.vue +165 -0
- package/src/draft/ItemSwiper.vue +133 -0
- package/src/draft/Logo.vue +141 -0
- package/src/draft/LogoCard.vue +75 -0
- package/src/draft/LogoV2.vue +19 -0
- package/src/draft/MainCard.vue +38 -0
- package/src/draft/MultiCard.vue +95 -0
- package/src/draft/MultiIconCard.vue +74 -0
- package/src/draft/OInfoCard.vue +176 -0
- package/src/draft/Process.vue +81 -0
- package/src/draft/Section.vue +167 -0
- package/src/draft/SingleTabCard.vue +85 -0
- package/src/draft/SliderCard.vue +110 -0
- package/src/env.d.ts +1 -0
- package/src/i18n/en.ts +20 -0
- package/src/i18n/index.ts +42 -0
- package/src/i18n/zh.ts +9 -0
- package/src/index.ts +34 -0
- package/src/shared/provide.ts +6 -0
- package/src/vue.d.ts +10 -0
- package/tsconfig.json +33 -0
- package/vite.config.ts +90 -0
|
@@ -0,0 +1,1193 @@
|
|
|
1
|
+
import { defineComponent as H, computed as z, createElementBlock as r, openBlock as l, normalizeStyle as le, unref as e, renderSlot as I, ref as P, normalizeClass as M, createBlock as A, toDisplayString as u, withCtx as v, Fragment as G, renderList as J, createVNode as m, createElementVNode as a, createCommentVNode as w, createTextVNode as O, resolveComponent as we, h as Ce, onMounted as Q, getCurrentInstance as $e, inject as Ie, Teleport as me, nextTick as pe, watch as F, withDirectives as Oe, withKeys as Ae, withModifiers as Se, vShow as xe, reactive as ze, provide as Ee } from "vue";
|
|
2
|
+
import { isBoolean as ne, isString as se, isUndefined as fe, OCarousel as ie, OCarouselItem as ce, OFigure as re, OButton as q, OIcon as B, OIconClose as Pe, ODialog as Ve, OSwitch as ge, OInput as De, ODivider as Be, OConfigProvider as Me, isArray as Ne, OLink as Te } from "@opensig/opendesign";
|
|
3
|
+
import { useTheme as Ue, useScreen as Z } from "@opendesign-plus/composables";
|
|
4
|
+
import { useVModel as ke, onClickOutside as He } from "@vueuse/core";
|
|
5
|
+
import { ElButton as W, ElIcon as Ke, ElDialog as Re, ElSwitch as Ge } from "element-plus";
|
|
6
|
+
import "element-plus/es/components/button/style/index";
|
|
7
|
+
import "element-plus/es/components/dialog/style/index";
|
|
8
|
+
import "element-plus/es/components/switch/style/index";
|
|
9
|
+
import "element-plus/es/components/icon/style/index";
|
|
10
|
+
const Le = /* @__PURE__ */ H({
|
|
11
|
+
__name: "ContentWrapper",
|
|
12
|
+
props: {
|
|
13
|
+
verticalPadding: { type: [Boolean, String, Array], default: void 0 }
|
|
14
|
+
},
|
|
15
|
+
setup(t) {
|
|
16
|
+
const o = Symbol("default"), s = t, y = z(() => s.verticalPadding ? ne(s.verticalPadding) ? o : se(s.verticalPadding) ? s.verticalPadding : s.verticalPadding[0] : 0), d = z(() => s.verticalPadding ? ne(s.verticalPadding) ? o : se(s.verticalPadding) ? s.verticalPadding : fe(s.verticalPadding[1]) ? s.verticalPadding[0] : s.verticalPadding[1] : 0);
|
|
17
|
+
return (k, _) => (l(), r("div", {
|
|
18
|
+
class: "content-wrapper",
|
|
19
|
+
style: le({
|
|
20
|
+
"--content-wrapper-vertical-paddingTop": y.value === e(o) ? void 0 : y.value,
|
|
21
|
+
"--content-wrapper-vertical-paddingBottom": d.value === e(o) ? void 0 : d.value
|
|
22
|
+
})
|
|
23
|
+
}, [
|
|
24
|
+
I(k.$slots, "default", {}, void 0, !0)
|
|
25
|
+
], 4));
|
|
26
|
+
}
|
|
27
|
+
}), L = (t, o) => {
|
|
28
|
+
const s = t.__vccOpts || t;
|
|
29
|
+
for (const [y, d] of o)
|
|
30
|
+
s[y] = d;
|
|
31
|
+
return s;
|
|
32
|
+
}, de = /* @__PURE__ */ L(Le, [["__scopeId", "data-v-29de9f52"]]), je = { key: 0 }, Ye = { class: "banner-content" }, Je = ["src"], We = {
|
|
33
|
+
key: 1,
|
|
34
|
+
class: "banner-title"
|
|
35
|
+
}, Ze = {
|
|
36
|
+
key: 2,
|
|
37
|
+
class: "banner-subtitle"
|
|
38
|
+
}, Fe = {
|
|
39
|
+
key: 4,
|
|
40
|
+
class: "banner-opts"
|
|
41
|
+
}, qe = /* @__PURE__ */ H({
|
|
42
|
+
__name: "OBanner",
|
|
43
|
+
props: {
|
|
44
|
+
options: void 0,
|
|
45
|
+
size: "large",
|
|
46
|
+
contentJustifyCenter: !1
|
|
47
|
+
},
|
|
48
|
+
setup(t) {
|
|
49
|
+
const o = t, { isLight: s } = Ue("opendesignplus", document.domain || "localhost"), { isPhone: y } = Z(), d = z(() => o.options), k = P(""), _ = (c) => {
|
|
50
|
+
setTimeout(() => {
|
|
51
|
+
k.value = d.value[c].bg_theme ?? "light";
|
|
52
|
+
}, 100);
|
|
53
|
+
}, n = (c, f) => {
|
|
54
|
+
c && !f && window.open(c);
|
|
55
|
+
};
|
|
56
|
+
return (c, f) => (l(), r("div", {
|
|
57
|
+
class: M(["home-banner", t.size])
|
|
58
|
+
}, [
|
|
59
|
+
t.size === "tiny" ? (l(), r("div", je, u(d.value[1].title), 1)) : e(y) ? (l(), A(e(ie), {
|
|
60
|
+
key: 2,
|
|
61
|
+
class: "banner-carousel",
|
|
62
|
+
effect: "gallery",
|
|
63
|
+
"indicator-click": "",
|
|
64
|
+
"data-o-theme": k.value,
|
|
65
|
+
arrow: "never",
|
|
66
|
+
"auto-play": !0,
|
|
67
|
+
onBeforeChange: _
|
|
68
|
+
}, {
|
|
69
|
+
default: v(() => [
|
|
70
|
+
(l(!0), r(G, null, J(d.value, (i, b) => (l(), A(e(ce), {
|
|
71
|
+
class: M(["banner-item", `banner-item${b}`])
|
|
72
|
+
}, {
|
|
73
|
+
default: v(() => [
|
|
74
|
+
m(de, { class: "banner-wrapper" }, {
|
|
75
|
+
default: v(() => [
|
|
76
|
+
m(e(re), {
|
|
77
|
+
class: "banner-bg",
|
|
78
|
+
src: i.bg,
|
|
79
|
+
onClick: ($) => n(i.href)
|
|
80
|
+
}, null, 8, ["src", "onClick"])
|
|
81
|
+
]),
|
|
82
|
+
_: 2
|
|
83
|
+
}, 1024)
|
|
84
|
+
]),
|
|
85
|
+
_: 2
|
|
86
|
+
}, 1032, ["class"]))), 256))
|
|
87
|
+
]),
|
|
88
|
+
_: 1
|
|
89
|
+
}, 8, ["data-o-theme"])) : (l(), A(e(ie), {
|
|
90
|
+
key: 1,
|
|
91
|
+
class: "banner-carousel",
|
|
92
|
+
effect: "toggle",
|
|
93
|
+
"active-class": "current-slide",
|
|
94
|
+
"indicator-click": "",
|
|
95
|
+
"auto-play": !0,
|
|
96
|
+
"data-o-theme": k.value,
|
|
97
|
+
onBeforeChange: _
|
|
98
|
+
}, {
|
|
99
|
+
default: v(() => [
|
|
100
|
+
(l(!0), r(G, null, J(d.value, (i, b) => (l(), A(e(ce), {
|
|
101
|
+
key: b,
|
|
102
|
+
class: M(["banner-item", `banner-item${b}`])
|
|
103
|
+
}, {
|
|
104
|
+
default: v(() => [
|
|
105
|
+
m(e(re), {
|
|
106
|
+
class: M(["banner-bg", {
|
|
107
|
+
"with-sticky-bg": i.withStickyBg,
|
|
108
|
+
"in-dark": !e(s),
|
|
109
|
+
"cursor-pointer": i.href && !i.btn
|
|
110
|
+
}]),
|
|
111
|
+
src: i.bg,
|
|
112
|
+
style: le({
|
|
113
|
+
"--pad-offset": i.pad_offset
|
|
114
|
+
}),
|
|
115
|
+
onClick: ($) => n(i.href, i.btn)
|
|
116
|
+
}, {
|
|
117
|
+
default: v(() => [
|
|
118
|
+
m(de, {
|
|
119
|
+
class: M(["banner-wrapper", ["banner-wrapper", t.contentJustifyCenter ? "content-center" : ""]])
|
|
120
|
+
}, {
|
|
121
|
+
default: v(() => [
|
|
122
|
+
a("div", Ye, [
|
|
123
|
+
!e(y) && i.attach ? (l(), r("img", {
|
|
124
|
+
key: 0,
|
|
125
|
+
src: i.attach,
|
|
126
|
+
class: "banner-attach"
|
|
127
|
+
}, null, 8, Je)) : w("", !0),
|
|
128
|
+
i.title ? (l(), r("div", We, u(i.title), 1)) : w("", !0),
|
|
129
|
+
i.subtitle ? (l(), r("div", Ze, u(i.subtitle), 1)) : w("", !0),
|
|
130
|
+
i.bg_text ? (l(), r("div", {
|
|
131
|
+
key: 3,
|
|
132
|
+
class: "banner-text",
|
|
133
|
+
style: le({
|
|
134
|
+
backgroundImage: `url(${i.bg_text})`,
|
|
135
|
+
"--pc-width": i.pc_text_width,
|
|
136
|
+
"--pc-height": i.pc_text_height,
|
|
137
|
+
"--pad-width": i.pad_text_width,
|
|
138
|
+
"--pad-height": i.pad_text_height
|
|
139
|
+
})
|
|
140
|
+
}, null, 4)) : w("", !0),
|
|
141
|
+
i.btn ? (l(), r("div", Fe, [
|
|
142
|
+
m(e(q), {
|
|
143
|
+
href: i.href,
|
|
144
|
+
target: "_blank",
|
|
145
|
+
variant: "solid",
|
|
146
|
+
color: "primary",
|
|
147
|
+
size: t.size
|
|
148
|
+
}, {
|
|
149
|
+
default: v(() => [
|
|
150
|
+
O(u(i.btn), 1)
|
|
151
|
+
]),
|
|
152
|
+
_: 2
|
|
153
|
+
}, 1032, ["href", "size"])
|
|
154
|
+
])) : w("", !0)
|
|
155
|
+
])
|
|
156
|
+
]),
|
|
157
|
+
_: 2
|
|
158
|
+
}, 1032, ["class"])
|
|
159
|
+
]),
|
|
160
|
+
_: 2
|
|
161
|
+
}, 1032, ["src", "class", "style", "onClick"])
|
|
162
|
+
]),
|
|
163
|
+
_: 2
|
|
164
|
+
}, 1032, ["class"]))), 128))
|
|
165
|
+
]),
|
|
166
|
+
_: 1
|
|
167
|
+
}, 8, ["data-o-theme"]))
|
|
168
|
+
], 2));
|
|
169
|
+
}
|
|
170
|
+
}), Qe = /* @__PURE__ */ L(qe, [["__scopeId", "data-v-a5902620"]]), Xe = (t) => {
|
|
171
|
+
const o = P(!1);
|
|
172
|
+
return Q(() => {
|
|
173
|
+
o.value = !0;
|
|
174
|
+
}), () => o.value && t.default ? t.default() : null;
|
|
175
|
+
}, ye = H({
|
|
176
|
+
setup(t, { slots: o }) {
|
|
177
|
+
const s = we("ClientOnly");
|
|
178
|
+
return s && typeof s != "string" ? () => Ce(s, null, { default: () => o.default ? o.default() : null }) : Xe(o);
|
|
179
|
+
}
|
|
180
|
+
}), et = {
|
|
181
|
+
search: "搜索",
|
|
182
|
+
"search.hot": "热门搜索",
|
|
183
|
+
"search.placeholder": "搜索",
|
|
184
|
+
"search.expandedPlaceholder": "请输入搜索内容",
|
|
185
|
+
"search.history": "历史搜索",
|
|
186
|
+
"cookie.desc": "我们使用cookie来确保您的高速浏览体验。继续浏览本站,即表示您同意我们使用cookie。",
|
|
187
|
+
"cookie.about": "查看详情"
|
|
188
|
+
}, tt = {
|
|
189
|
+
search: "Search",
|
|
190
|
+
"search.hot": "Top search",
|
|
191
|
+
"search.placeholder": "Please enter the content",
|
|
192
|
+
"search.expandedPlaceholder": "Please enter the content",
|
|
193
|
+
"search.history": "History",
|
|
194
|
+
"cookie.title": "{0} Community Respects Your Privacy",
|
|
195
|
+
"cookie.desc": 'This site uses cookies from us and our partners to improve your browsing experience and make the site work properly. By clicking "Accept All", you consent to the use of cookies. By clicking "Reject All", you disable the use of unnecessary cookies. You can manage your cookie settings by clicking "Manage Cookies". For more information or to change your cookie settings, please refer to our ',
|
|
196
|
+
"cookie.about": "About Cookies",
|
|
197
|
+
"cookie.acceptAll": "Accept All",
|
|
198
|
+
"cookie.rejectAll": "Reject All",
|
|
199
|
+
"cookie.manage": "Manage Cookies",
|
|
200
|
+
"cookie.necessaryCookie": "Strictly Necessary Cookies",
|
|
201
|
+
"cookie.alwaysOn": "Always active",
|
|
202
|
+
"cookie.necessaryCookieDetail": "These cookies are necessary for the site to work properly and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as logging in or filling in forms. You can set the browser to block these cookies, but that can make parts of the site not work. These cookies do not store any personally identifiable information.",
|
|
203
|
+
"cookie.analyticalCookie": "Analytics Cookies",
|
|
204
|
+
"cookie.analyticalCookieDetail": "We will use these cookies only with your consent. These cookies help us make improvements by collecting statistics such as the number of visits and traffic sources.",
|
|
205
|
+
"cookie.saveSetting": "Save Settings",
|
|
206
|
+
"cookie.setting": "Cookie settings"
|
|
207
|
+
}, _e = Symbol("provide-config-provider"), ot = P({
|
|
208
|
+
zh: et,
|
|
209
|
+
en: tt
|
|
210
|
+
});
|
|
211
|
+
function ae() {
|
|
212
|
+
const o = $e() ? Ie(_e) : null, s = z(() => (o == null ? void 0 : o.locale) || "zh");
|
|
213
|
+
return {
|
|
214
|
+
locale: s,
|
|
215
|
+
t: (d, ...k) => {
|
|
216
|
+
const n = ot.value[s.value][d];
|
|
217
|
+
return k.length > 0 && se(n) ? n.replace(/{(\d+)}/g, (c, f) => k[f] ?? c) : (fe(n) && console.warn(`Cannot translate the value of keypath '${d}'`), n);
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
const lt = {
|
|
222
|
+
key: 0,
|
|
223
|
+
class: "cookie-notice"
|
|
224
|
+
}, st = { class: "cookie-notice-content" }, at = ["type"], nt = { class: "cookie-notice-left" }, it = {
|
|
225
|
+
key: 0,
|
|
226
|
+
class: "cookie-desc",
|
|
227
|
+
style: { "margin-top": "0" }
|
|
228
|
+
}, ct = ["href"], rt = { class: "cookie-title" }, dt = { class: "cookie-desc" }, ut = ["href"], ht = {
|
|
229
|
+
key: 0,
|
|
230
|
+
class: "cookie-notice-right"
|
|
231
|
+
}, vt = { class: "cookie-dlg-title" }, mt = { class: "cookie-dlg-content" }, pt = { class: "content-item" }, ft = { class: "item-header" }, gt = { class: "item-title" }, kt = { class: "item-extra" }, yt = { class: "item-detail" }, _t = { class: "content-item" }, bt = { class: "item-header" }, wt = { class: "item-title" }, Ct = { class: "item-extra" }, $t = { class: "item-detail" }, It = "0", ue = "1", Ot = "2", j = "3", At = "agreed-cookiepolicy-zh", St = "agreed-cookiepolicy-en", xt = /* @__PURE__ */ H({
|
|
232
|
+
__name: "OCookieNotice",
|
|
233
|
+
props: {
|
|
234
|
+
visible: { type: Boolean },
|
|
235
|
+
enableGrid: { type: Boolean },
|
|
236
|
+
community: {},
|
|
237
|
+
aboutPathZh: {},
|
|
238
|
+
aboutPathEn: {}
|
|
239
|
+
},
|
|
240
|
+
emits: ["update:visible"],
|
|
241
|
+
setup(t, { emit: o }) {
|
|
242
|
+
const y = t, d = o, { lePadV: k, leLaptop: _ } = Z(), { locale: n, t: c } = ae(), f = z(() => n.value === "zh"), i = z(() => f.value ? At : St), b = P(!1), $ = ke(y, "visible", d, { defaultValue: !1 }), S = (p) => {
|
|
243
|
+
const g = document.cookie.split(";").find((D) => D.split("=")[0].trim() === encodeURIComponent(p));
|
|
244
|
+
return g ? decodeURIComponent(g.split("=")[1]) : null;
|
|
245
|
+
}, V = (p, g, D, ee) => {
|
|
246
|
+
const be = `; max-age=${D * 24 * 60 * 60}`;
|
|
247
|
+
document.cookie = `${encodeURIComponent(p)}=${encodeURIComponent(g)}${be}; path=/; domain=${ee}`;
|
|
248
|
+
}, N = (p, g) => {
|
|
249
|
+
document.cookie = `${encodeURIComponent(p)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${g}`;
|
|
250
|
+
}, E = (p) => {
|
|
251
|
+
typeof p == "boolean" ? $.value = p : $.value = !$.value, pe(() => {
|
|
252
|
+
!$.value && f.value && S(i.value) !== j && V(i.value, j, 180, location.hostname);
|
|
253
|
+
});
|
|
254
|
+
}, T = P(!1), K = (p) => {
|
|
255
|
+
typeof p == "boolean" ? T.value = p : T.value = !T.value;
|
|
256
|
+
}, h = () => f.value ? S(i.value) !== j : (S(i.value) ?? "0") === It, U = () => f.value ? S(i.value) === j : S(i.value) === ue;
|
|
257
|
+
Q(() => {
|
|
258
|
+
h() && (E(!0), f.value && S(i.value) !== j && V(i.value, j, 180, void 0));
|
|
259
|
+
});
|
|
260
|
+
const C = () => {
|
|
261
|
+
b.value = !0, N(i.value, location.hostname), V(i.value, ue, 180, location.hostname), E(!1);
|
|
262
|
+
}, R = () => {
|
|
263
|
+
b.value = !1, N(i.value, location.hostname), V(i.value, Ot, 180, location.hostname), E(!1);
|
|
264
|
+
}, X = [
|
|
265
|
+
{
|
|
266
|
+
id: "save",
|
|
267
|
+
color: "primary",
|
|
268
|
+
label: c("cookie.saveSetting"),
|
|
269
|
+
variant: "outline",
|
|
270
|
+
size: "large",
|
|
271
|
+
round: "pill",
|
|
272
|
+
onClick: () => {
|
|
273
|
+
b.value ? C() : R(), K(!1);
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
id: "allowAll",
|
|
278
|
+
color: "primary",
|
|
279
|
+
label: c("cookie.acceptAll"),
|
|
280
|
+
variant: "outline",
|
|
281
|
+
size: "large",
|
|
282
|
+
round: "pill",
|
|
283
|
+
onClick: () => {
|
|
284
|
+
b.value = !0, C(), K(!1);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
], x = (p) => {
|
|
288
|
+
p && (b.value = U());
|
|
289
|
+
};
|
|
290
|
+
return (p, g) => (l(), A(e(ye), null, {
|
|
291
|
+
default: v(() => [
|
|
292
|
+
(l(), A(me, { to: "#app" }, [
|
|
293
|
+
e($) ? (l(), r("div", lt, [
|
|
294
|
+
a("div", st, [
|
|
295
|
+
a("div", {
|
|
296
|
+
type: e(n),
|
|
297
|
+
class: M({ "cookie-notice-wrap-grid": t.enableGrid, "cookie-notice-wrap": !t.enableGrid })
|
|
298
|
+
}, [
|
|
299
|
+
a("div", nt, [
|
|
300
|
+
f.value ? (l(), r("p", it, [
|
|
301
|
+
O(u(e(c)("cookie.desc")) + " ", 1),
|
|
302
|
+
a("a", {
|
|
303
|
+
href: t.aboutPathZh,
|
|
304
|
+
target: "_blank",
|
|
305
|
+
rel: "noopener noreferrer"
|
|
306
|
+
}, u(e(c)("cookie.about")), 9, ct)
|
|
307
|
+
])) : (l(), r(G, { key: 1 }, [
|
|
308
|
+
a("p", rt, u(e(c)("cookie.title", [t.community])), 1),
|
|
309
|
+
a("p", dt, [
|
|
310
|
+
O(u(e(c)("cookie.desc")) + " ", 1),
|
|
311
|
+
a("a", {
|
|
312
|
+
href: t.aboutPathEn,
|
|
313
|
+
target: "_blank",
|
|
314
|
+
rel: "noopener noreferrer"
|
|
315
|
+
}, u(e(c)("cookie.about")), 9, ut),
|
|
316
|
+
g[4] || (g[4] = O(". ", -1))
|
|
317
|
+
])
|
|
318
|
+
], 64))
|
|
319
|
+
]),
|
|
320
|
+
f.value ? w("", !0) : (l(), r("div", ht, [
|
|
321
|
+
m(e(q), {
|
|
322
|
+
round: "pill",
|
|
323
|
+
variant: "outline",
|
|
324
|
+
color: "primary",
|
|
325
|
+
onClick: C
|
|
326
|
+
}, {
|
|
327
|
+
default: v(() => [
|
|
328
|
+
O(u(e(c)("cookie.acceptAll")), 1)
|
|
329
|
+
]),
|
|
330
|
+
_: 1
|
|
331
|
+
}),
|
|
332
|
+
m(e(q), {
|
|
333
|
+
round: "pill",
|
|
334
|
+
variant: "outline",
|
|
335
|
+
color: "primary",
|
|
336
|
+
onClick: R
|
|
337
|
+
}, {
|
|
338
|
+
default: v(() => [
|
|
339
|
+
O(u(e(c)("cookie.rejectAll")), 1)
|
|
340
|
+
]),
|
|
341
|
+
_: 1
|
|
342
|
+
}),
|
|
343
|
+
m(e(q), {
|
|
344
|
+
round: "pill",
|
|
345
|
+
variant: "outline",
|
|
346
|
+
color: "primary",
|
|
347
|
+
onClick: g[0] || (g[0] = (D) => K(!0))
|
|
348
|
+
}, {
|
|
349
|
+
default: v(() => [
|
|
350
|
+
O(u(e(c)("cookie.manage")), 1)
|
|
351
|
+
]),
|
|
352
|
+
_: 1
|
|
353
|
+
})
|
|
354
|
+
])),
|
|
355
|
+
m(e(B), {
|
|
356
|
+
class: "cookie-notice-close",
|
|
357
|
+
type: e(n),
|
|
358
|
+
onClick: g[1] || (g[1] = (D) => E(!1))
|
|
359
|
+
}, {
|
|
360
|
+
default: v(() => [
|
|
361
|
+
m(e(Pe))
|
|
362
|
+
]),
|
|
363
|
+
_: 1
|
|
364
|
+
}, 8, ["type"])
|
|
365
|
+
], 10, at)
|
|
366
|
+
]),
|
|
367
|
+
m(e(Ve), {
|
|
368
|
+
visible: T.value,
|
|
369
|
+
"onUpdate:visible": g[3] || (g[3] = (D) => T.value = D),
|
|
370
|
+
size: e(_) ? "medium" : "large",
|
|
371
|
+
"phone-half-full": e(k),
|
|
372
|
+
class: "cookie-dlg",
|
|
373
|
+
actions: X,
|
|
374
|
+
onChange: x
|
|
375
|
+
}, {
|
|
376
|
+
header: v(() => [
|
|
377
|
+
a("span", vt, u(e(c)("cookie.manage")), 1)
|
|
378
|
+
]),
|
|
379
|
+
default: v(() => [
|
|
380
|
+
a("div", mt, [
|
|
381
|
+
a("div", pt, [
|
|
382
|
+
a("div", ft, [
|
|
383
|
+
a("span", gt, u(e(c)("cookie.necessaryCookie")), 1),
|
|
384
|
+
a("span", kt, u(e(c)("cookie.alwaysOn")), 1)
|
|
385
|
+
]),
|
|
386
|
+
a("div", yt, u(e(c)("cookie.necessaryCookieDetail")), 1)
|
|
387
|
+
]),
|
|
388
|
+
a("div", _t, [
|
|
389
|
+
a("div", bt, [
|
|
390
|
+
a("span", wt, u(e(c)("cookie.analyticalCookie")), 1),
|
|
391
|
+
a("span", Ct, [
|
|
392
|
+
m(e(ge), {
|
|
393
|
+
modelValue: b.value,
|
|
394
|
+
"onUpdate:modelValue": g[2] || (g[2] = (D) => b.value = D)
|
|
395
|
+
}, null, 8, ["modelValue"])
|
|
396
|
+
])
|
|
397
|
+
]),
|
|
398
|
+
a("div", $t, u(e(c)("cookie.analyticalCookieDetail")), 1)
|
|
399
|
+
])
|
|
400
|
+
])
|
|
401
|
+
]),
|
|
402
|
+
_: 1
|
|
403
|
+
}, 8, ["visible", "size", "phone-half-full"])
|
|
404
|
+
])) : w("", !0)
|
|
405
|
+
]))
|
|
406
|
+
]),
|
|
407
|
+
_: 1
|
|
408
|
+
}));
|
|
409
|
+
}
|
|
410
|
+
}), zt = /* @__PURE__ */ L(xt, [["__scopeId", "data-v-1e847d29"]]), Et = {
|
|
411
|
+
key: 0,
|
|
412
|
+
class: "cookie-notice"
|
|
413
|
+
}, Pt = { class: "cookie-notice-content" }, Vt = ["type"], Dt = { class: "cookie-notice-left" }, Bt = {
|
|
414
|
+
key: 0,
|
|
415
|
+
class: "cookie-desc",
|
|
416
|
+
style: { "margin-top": "0" }
|
|
417
|
+
}, Mt = ["href"], Nt = { class: "cookie-title" }, Tt = { class: "cookie-desc" }, Ut = ["href"], Ht = {
|
|
418
|
+
key: 0,
|
|
419
|
+
class: "cookie-notice-right"
|
|
420
|
+
}, Kt = { class: "cookie-dlg-content" }, Rt = { class: "content-item" }, Gt = { class: "item-header" }, Lt = { class: "item-title" }, jt = { class: "item-extra" }, Yt = { class: "item-detail" }, Jt = { class: "content-item" }, Wt = { class: "item-header" }, Zt = { class: "item-title" }, Ft = { class: "item-extra" }, qt = { class: "item-detail" }, Qt = "0", he = "1", Xt = "2", Y = "3", eo = "agreed-cookiepolicy-zh", to = "agreed-cookiepolicy-en", oo = /* @__PURE__ */ H({
|
|
421
|
+
__name: "OCookieNoticeEl",
|
|
422
|
+
props: {
|
|
423
|
+
visible: { type: Boolean },
|
|
424
|
+
enableGrid: { type: Boolean },
|
|
425
|
+
community: {},
|
|
426
|
+
aboutPathZh: {},
|
|
427
|
+
aboutPathEn: {}
|
|
428
|
+
},
|
|
429
|
+
emits: ["update:visible"],
|
|
430
|
+
setup(t, { emit: o }) {
|
|
431
|
+
const y = t, d = o, { lePadV: k } = Z(), { locale: _, t: n } = ae(), c = z(() => _.value === "zh"), f = z(() => c.value ? eo : to), i = P(!1), b = ke(y, "visible", d, { defaultValue: !1 }), $ = (x) => {
|
|
432
|
+
const p = document.cookie.split(";").find((g) => g.split("=")[0].trim() === encodeURIComponent(x));
|
|
433
|
+
return p ? decodeURIComponent(p.split("=")[1]) : null;
|
|
434
|
+
}, S = (x, p, g, D) => {
|
|
435
|
+
const ee = `; max-age=${g * 24 * 60 * 60}`;
|
|
436
|
+
document.cookie = `${encodeURIComponent(x)}=${encodeURIComponent(p)}${ee}; path=/; domain=${D}`;
|
|
437
|
+
}, V = (x) => {
|
|
438
|
+
typeof x == "boolean" ? b.value = x : b.value = !b.value, pe(() => {
|
|
439
|
+
!b.value && c.value && $(f.value) !== Y && S(f.value, Y, 180, location.hostname);
|
|
440
|
+
});
|
|
441
|
+
}, N = P(!1), E = (x) => {
|
|
442
|
+
typeof x == "boolean" ? N.value = x : N.value = !N.value;
|
|
443
|
+
}, T = () => c.value ? $(f.value) !== Y : ($(f.value) ?? "0") === Qt, K = () => c.value ? $(f.value) === Y : $(f.value) === he;
|
|
444
|
+
Q(() => {
|
|
445
|
+
T() && (V(!0), c.value && $(f.value) !== Y && S(f.value, Y, 180, void 0));
|
|
446
|
+
});
|
|
447
|
+
const h = () => {
|
|
448
|
+
i.value = !0, S(f.value, he, 180, location.hostname), V(!1);
|
|
449
|
+
}, U = () => {
|
|
450
|
+
i.value = !1, S(f.value, Xt, 180, location.hostname), V(!1);
|
|
451
|
+
}, C = () => {
|
|
452
|
+
i.value ? h() : U(), E(!1);
|
|
453
|
+
}, R = () => {
|
|
454
|
+
i.value = !0, h(), E(!1);
|
|
455
|
+
}, X = () => {
|
|
456
|
+
i.value = K();
|
|
457
|
+
};
|
|
458
|
+
return (x, p) => (l(), A(e(ye), null, {
|
|
459
|
+
default: v(() => [
|
|
460
|
+
(l(), A(me, { to: "#app" }, [
|
|
461
|
+
e(b) ? (l(), r("div", Et, [
|
|
462
|
+
a("div", Pt, [
|
|
463
|
+
a("div", {
|
|
464
|
+
type: e(_),
|
|
465
|
+
class: M({ "cookie-notice-wrap-grid": t.enableGrid, "cookie-notice-wrap": !t.enableGrid })
|
|
466
|
+
}, [
|
|
467
|
+
a("div", Dt, [
|
|
468
|
+
c.value ? (l(), r("p", Bt, [
|
|
469
|
+
O(u(e(n)("cookie.desc")) + " ", 1),
|
|
470
|
+
a("a", {
|
|
471
|
+
href: t.aboutPathZh,
|
|
472
|
+
target: "_blank",
|
|
473
|
+
rel: "noopener noreferrer"
|
|
474
|
+
}, u(e(n)("cookie.about")), 9, Mt)
|
|
475
|
+
])) : (l(), r(G, { key: 1 }, [
|
|
476
|
+
a("p", Nt, u(e(n)("cookie.title", [t.community])), 1),
|
|
477
|
+
a("p", Tt, [
|
|
478
|
+
O(u(e(n)("cookie.desc")) + " ", 1),
|
|
479
|
+
a("a", {
|
|
480
|
+
href: t.aboutPathEn,
|
|
481
|
+
target: "_blank",
|
|
482
|
+
rel: "noopener noreferrer"
|
|
483
|
+
}, u(e(n)("cookie.about")), 9, Ut),
|
|
484
|
+
p[4] || (p[4] = O(". ", -1))
|
|
485
|
+
])
|
|
486
|
+
], 64))
|
|
487
|
+
]),
|
|
488
|
+
c.value ? w("", !0) : (l(), r("div", Ht, [
|
|
489
|
+
m(e(W), {
|
|
490
|
+
round: "",
|
|
491
|
+
type: "primary",
|
|
492
|
+
onClick: h
|
|
493
|
+
}, {
|
|
494
|
+
default: v(() => [
|
|
495
|
+
O(u(e(n)("cookie.acceptAll")), 1)
|
|
496
|
+
]),
|
|
497
|
+
_: 1
|
|
498
|
+
}),
|
|
499
|
+
m(e(W), {
|
|
500
|
+
round: "",
|
|
501
|
+
type: "primary",
|
|
502
|
+
onClick: U
|
|
503
|
+
}, {
|
|
504
|
+
default: v(() => [
|
|
505
|
+
O(u(e(n)("cookie.rejectAll")), 1)
|
|
506
|
+
]),
|
|
507
|
+
_: 1
|
|
508
|
+
}),
|
|
509
|
+
m(e(W), {
|
|
510
|
+
round: "",
|
|
511
|
+
type: "primary",
|
|
512
|
+
onClick: p[0] || (p[0] = (g) => E(!0))
|
|
513
|
+
}, {
|
|
514
|
+
default: v(() => [
|
|
515
|
+
O(u(e(n)("cookie.manage")), 1)
|
|
516
|
+
]),
|
|
517
|
+
_: 1
|
|
518
|
+
})
|
|
519
|
+
])),
|
|
520
|
+
m(e(Ke), {
|
|
521
|
+
class: "cookie-notice-close",
|
|
522
|
+
type: e(_),
|
|
523
|
+
onClick: p[1] || (p[1] = (g) => V(!1))
|
|
524
|
+
}, {
|
|
525
|
+
default: v(() => [
|
|
526
|
+
I(x.$slots, "close-icon", {}, () => [
|
|
527
|
+
p[5] || (p[5] = a("svg", {
|
|
528
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
529
|
+
viewBox: "0 0 1024 1024"
|
|
530
|
+
}, [
|
|
531
|
+
a("path", {
|
|
532
|
+
fill: "currentColor",
|
|
533
|
+
d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
|
|
534
|
+
})
|
|
535
|
+
], -1))
|
|
536
|
+
], !0)
|
|
537
|
+
]),
|
|
538
|
+
_: 3
|
|
539
|
+
}, 8, ["type"])
|
|
540
|
+
], 10, Vt)
|
|
541
|
+
]),
|
|
542
|
+
m(e(Re), {
|
|
543
|
+
modelValue: N.value,
|
|
544
|
+
"onUpdate:modelValue": p[3] || (p[3] = (g) => N.value = g),
|
|
545
|
+
width: e(k) ? "90%" : "50%",
|
|
546
|
+
class: "cookie-dlg",
|
|
547
|
+
title: e(n)("cookie.manage"),
|
|
548
|
+
"destroy-on-close": "",
|
|
549
|
+
onOpen: X
|
|
550
|
+
}, {
|
|
551
|
+
footer: v(() => [
|
|
552
|
+
m(e(W), {
|
|
553
|
+
round: "",
|
|
554
|
+
type: "primary",
|
|
555
|
+
onClick: C,
|
|
556
|
+
style: { "margin-right": "16px" }
|
|
557
|
+
}, {
|
|
558
|
+
default: v(() => [
|
|
559
|
+
O(u(e(n)("cookie.saveSetting")), 1)
|
|
560
|
+
]),
|
|
561
|
+
_: 1
|
|
562
|
+
}),
|
|
563
|
+
m(e(W), {
|
|
564
|
+
round: "",
|
|
565
|
+
type: "primary",
|
|
566
|
+
onClick: R
|
|
567
|
+
}, {
|
|
568
|
+
default: v(() => [
|
|
569
|
+
O(u(e(n)("cookie.acceptAll")), 1)
|
|
570
|
+
]),
|
|
571
|
+
_: 1
|
|
572
|
+
})
|
|
573
|
+
]),
|
|
574
|
+
default: v(() => [
|
|
575
|
+
a("div", Kt, [
|
|
576
|
+
a("div", Rt, [
|
|
577
|
+
a("div", Gt, [
|
|
578
|
+
a("span", Lt, u(e(n)("cookie.necessaryCookie")), 1),
|
|
579
|
+
a("span", jt, u(e(n)("cookie.alwaysOn")), 1)
|
|
580
|
+
]),
|
|
581
|
+
a("div", Yt, u(e(n)("cookie.necessaryCookieDetail")), 1)
|
|
582
|
+
]),
|
|
583
|
+
a("div", Jt, [
|
|
584
|
+
a("div", Wt, [
|
|
585
|
+
a("span", Zt, u(e(n)("cookie.analyticalCookie")), 1),
|
|
586
|
+
a("span", Ft, [
|
|
587
|
+
m(e(Ge), {
|
|
588
|
+
modelValue: i.value,
|
|
589
|
+
"onUpdate:modelValue": p[2] || (p[2] = (g) => i.value = g)
|
|
590
|
+
}, null, 8, ["modelValue"])
|
|
591
|
+
])
|
|
592
|
+
]),
|
|
593
|
+
a("div", qt, u(e(n)("cookie.analyticalCookieDetail")), 1)
|
|
594
|
+
])
|
|
595
|
+
])
|
|
596
|
+
]),
|
|
597
|
+
_: 1
|
|
598
|
+
}, 8, ["modelValue", "width", "title"])
|
|
599
|
+
])) : w("", !0)
|
|
600
|
+
]))
|
|
601
|
+
]),
|
|
602
|
+
_: 3
|
|
603
|
+
}));
|
|
604
|
+
}
|
|
605
|
+
}), lo = /* @__PURE__ */ L(oo, [["__scopeId", "data-v-bec18f8e"]]), so = {
|
|
606
|
+
version: "1.1",
|
|
607
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
608
|
+
width: "24",
|
|
609
|
+
height: "24",
|
|
610
|
+
viewBox: "0 0 24 24"
|
|
611
|
+
};
|
|
612
|
+
function ao(t, o) {
|
|
613
|
+
return l(), r("svg", so, [...o[0] || (o[0] = [
|
|
614
|
+
a("path", {
|
|
615
|
+
fill: "currentColor",
|
|
616
|
+
d: "M18.528 5.472c0.246 0.246 0.271 0.63 0.074 0.903l-0.074 0.087-5.54 5.538 0.006 0.006-0.989 0.989-0.006-0.006-5.538 5.54c-0.273 0.273-0.717 0.273-0.99 0-0.246-0.246-0.271-0.63-0.074-0.903l0.074-0.087 5.538-5.539-5.538-5.538-0.074-0.087c-0.197-0.274-0.172-0.657 0.074-0.903s0.63-0.271 0.903-0.074l0.087 0.074 5.538 5.539 5.539-5.539c0.273-0.273 0.717-0.273 0.99 0zM14.551 13.561l3.978 3.978 0.074 0.087c0.197 0.274 0.172 0.657-0.074 0.903s-0.63 0.271-0.903 0.074l-0.087-0.074-3.978-3.978c-0.273-0.273-0.273-0.717 0-0.99v0c0.273-0.273 0.717-0.273 0.99 0z"
|
|
617
|
+
}, null, -1)
|
|
618
|
+
])]);
|
|
619
|
+
}
|
|
620
|
+
const no = { name: "components-icon-close", render: ao }, io = {
|
|
621
|
+
version: "1.1",
|
|
622
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
623
|
+
width: "32",
|
|
624
|
+
height: "32",
|
|
625
|
+
viewBox: "0 0 32 32"
|
|
626
|
+
};
|
|
627
|
+
function co(t, o) {
|
|
628
|
+
return l(), r("svg", io, [...o[0] || (o[0] = [
|
|
629
|
+
a("path", {
|
|
630
|
+
opacity: "0.8",
|
|
631
|
+
fill: "currentColor",
|
|
632
|
+
d: "M13.215 0.524c-7.048 0-12.762 5.714-12.762 12.762s5.714 12.762 12.762 12.762c7.048 0 12.762-5.714 12.762-12.762s-5.714-12.762-12.762-12.762zM13.215 2.809c5.786 0 10.476 4.69 10.476 10.476s-4.69 10.476-10.476 10.476c-5.786 0-10.476-4.69-10.476-10.476s4.69-10.476 10.476-10.476z"
|
|
633
|
+
}, null, -1),
|
|
634
|
+
a("path", {
|
|
635
|
+
opacity: "0.8",
|
|
636
|
+
fill: "currentColor",
|
|
637
|
+
d: "M23.33 23.22c0.446-0.447 1.169-0.448 1.616-0.002l4.771 4.759c0.447 0.446 0.448 1.169 0.002 1.616s-1.169 0.448-1.616 0.002l-4.771-4.759c-0.447-0.446-0.448-1.169-0.002-1.616z"
|
|
638
|
+
}, null, -1)
|
|
639
|
+
])]);
|
|
640
|
+
}
|
|
641
|
+
const ve = { name: "components-icon-header-search", render: co }, ro = {
|
|
642
|
+
version: "1.1",
|
|
643
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
644
|
+
width: "32",
|
|
645
|
+
height: "32",
|
|
646
|
+
viewBox: "0 0 32 32"
|
|
647
|
+
};
|
|
648
|
+
function uo(t, o) {
|
|
649
|
+
return l(), r("svg", ro, [...o[0] || (o[0] = [
|
|
650
|
+
a("path", {
|
|
651
|
+
fill: "currentColor",
|
|
652
|
+
d: "M10.858 22.41c-0.349 0.349-0.915 0.349-1.263 0-0.314-0.314-0.345-0.804-0.094-1.153l0.094-0.111 5.146-5.15-5.177-5.178c-0.274-0.305-0.3-0.755-0.077-1.087l0.111-0.135c0.347-0.347 0.91-0.347 1.257 0l5.142 5.143 5.15-5.146c0.349-0.349 0.915-0.349 1.263 0 0.314 0.314 0.345 0.804 0.094 1.153l-0.094 0.111-11.552 11.552zM17.89 16.634l4.551 4.552c0.313 0.349 0.302 0.886-0.034 1.222-0.347 0.347-0.91 0.347-1.257 0l-4.516-4.518 1.256-1.256z"
|
|
653
|
+
}, null, -1)
|
|
654
|
+
])]);
|
|
655
|
+
}
|
|
656
|
+
const ho = { name: "components-icon-header-delete", render: uo }, vo = {
|
|
657
|
+
version: "1.1",
|
|
658
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
659
|
+
width: "24",
|
|
660
|
+
height: "24",
|
|
661
|
+
viewBox: "0 0 24 24"
|
|
662
|
+
};
|
|
663
|
+
function mo(t, o) {
|
|
664
|
+
return l(), r("svg", vo, [...o[0] || (o[0] = [
|
|
665
|
+
a("path", {
|
|
666
|
+
fill: "currentColor",
|
|
667
|
+
d: "M19.154 5.295c0.387 0 0.7 0.313 0.7 0.7 0 0.354-0.263 0.647-0.605 0.694l-0.095 0.006-12.201-0.001 0.001 12.413c0 0.17 0.12 0.311 0.28 0.344l0.071 0.007h9.39c0.17 0 0.311-0.12 0.344-0.28l0.007-0.071v-10.47c0-0.387 0.313-0.7 0.7-0.7 0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v10.47c0 0.919-0.708 1.672-1.608 1.745l-0.144 0.006h-9.39c-0.919 0-1.672-0.708-1.745-1.608l-0.006-0.144-0.001-12.413-0.707 0.001c-0.387 0-0.7-0.313-0.7-0.7 0-0.354 0.263-0.647 0.605-0.694l0.095-0.006h14.308zM10.011 9.744c0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v5.68c0 0.387-0.313 0.7-0.7 0.7-0.354 0-0.647-0.263-0.694-0.605l-0.006-0.095v-5.68c0-0.387 0.313-0.7 0.7-0.7zM13.953 9.744c0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v5.68c0 0.387-0.313 0.7-0.7 0.7-0.354 0-0.647-0.263-0.694-0.605l-0.006-0.095v-5.68c0-0.387 0.313-0.7 0.7-0.7zM13.652 3.189c0.387 0 0.7 0.313 0.7 0.7 0 0.354-0.263 0.647-0.605 0.694l-0.095 0.006h-3.972c-0.387 0-0.7-0.313-0.7-0.7 0-0.354 0.263-0.647 0.605-0.694l0.095-0.006h3.972z"
|
|
668
|
+
}, null, -1)
|
|
669
|
+
])]);
|
|
670
|
+
}
|
|
671
|
+
const po = { name: "components-icon-delete", render: mo }, fo = {
|
|
672
|
+
version: "1.1",
|
|
673
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
674
|
+
width: "36",
|
|
675
|
+
height: "32",
|
|
676
|
+
viewBox: "0 0 36 32"
|
|
677
|
+
};
|
|
678
|
+
function go(t, o) {
|
|
679
|
+
return l(), r("svg", fo, [...o[0] || (o[0] = [
|
|
680
|
+
a("path", {
|
|
681
|
+
fill: "currentColor",
|
|
682
|
+
d: "M5.886 19.111l10.672 10.677c0.46 0.524 0.44 1.322-0.060 1.822s-1.298 0.52-1.822 0.060l-0.064-0.060-12.498-12.498h3.772zM14.613 0.391c0.521-0.521 1.365-0.521 1.886 0 0.5 0.5 0.52 1.298 0.060 1.822l-0.060 0.064-12.391 12.391h29.67c0.71 0 1.291 0.555 1.331 1.255l0.002 0.078c0 0.71-0.555 1.291-1.255 1.331l-0.078 0.002h-31.816c-0.472 0-0.924-0.187-1.257-0.521-0.671-0.671-0.694-1.745-0.067-2.443l0.067-0.071 13.908-13.908z"
|
|
683
|
+
}, null, -1)
|
|
684
|
+
])]);
|
|
685
|
+
}
|
|
686
|
+
const ko = { name: "components-icon-header-back", render: go }, yo = { class: "o-header-search" }, _o = { class: "o-header-search-drawer" }, bo = {
|
|
687
|
+
key: 0,
|
|
688
|
+
class: "o-header-search-recommend-container"
|
|
689
|
+
}, wo = ["onClick"], Co = {
|
|
690
|
+
key: 1,
|
|
691
|
+
class: "o-header-search-history-container"
|
|
692
|
+
}, $o = { class: "o-header-search-history-header" }, Io = { class: "o-header-search-history-header-title" }, Oo = { class: "o-header-search-history-item-container" }, Ao = ["onClick"], So = { class: "o-header-search-history-item-text" }, xo = {
|
|
693
|
+
key: 3,
|
|
694
|
+
class: "o-header-search-hot-container"
|
|
695
|
+
}, zo = { class: "o-header-search-hot-header" }, Eo = { class: "o-header-search-hot-item-container" }, Po = ["onClick"], Vo = /* @__PURE__ */ H({
|
|
696
|
+
__name: "OHeaderSearch",
|
|
697
|
+
props: {
|
|
698
|
+
modelValue: { default: "" },
|
|
699
|
+
placeholder: {},
|
|
700
|
+
expandedPlaceholder: {},
|
|
701
|
+
expandDirection: { default: "left" },
|
|
702
|
+
clearable: { type: Boolean, default: !0 },
|
|
703
|
+
historyItems: { default: () => [] },
|
|
704
|
+
maxHistoryCount: { default: 6 },
|
|
705
|
+
storeHistory: { type: Boolean, default: !1 },
|
|
706
|
+
historyTitle: {},
|
|
707
|
+
storageKey: { default: "search-history" },
|
|
708
|
+
hotItems: { default: () => [] },
|
|
709
|
+
hotTitle: {},
|
|
710
|
+
recommendItems: { default: () => [] },
|
|
711
|
+
searchUrl: {},
|
|
712
|
+
searchUrlOpenBlank: { type: Boolean, default: !0 },
|
|
713
|
+
searchTextMobile: {}
|
|
714
|
+
},
|
|
715
|
+
emits: ["update:modelValue", "update:historyItems", "clear", "search", "delete-history", "delete-history-item"],
|
|
716
|
+
setup(t, { emit: o }) {
|
|
717
|
+
const { lePadV: s } = Z(), { t: y } = ae(), d = t, k = o, _ = P(d.modelValue), n = P(d.historyItems), c = P(!1), f = P(), i = z(() => !s.value && c.value || s.value && _.value);
|
|
718
|
+
F(
|
|
719
|
+
() => d.modelValue,
|
|
720
|
+
(h) => {
|
|
721
|
+
_.value !== h && (_.value = h);
|
|
722
|
+
}
|
|
723
|
+
), F(
|
|
724
|
+
() => _.value,
|
|
725
|
+
(h) => {
|
|
726
|
+
k("update:modelValue", h);
|
|
727
|
+
}
|
|
728
|
+
), F(
|
|
729
|
+
() => d.historyItems,
|
|
730
|
+
(h) => {
|
|
731
|
+
n.value !== h && (n.value = h);
|
|
732
|
+
}
|
|
733
|
+
), F(
|
|
734
|
+
() => n.value,
|
|
735
|
+
(h) => {
|
|
736
|
+
k("update:historyItems", h);
|
|
737
|
+
}
|
|
738
|
+
), Q(() => {
|
|
739
|
+
if (d.storeHistory && d.storageKey)
|
|
740
|
+
try {
|
|
741
|
+
const h = JSON.parse(localStorage.getItem(d.storageKey) || "[]");
|
|
742
|
+
Array.isArray(h) && h.length && (n.value = Array.from(/* @__PURE__ */ new Set([...n.value, ...h])));
|
|
743
|
+
} catch {
|
|
744
|
+
}
|
|
745
|
+
});
|
|
746
|
+
const b = () => {
|
|
747
|
+
c.value = !0;
|
|
748
|
+
}, $ = () => {
|
|
749
|
+
const h = _.value.trim();
|
|
750
|
+
h && (c.value = !1, n.value.unshift(h), n.value = Array.from(new Set(n.value)), n.value.length > d.maxHistoryCount && n.value.pop(), d.storeHistory && d.storeHistory && localStorage.setItem(d.storageKey, JSON.stringify(n.value)), k("search", h), d.searchUrl && window.open(d.searchUrl + h, d.searchUrlOpenBlank ? "_blank" : "_self", "noopener noreferrer"));
|
|
751
|
+
}, S = () => {
|
|
752
|
+
_.value = "", k("clear"), s.value || (c.value = !1);
|
|
753
|
+
}, V = () => {
|
|
754
|
+
const h = [...n.value];
|
|
755
|
+
n.value = [], d.storeHistory && d.storeHistory && localStorage.removeItem(d.storageKey), k("delete-history", h);
|
|
756
|
+
}, N = (h) => {
|
|
757
|
+
n.value = n.value.filter((U) => U !== h), d.storeHistory && d.storeHistory && (n.value.length ? localStorage.setItem(d.storageKey, JSON.stringify(n.value)) : localStorage.removeItem(d.storageKey)), k("delete-history-item", h);
|
|
758
|
+
}, E = (h) => {
|
|
759
|
+
_.value = h, $();
|
|
760
|
+
}, T = () => {
|
|
761
|
+
_.value = "", c.value = !1;
|
|
762
|
+
}, K = P();
|
|
763
|
+
return He(K, S), (h, U) => (l(), r("div", yo, [
|
|
764
|
+
a("div", {
|
|
765
|
+
ref_key: "posWrapper",
|
|
766
|
+
ref: K,
|
|
767
|
+
class: M({
|
|
768
|
+
"o-header-search-input-pc-wrapper": !e(s),
|
|
769
|
+
"o-header-search-input-pc-wrapper-left": !e(s) && t.expandDirection === "left",
|
|
770
|
+
"o-header-search-input-pc-wrapper-right": !e(s) && t.expandDirection === "right",
|
|
771
|
+
"o-header-search-input-mobile-wrapper": e(s),
|
|
772
|
+
focus: c.value
|
|
773
|
+
})
|
|
774
|
+
}, [
|
|
775
|
+
a("div", {
|
|
776
|
+
class: M(["o-header-search-input-wrapper", { focus: c.value }])
|
|
777
|
+
}, [
|
|
778
|
+
e(s) && c.value ? (l(), A(e(B), {
|
|
779
|
+
key: 0,
|
|
780
|
+
class: "o-header-search-icon",
|
|
781
|
+
onClick: T
|
|
782
|
+
}, {
|
|
783
|
+
default: v(() => [
|
|
784
|
+
m(e(ko))
|
|
785
|
+
]),
|
|
786
|
+
_: 1
|
|
787
|
+
})) : w("", !0),
|
|
788
|
+
m(e(De), {
|
|
789
|
+
ref_key: "inputRef",
|
|
790
|
+
ref: f,
|
|
791
|
+
modelValue: _.value,
|
|
792
|
+
"onUpdate:modelValue": U[0] || (U[0] = (C) => _.value = C),
|
|
793
|
+
class: "o-header-search-input",
|
|
794
|
+
placeholder: c.value ? t.expandedPlaceholder ?? e(y)("search.expandedPlaceholder") : t.placeholder ?? e(y)("search.placeholder"),
|
|
795
|
+
onFocus: b,
|
|
796
|
+
onKeyup: Ae($, ["enter"])
|
|
797
|
+
}, {
|
|
798
|
+
prefix: v(() => [
|
|
799
|
+
I(h.$slots, "input-prefix", {}, () => [
|
|
800
|
+
m(e(B), { class: "o-header-search-icon" }, {
|
|
801
|
+
default: v(() => [
|
|
802
|
+
m(e(ve))
|
|
803
|
+
]),
|
|
804
|
+
_: 1
|
|
805
|
+
})
|
|
806
|
+
], !0)
|
|
807
|
+
]),
|
|
808
|
+
suffix: v(() => [
|
|
809
|
+
I(h.$slots, "input-suffix", {}, () => [
|
|
810
|
+
t.clearable && i.value ? (l(), A(e(B), {
|
|
811
|
+
key: 0,
|
|
812
|
+
class: "o-header-search-icon close",
|
|
813
|
+
onClick: S
|
|
814
|
+
}, {
|
|
815
|
+
default: v(() => [
|
|
816
|
+
m(e(no))
|
|
817
|
+
]),
|
|
818
|
+
_: 1
|
|
819
|
+
})) : w("", !0)
|
|
820
|
+
], !0)
|
|
821
|
+
]),
|
|
822
|
+
_: 3
|
|
823
|
+
}, 8, ["modelValue", "placeholder"]),
|
|
824
|
+
e(s) && c.value ? (l(), r("span", {
|
|
825
|
+
key: 1,
|
|
826
|
+
class: "o-header-search-text",
|
|
827
|
+
onClick: $
|
|
828
|
+
}, u(t.searchTextMobile ?? e(y)("search")), 1)) : w("", !0)
|
|
829
|
+
], 2),
|
|
830
|
+
Oe(a("div", _o, [
|
|
831
|
+
I(h.$slots, "drawer", {
|
|
832
|
+
recommendItems: t.recommendItems,
|
|
833
|
+
historyItems: n.value,
|
|
834
|
+
hotItems: t.hotItems
|
|
835
|
+
}, () => [
|
|
836
|
+
t.recommendItems.length ? (l(), r("div", bo, [
|
|
837
|
+
I(h.$slots, "recommend-header", { recommend: t.recommendItems }, void 0, !0),
|
|
838
|
+
I(h.$slots, "recommend-content", { recommend: t.recommendItems }, () => [
|
|
839
|
+
(l(!0), r(G, null, J(t.recommendItems, (C) => (l(), r("div", {
|
|
840
|
+
class: "o-header-search-recommend-item",
|
|
841
|
+
key: C,
|
|
842
|
+
onClick: (R) => E(C)
|
|
843
|
+
}, u(C), 9, wo))), 128))
|
|
844
|
+
], !0)
|
|
845
|
+
])) : n.value.length ? (l(), r("div", Co, [
|
|
846
|
+
I(h.$slots, "history-header", { history: n.value }, () => [
|
|
847
|
+
a("div", $o, [
|
|
848
|
+
a("span", Io, u(t.historyTitle ?? e(y)("search.history")), 1),
|
|
849
|
+
m(e(B), {
|
|
850
|
+
class: "o-header-search-icon",
|
|
851
|
+
onClick: V
|
|
852
|
+
}, {
|
|
853
|
+
default: v(() => [
|
|
854
|
+
m(e(po))
|
|
855
|
+
]),
|
|
856
|
+
_: 1
|
|
857
|
+
})
|
|
858
|
+
])
|
|
859
|
+
], !0),
|
|
860
|
+
I(h.$slots, "history-content", { history: n.value }, () => [
|
|
861
|
+
a("div", Oo, [
|
|
862
|
+
(l(!0), r(G, null, J(n.value, (C) => (l(), r("div", {
|
|
863
|
+
key: C,
|
|
864
|
+
class: "o-header-search-history-item",
|
|
865
|
+
onClick: (R) => E(C)
|
|
866
|
+
}, [
|
|
867
|
+
a("span", So, u(C), 1),
|
|
868
|
+
m(e(B), {
|
|
869
|
+
class: "o-header-search-history-item-icon",
|
|
870
|
+
onClick: Se((R) => N(C), ["stop"])
|
|
871
|
+
}, {
|
|
872
|
+
default: v(() => [
|
|
873
|
+
m(e(ho), { class: "icon-delete" })
|
|
874
|
+
]),
|
|
875
|
+
_: 1
|
|
876
|
+
}, 8, ["onClick"])
|
|
877
|
+
], 8, Ao))), 128))
|
|
878
|
+
])
|
|
879
|
+
], !0)
|
|
880
|
+
])) : w("", !0),
|
|
881
|
+
(t.recommendItems.length || n.value.length) && t.hotItems.length ? (l(), A(e(Be), {
|
|
882
|
+
key: 2,
|
|
883
|
+
class: "o-header-search-drawer-divider"
|
|
884
|
+
})) : w("", !0),
|
|
885
|
+
t.hotItems.length ? (l(), r("div", xo, [
|
|
886
|
+
I(h.$slots, "hot-header", { hot: t.hotItems }, () => [
|
|
887
|
+
a("div", zo, u(t.hotTitle ?? e(y)("search.hot")), 1)
|
|
888
|
+
], !0),
|
|
889
|
+
I(h.$slots, "hot-content", { hot: t.hotItems }, () => [
|
|
890
|
+
a("div", Eo, [
|
|
891
|
+
(l(!0), r(G, null, J(t.hotItems, (C) => (l(), r("div", {
|
|
892
|
+
key: C,
|
|
893
|
+
class: "o-header-search-hot-item",
|
|
894
|
+
onClick: (R) => E(C)
|
|
895
|
+
}, u(C), 9, Po))), 128))
|
|
896
|
+
])
|
|
897
|
+
], !0)
|
|
898
|
+
])) : w("", !0)
|
|
899
|
+
], !0)
|
|
900
|
+
], 512), [
|
|
901
|
+
[xe, c.value]
|
|
902
|
+
])
|
|
903
|
+
], 2),
|
|
904
|
+
e(s) ? (l(), A(e(B), {
|
|
905
|
+
key: 0,
|
|
906
|
+
class: "o-header-search-icon-mobile",
|
|
907
|
+
onClick: b
|
|
908
|
+
}, {
|
|
909
|
+
default: v(() => [
|
|
910
|
+
m(e(ve))
|
|
911
|
+
]),
|
|
912
|
+
_: 1
|
|
913
|
+
})) : w("", !0)
|
|
914
|
+
]));
|
|
915
|
+
}
|
|
916
|
+
}), Do = /* @__PURE__ */ L(Vo, [["__scopeId", "data-v-9f1bd8fc"]]), Bo = {
|
|
917
|
+
locale: "zh-CN",
|
|
918
|
+
// common
|
|
919
|
+
"common.empty": "暂无数据",
|
|
920
|
+
"common.loading": "加载中...",
|
|
921
|
+
// pagination
|
|
922
|
+
"pagination.goto": "前往",
|
|
923
|
+
"pagination.page": "页",
|
|
924
|
+
"pagination.countPerPage": "条/页",
|
|
925
|
+
"pagination.total": "共 {0} 条",
|
|
926
|
+
// upload
|
|
927
|
+
"upload.buttonLabel": "点击上传",
|
|
928
|
+
"upload.drag": "点击或拖拽文件到此处上传",
|
|
929
|
+
"upload.dragHover": "释放文件并开始上传",
|
|
930
|
+
"upload.retry": "点击重试",
|
|
931
|
+
"upload.delete": "删除",
|
|
932
|
+
"upload.preview": "预览",
|
|
933
|
+
"upload.edit": "编辑",
|
|
934
|
+
// select
|
|
935
|
+
"select.cancel": "取消",
|
|
936
|
+
"select.confirm": "确定",
|
|
937
|
+
// input
|
|
938
|
+
"input.limit": "<b>{0}</b>/{1}"
|
|
939
|
+
}, Mo = {
|
|
940
|
+
locale: "en-US",
|
|
941
|
+
// common
|
|
942
|
+
"common.empty": "No Data",
|
|
943
|
+
"common.loading": "Loading...",
|
|
944
|
+
// pagination
|
|
945
|
+
"pagination.goto": "Go to",
|
|
946
|
+
"pagination.page": "Page",
|
|
947
|
+
"pagination.countPerPage": "/page",
|
|
948
|
+
"pagination.total": "Total: {0}",
|
|
949
|
+
// upload
|
|
950
|
+
"upload.buttonLabel": "Upload",
|
|
951
|
+
"upload.drag": "Click or drag file to this area to upload",
|
|
952
|
+
"upload.dragHover": "Release to upload",
|
|
953
|
+
"upload.retry": "Click to retry",
|
|
954
|
+
"upload.delete": "Delete",
|
|
955
|
+
"upload.preview": "Preview",
|
|
956
|
+
"upload.edit": "Edit",
|
|
957
|
+
// select
|
|
958
|
+
"select.cancel": "Cancel",
|
|
959
|
+
"select.confirm": "Ok",
|
|
960
|
+
// input
|
|
961
|
+
"input.limit": "<b>{0}</b>/{1}"
|
|
962
|
+
}, No = /* @__PURE__ */ H({
|
|
963
|
+
__name: "OPlusConfigProvider",
|
|
964
|
+
props: {
|
|
965
|
+
locale: {},
|
|
966
|
+
theme: { default: "light" }
|
|
967
|
+
},
|
|
968
|
+
setup(t) {
|
|
969
|
+
const o = t, s = ze({
|
|
970
|
+
locale: z(() => o.locale),
|
|
971
|
+
theme: z(() => o.theme)
|
|
972
|
+
});
|
|
973
|
+
return Ee(_e, s), (y, d) => (l(), A(e(Me), {
|
|
974
|
+
locale: t.locale === "zh" ? e(Bo) : e(Mo)
|
|
975
|
+
}, {
|
|
976
|
+
default: v(() => [
|
|
977
|
+
I(y.$slots, "default")
|
|
978
|
+
]),
|
|
979
|
+
_: 3
|
|
980
|
+
}, 8, ["locale"]));
|
|
981
|
+
}
|
|
982
|
+
}), To = {
|
|
983
|
+
version: "1.1",
|
|
984
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
985
|
+
width: "24",
|
|
986
|
+
height: "24",
|
|
987
|
+
viewBox: "0 0 24 24"
|
|
988
|
+
};
|
|
989
|
+
function Uo(t, o) {
|
|
990
|
+
return l(), r("svg", To, [...o[0] || (o[0] = [
|
|
991
|
+
a("path", { d: "M9.246 5.764c-0.251 0.251-0.271 0.644-0.063 0.918l0.063 0.072 5.016 5.016c0.1 0.1 0.115 0.254 0.043 0.37l-0.043 0.054-5.062 5.062c-0.273 0.273-0.273 0.717 0 0.99 0.251 0.251 0.644 0.271 0.918 0.063l0.072-0.063 5.062-5.062c0.629-0.629 0.662-1.628 0.099-2.296l-0.099-0.108-5.016-5.016c-0.273-0.273-0.717-0.273-0.99 0z" }, null, -1)
|
|
992
|
+
])]);
|
|
993
|
+
}
|
|
994
|
+
const Ho = { name: "components-icon-chevron-right", render: Uo }, Ko = { class: "section-wrapper" }, Ro = {
|
|
995
|
+
key: 1,
|
|
996
|
+
class: "section-title"
|
|
997
|
+
}, Go = {
|
|
998
|
+
key: 2,
|
|
999
|
+
class: "section-subtitle"
|
|
1000
|
+
}, Lo = {
|
|
1001
|
+
key: 1,
|
|
1002
|
+
class: "section-body"
|
|
1003
|
+
}, jo = {
|
|
1004
|
+
key: 2,
|
|
1005
|
+
class: "section-footer"
|
|
1006
|
+
}, Yo = /* @__PURE__ */ H({
|
|
1007
|
+
__name: "OSection",
|
|
1008
|
+
props: {
|
|
1009
|
+
title: { default: void 0 },
|
|
1010
|
+
subtitle: { default: void 0 },
|
|
1011
|
+
full: { type: Boolean, default: !1 },
|
|
1012
|
+
headerJustifyCenter: { type: Boolean, default: !0 },
|
|
1013
|
+
footer: { default: void 0 },
|
|
1014
|
+
footerHref: { default: void 0 }
|
|
1015
|
+
},
|
|
1016
|
+
setup(t) {
|
|
1017
|
+
const o = t;
|
|
1018
|
+
return (s, y) => (l(), r("div", {
|
|
1019
|
+
class: M(["app-section", { "is-full": o.full }])
|
|
1020
|
+
}, [
|
|
1021
|
+
a("div", Ko, [
|
|
1022
|
+
I(s.$slots, "main", {}, () => [
|
|
1023
|
+
s.$slots.header || o.title || o.subtitle ? (l(), r("div", {
|
|
1024
|
+
key: 0,
|
|
1025
|
+
class: M(["section-header", { "is-left": !o.headerJustifyCenter }])
|
|
1026
|
+
}, [
|
|
1027
|
+
I(s.$slots, "header", {}, () => [
|
|
1028
|
+
e(Ne)(o.title) ? (l(!0), r(G, { key: 0 }, J(o.title, (d) => (l(), r("h2", {
|
|
1029
|
+
key: d,
|
|
1030
|
+
class: "section-title"
|
|
1031
|
+
}, u(d), 1))), 128)) : s.$slots.title || o.title ? (l(), r("h2", Ro, [
|
|
1032
|
+
I(s.$slots, "title", {}, () => [
|
|
1033
|
+
O(u(o.title), 1)
|
|
1034
|
+
], !0)
|
|
1035
|
+
])) : w("", !0),
|
|
1036
|
+
s.$slots.subtitle || o.subtitle ? (l(), r("p", Go, [
|
|
1037
|
+
I(s.$slots, "subtitle", {}, () => [
|
|
1038
|
+
O(u(o.subtitle), 1)
|
|
1039
|
+
], !0)
|
|
1040
|
+
])) : w("", !0)
|
|
1041
|
+
], !0)
|
|
1042
|
+
], 2)) : w("", !0),
|
|
1043
|
+
s.$slots.default ? (l(), r("div", Lo, [
|
|
1044
|
+
I(s.$slots, "default", {}, void 0, !0)
|
|
1045
|
+
])) : w("", !0),
|
|
1046
|
+
s.$slots.footer || o.footer ? (l(), r("div", jo, [
|
|
1047
|
+
I(s.$slots, "footer", {}, () => [
|
|
1048
|
+
m(e(Te), {
|
|
1049
|
+
href: o.footerHref,
|
|
1050
|
+
target: "_blank"
|
|
1051
|
+
}, {
|
|
1052
|
+
suffix: v(() => [
|
|
1053
|
+
m(e(B), { class: "footer-icon" }, {
|
|
1054
|
+
default: v(() => [
|
|
1055
|
+
m(e(Ho))
|
|
1056
|
+
]),
|
|
1057
|
+
_: 1
|
|
1058
|
+
})
|
|
1059
|
+
]),
|
|
1060
|
+
default: v(() => [
|
|
1061
|
+
O(u(o.footer) + " ", 1)
|
|
1062
|
+
]),
|
|
1063
|
+
_: 1
|
|
1064
|
+
}, 8, ["href"])
|
|
1065
|
+
], !0)
|
|
1066
|
+
])) : w("", !0)
|
|
1067
|
+
], !0)
|
|
1068
|
+
])
|
|
1069
|
+
], 2));
|
|
1070
|
+
}
|
|
1071
|
+
}), Jo = /* @__PURE__ */ L(Yo, [["__scopeId", "data-v-2fc90e8a"]]), Wo = {
|
|
1072
|
+
version: "1.1",
|
|
1073
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1074
|
+
width: "24",
|
|
1075
|
+
height: "24",
|
|
1076
|
+
viewBox: "0 0 24 24"
|
|
1077
|
+
};
|
|
1078
|
+
function Zo(t, o) {
|
|
1079
|
+
return l(), r("svg", Wo, [...o[0] || (o[0] = [
|
|
1080
|
+
a("path", {
|
|
1081
|
+
opacity: "0.8",
|
|
1082
|
+
fill: "currentColor",
|
|
1083
|
+
d: "M12 1.992c0.387 0 0.7 0.313 0.7 0.7v1.2c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-1.2c0-0.387 0.313-0.7 0.7-0.7zM6.769 6.747c-0.273 0.273-0.717 0.273-0.99 0l-0.849-0.849c-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495c0.273-0.273 0.717-0.273 0.99 0l0.849 0.849c0.136 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495zM18.192 6.747c-0.273 0.273-0.717 0.273-0.99 0-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495l0.849-0.849c0.273-0.273 0.717-0.273 0.99 0 0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495l-0.849 0.849zM5.3 12c0-3.7 3-6.7 6.7-6.7s6.7 3 6.7 6.7-3 6.7-6.7 6.7c-3.7 0-6.7-3-6.7-6.7zM17.3 12c0-2.927-2.373-5.3-5.3-5.3s-5.3 2.373-5.3 5.3c0 2.927 2.373 5.3 5.3 5.3s5.3-2.373 5.3-5.3zM4.594 11.969c0 0.387-0.313 0.7-0.7 0.7h-1.2c-0.387 0-0.7-0.313-0.7-0.7s0.313-0.7 0.7-0.7h1.2c0.386 0 0.7 0.313 0.7 0.7zM21.977 11.999c0 0.387-0.314 0.7-0.7 0.7h-1.2c-0.387 0-0.7-0.313-0.7-0.7s0.313-0.7 0.7-0.7h1.2c0.387 0 0.7 0.313 0.7 0.7zM5.921 19.060c-0.273 0.273-0.717 0.273-0.99 0-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495l0.849-0.849c0.273-0.273 0.717-0.273 0.99 0 0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495l-0.849 0.849zM19.041 19.060c-0.273 0.273-0.717 0.273-0.99 0l-0.849-0.849c-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495c0.273-0.273 0.717-0.273 0.99 0l0.849 0.849c0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495zM11.971 19.376c0.387 0 0.7 0.313 0.7 0.7v1.2c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-1.2c0-0.387 0.313-0.7 0.7-0.7z"
|
|
1084
|
+
}, null, -1)
|
|
1085
|
+
])]);
|
|
1086
|
+
}
|
|
1087
|
+
const te = { name: "components-icon-sun", render: Zo }, Fo = {
|
|
1088
|
+
version: "1.1",
|
|
1089
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1090
|
+
width: "24",
|
|
1091
|
+
height: "24",
|
|
1092
|
+
viewBox: "0 0 24 24"
|
|
1093
|
+
};
|
|
1094
|
+
function qo(t, o) {
|
|
1095
|
+
return l(), r("svg", Fo, [...o[0] || (o[0] = [
|
|
1096
|
+
a("path", {
|
|
1097
|
+
opacity: "0.8",
|
|
1098
|
+
fill: "currentColor",
|
|
1099
|
+
d: "M12 2.3c5.357 0 9.7 4.343 9.7 9.7s-4.343 9.7-9.7 9.7c-4.651 0-8.622-3.298-9.515-7.806-0.101-0.509 0.369-0.948 0.87-0.812 0.531 0.144 1.082 0.218 1.645 0.218 3.479 0 6.3-2.82 6.3-6.3 0-1.276-0.379-2.494-1.079-3.527-0.291-0.43-0.029-1.016 0.486-1.086 0.425-0.057 0.857-0.086 1.293-0.086zM12 3.7l-0.042 0.001 0.058 0.121c0.402 0.887 0.634 1.85 0.677 2.845l0.007 0.333c0 4.253-3.447 7.7-7.7 7.7-0.229 0-0.457-0.010-0.682-0.030l-0.186-0.021 0.076 0.218c1.147 3.123 4.102 5.321 7.528 5.429l0.264 0.004c4.584 0 8.3-3.716 8.3-8.3s-3.716-8.3-8.3-8.3z"
|
|
1100
|
+
}, null, -1)
|
|
1101
|
+
])]);
|
|
1102
|
+
}
|
|
1103
|
+
const oe = { name: "components-icon-moon", render: qo }, Qo = { class: "o-theme-switcher" }, Xo = {
|
|
1104
|
+
key: 1,
|
|
1105
|
+
class: "o-theme-switcher-mobile"
|
|
1106
|
+
}, el = /* @__PURE__ */ H({
|
|
1107
|
+
__name: "OThemeSwitcher",
|
|
1108
|
+
props: {
|
|
1109
|
+
theme: { default: "light" },
|
|
1110
|
+
type: { default: "auto" },
|
|
1111
|
+
lightValue: { default: "light" },
|
|
1112
|
+
darkValue: { default: "dark" },
|
|
1113
|
+
lightIcon: { default: te },
|
|
1114
|
+
darkIcon: { default: oe }
|
|
1115
|
+
},
|
|
1116
|
+
emits: ["update:theme", "change"],
|
|
1117
|
+
setup(t, { emit: o }) {
|
|
1118
|
+
const s = t, y = o, { gtPhone: d } = Z(), k = z({
|
|
1119
|
+
get() {
|
|
1120
|
+
return s.theme;
|
|
1121
|
+
},
|
|
1122
|
+
set(c) {
|
|
1123
|
+
y("update:theme", c), y("change", c);
|
|
1124
|
+
}
|
|
1125
|
+
}), _ = z(() => s.type === "common" || s.type === "auto" && d.value), n = () => {
|
|
1126
|
+
k.value = k.value === s.lightValue ? s.darkValue : s.lightValue;
|
|
1127
|
+
};
|
|
1128
|
+
return (c, f) => (l(), r("div", Qo, [
|
|
1129
|
+
_.value ? (l(), r("div", {
|
|
1130
|
+
key: 0,
|
|
1131
|
+
class: "o-theme-switcher-common",
|
|
1132
|
+
onClick: n
|
|
1133
|
+
}, [
|
|
1134
|
+
m(e(B), { class: "o-theme-icon" }, {
|
|
1135
|
+
default: v(() => [
|
|
1136
|
+
k.value === t.lightValue ? (l(), A(e(oe), { key: 0 })) : (l(), A(e(te), { key: 1 }))
|
|
1137
|
+
]),
|
|
1138
|
+
_: 1
|
|
1139
|
+
})
|
|
1140
|
+
])) : (l(), r("div", Xo, [
|
|
1141
|
+
m(e(ge), {
|
|
1142
|
+
modelValue: k.value,
|
|
1143
|
+
"onUpdate:modelValue": f[0] || (f[0] = (i) => k.value = i),
|
|
1144
|
+
class: "o-theme-switch",
|
|
1145
|
+
"checked-value": t.darkValue,
|
|
1146
|
+
"unchecked-value": t.lightValue
|
|
1147
|
+
}, {
|
|
1148
|
+
on: v(() => [
|
|
1149
|
+
m(e(B), { class: "o-theme-icon" }, {
|
|
1150
|
+
default: v(() => [
|
|
1151
|
+
m(e(te))
|
|
1152
|
+
]),
|
|
1153
|
+
_: 1
|
|
1154
|
+
})
|
|
1155
|
+
]),
|
|
1156
|
+
off: v(() => [
|
|
1157
|
+
m(e(B), { class: "o-theme-icon" }, {
|
|
1158
|
+
default: v(() => [
|
|
1159
|
+
m(e(oe))
|
|
1160
|
+
]),
|
|
1161
|
+
_: 1
|
|
1162
|
+
})
|
|
1163
|
+
]),
|
|
1164
|
+
_: 1
|
|
1165
|
+
}, 8, ["modelValue", "checked-value", "unchecked-value"])
|
|
1166
|
+
]))
|
|
1167
|
+
]));
|
|
1168
|
+
}
|
|
1169
|
+
}), tl = /* @__PURE__ */ L(el, [["__scopeId", "data-v-9aaa2610"]]), ol = {
|
|
1170
|
+
OBanner: Qe,
|
|
1171
|
+
OCookieNotice: zt,
|
|
1172
|
+
OCookieNoticeEl: lo,
|
|
1173
|
+
OHeaderSearch: Do,
|
|
1174
|
+
OPlusConfigProvider: No,
|
|
1175
|
+
OSection: Jo,
|
|
1176
|
+
OThemeSwitcher: tl
|
|
1177
|
+
}, hl = {
|
|
1178
|
+
install: (t) => {
|
|
1179
|
+
Object.entries(ol).forEach(([o, s]) => {
|
|
1180
|
+
t.component(o, s);
|
|
1181
|
+
});
|
|
1182
|
+
}
|
|
1183
|
+
};
|
|
1184
|
+
export {
|
|
1185
|
+
Qe as OBanner,
|
|
1186
|
+
zt as OCookieNotice,
|
|
1187
|
+
lo as OCookieNoticeEl,
|
|
1188
|
+
Do as OHeaderSearch,
|
|
1189
|
+
No as OPlusConfigProvider,
|
|
1190
|
+
Jo as OSection,
|
|
1191
|
+
tl as OThemeSwitcher,
|
|
1192
|
+
hl as default
|
|
1193
|
+
};
|