@opendesign-plus/components 0.0.1-rc.5 → 0.0.1-rc.7
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/chunk-OElCookieNotice.cjs.js +1 -0
- package/dist/chunk-OElCookieNotice.es.js +281 -0
- package/dist/components/OCookieNotice.vue.d.ts +1 -0
- package/dist/components/OFooter.vue.d.ts +25 -0
- package/dist/components/OHeader.vue.d.ts +23 -0
- package/dist/components/OHeaderMoblie.vue.d.ts +33 -0
- package/dist/components/OHeaderUser.vue.d.ts +40 -0
- package/dist/components/OSourceCode.vue.d.ts +20 -0
- package/dist/components/element-plus/OElCookieNotice.vue.d.ts +1 -0
- package/dist/components/events/OEventsApply.vue.d.ts +16 -0
- package/dist/components/events/OEventsCalendar.vue.d.ts +5 -0
- package/dist/components/events/OEventsList.vue.d.ts +26 -0
- package/dist/components/events/config.d.ts +26 -0
- package/dist/components/events/index.d.ts +78 -0
- package/dist/components/events/types.d.ts +66 -0
- package/dist/components/events/utils.d.ts +7 -0
- package/dist/components.cjs.js +3 -1
- package/dist/components.css +1 -1
- package/dist/components.element.cjs.js +1 -1
- package/dist/components.element.es.js +2 -213
- package/dist/components.es.js +3002 -445
- package/dist/index.d.ts +8 -1
- package/docs/design.md +27 -27
- package/docs/design_banner.md +41 -41
- package/docs/design_section.md +27 -27
- package/npmcachae/_cacache/content-v2/sha512/bd/56/25079ffb18446953f88fc063c3d6eaf7191772851b8477c118f113b920a7f357b67b9006181af58c9f68b0059b899ad0f2c86fe0a6490958d138cb063afd +1 -0
- package/npmcachae/_cacache/index-v5/d8/49/af4c6bb8f580edbd7b6e18db381844403e5f689a9849c5ffcdd2dd95d735 +3 -0
- package/npmcachae/_logs/2026-03-17T09_38_12_009Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_14_370Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_16_516Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_18_616Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_20_859Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_23_182Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_25_452Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_27_865Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_30_082Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_32_219Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_34_308Z-debug-0.log +157 -0
- package/npmcachae/_update-notifier-last-checked +0 -0
- package/package.json +2 -1
- package/scripts/generate-components-index.js +99 -80
- package/src/assets/events/city/default-cover.png +0 -0
- package/src/assets/events/city//344/270/212/346/265/267.png +0 -0
- package/src/assets/events/city//345/214/227/344/272/254.png +0 -0
- package/src/assets/events/city//345/215/227/344/272/254.png +0 -0
- package/src/assets/events/city//345/244/251/346/264/245.png +0 -0
- package/src/assets/events/city//345/271/277/345/267/236.png +0 -0
- package/src/assets/events/city//346/210/220/351/203/275.png +0 -0
- package/src/assets/events/city//346/227/240/351/224/241.png +0 -0
- package/src/assets/events/city//346/235/255/345/267/236.png +0 -0
- package/src/assets/events/city//346/255/246/346/261/211.png +0 -0
- package/src/assets/events/city//346/267/261/345/234/2631.png +0 -0
- package/src/assets/events/city//346/267/261/345/234/2632.png +0 -0
- package/src/assets/events/city//350/213/217/345/267/236.png +0 -0
- package/src/assets/events/city//350/245/277/345/256/211.png +0 -0
- package/src/assets/events/city//351/203/221/345/267/236.png +0 -0
- package/src/assets/events/svg-icons/icon-checked.svg +3 -0
- package/src/assets/events/svg-icons/icon-competition.svg +7 -0
- package/src/assets/events/svg-icons/icon-events.svg +4 -0
- package/src/assets/events/svg-icons/icon-release.svg +4 -0
- package/src/assets/events/svg-icons/icon-summit.svg +4 -0
- package/src/assets/svg-icons/icon-arrow-left.svg +3 -0
- package/src/assets/svg-icons/icon-avatar-line.svg +3 -0
- package/src/assets/svg-icons/icon-caret-left.svg +3 -0
- package/src/assets/svg-icons/icon-caret-right.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-down.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-right.svg +3 -3
- package/src/assets/svg-icons/icon-close.svg +3 -3
- package/src/assets/svg-icons/icon-delete.svg +3 -3
- package/src/assets/svg-icons/icon-header-back.svg +3 -3
- package/src/assets/svg-icons/icon-header-delete.svg +3 -3
- package/src/assets/svg-icons/icon-header-menu.svg +3 -0
- package/src/assets/svg-icons/icon-header-person.svg +3 -0
- package/src/assets/svg-icons/icon-header-search.svg +4 -4
- package/src/assets/svg-icons/icon-locale.svg +3 -0
- package/src/assets/svg-icons/icon-log-off.svg +3 -0
- package/src/assets/svg-icons/icon-message.svg +3 -0
- package/src/assets/svg-icons/icon-moon.svg +3 -3
- package/src/assets/svg-icons/icon-outlink.svg +3 -0
- package/src/assets/svg-icons/icon-overview.svg +3 -0
- package/src/assets/svg-icons/icon-setting.svg +3 -0
- package/src/assets/svg-icons/icon-sun.svg +3 -3
- package/src/components/OBanner.vue +390 -390
- package/src/components/OCookieNotice.vue +423 -423
- package/src/components/OFooter.vue +566 -0
- package/src/components/OHeader.vue +97 -0
- package/src/components/OHeaderMoblie.vue +149 -0
- package/src/components/OHeaderSearch.vue +601 -601
- package/src/components/OHeaderUser.vue +304 -0
- package/src/components/OPlusConfigProvider.vue +32 -32
- package/src/components/OSection.vue +178 -178
- package/src/components/OSourceCode.vue +153 -0
- package/src/components/OThemeSwitcher.vue +108 -108
- package/src/components/common/AppAvatar.vue +83 -0
- package/src/components/common/ClientOnlyWrapper.ts +21 -21
- package/src/components/common/ContentWrapper.vue +85 -85
- package/src/components/common/HeaderEulerNav.vue +1118 -0
- package/src/components/common/HeaderNavMoblie.vue +344 -0
- package/src/components/common/HeaderUbmcNav.vue +597 -0
- package/src/components/element-plus/OElCookieNotice.vue +412 -412
- package/src/components/element-plus/index.ts +3 -3
- package/src/components/events/OEventsApply.vue +487 -0
- package/src/components/events/OEventsCalendar.vue +613 -0
- package/src/components/events/OEventsList.vue +402 -0
- package/src/components/events/config.ts +47 -0
- package/src/components/events/index.ts +23 -0
- package/src/components/events/npmcachae/_cacache/content-v2/sha512/2c/4f/a4140bfbf374a43f7dfe71880c051f79149cd259fb1a154fb692802c7489ef2317b737e7e690a627714ba19317971f29051b3798c246297b425a626a5b7a +1 -0
- package/src/components/events/npmcachae/_cacache/index-v5/8e/86/70dc69f1b1592fe14da10d2516ddfaa609af0cd9054a6ebde664acc6ab12 +2 -0
- package/src/components/events/npmcachae/_logs/2026-03-25T09_58_33_134Z-debug-0.log +105 -0
- package/src/components/events/npmcachae/_update-notifier-last-checked +0 -0
- package/src/components/events/types.ts +80 -0
- package/src/components/events/utils.ts +9 -0
- package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/3e/17/1865217b9acb9f4921c53a09b5c76587cd2ab748beb2699ff6cfb1341d73b1aa56ed91ffc5ab2c9c9b3fbe626103b35d9a79ff29ff6b8cbb8d89755fe1a2 +1 -0
- package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/a6/15/47bb7552ec9248079e839a5feecc1742d4de19524fdf041cf581701cf4760a5025106036145e279ba193b07c8fa5b07ae3d75f1b6032f0cb2219115b6167 +1 -0
- package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/d1/4c/133b32e09c97101a27a07cc4432f94e470cff02d120d21babcea77c3f5cd436793516dc1a8e282ee1a568f923c148b1a48f4a43233462a530d35e8b41c67 +1 -0
- package/src/components/meeting/npmcachae/_cacache/index-v5/54/0d/a4909047714a0a7198bb9bd37020992464e47c79a791889919b84d90aab0 +3 -0
- package/src/components/meeting/npmcachae/_cacache/index-v5/8e/2b/21a79778e2ac08cf5663baf83cb35f951995a496007eb2e2f7fba54021a4 +3 -0
- package/src/components/meeting/npmcachae/_cacache/index-v5/eb/a0/b70c8132e5b57a0f1e129b8cc941796420a9c147c0baa680710083740898 +2 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_03_54_955Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_03_57_842Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_00_016Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_02_191Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_04_425Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_06_642Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_08_826Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_36_140Z-debug-0.log +433 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_39_573Z-debug-0.log +433 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_42_134Z-debug-0.log +212 -0
- package/src/components/meeting/npmcachae/_update-notifier-last-checked +0 -0
- package/src/draft/Banner.vue +265 -265
- package/src/draft/ButtonCards.vue +105 -105
- package/src/draft/Feature.vue +133 -133
- package/src/draft/Footer.vue +512 -512
- package/src/draft/HorizontalAnchor.vue +165 -165
- package/src/draft/ItemSwiper.vue +133 -133
- package/src/draft/Logo.vue +141 -141
- package/src/draft/LogoCard.vue +74 -74
- package/src/draft/LogoV2.vue +19 -19
- package/src/draft/MainCard.vue +38 -38
- package/src/draft/MultiCard.vue +94 -94
- package/src/draft/MultiIconCard.vue +73 -73
- package/src/draft/OInfoCard.vue +176 -176
- package/src/draft/Process.vue +81 -81
- package/src/draft/Section.vue +167 -167
- package/src/draft/SingleTabCard.vue +84 -84
- package/src/draft/SliderCard.vue +110 -110
- package/src/env.d.ts +1 -1
- package/src/i18n/en.ts +20 -20
- package/src/i18n/index.ts +42 -42
- package/src/i18n/zh.ts +14 -9
- package/src/index.ts +15 -1
- package/src/npmcachae/_cacache/content-v2/sha512/bd/56/25079ffb18446953f88fc063c3d6eaf7191772851b8477c118f113b920a7f357b67b9006181af58c9f68b0059b899ad0f2c86fe0a6490958d138cb063afd +1 -0
- package/src/npmcachae/_cacache/index-v5/d8/49/af4c6bb8f580edbd7b6e18db381844403e5f689a9849c5ffcdd2dd95d735 +3 -0
- package/src/npmcachae/_logs/2026-03-17T10_53_33_398Z-debug-0.log +156 -0
- package/src/npmcachae/_logs/2026-03-17T10_53_35_464Z-debug-0.log +156 -0
- package/src/npmcachae/_logs/2026-03-17T10_53_37_852Z-debug-0.log +156 -0
- package/src/npmcachae/_update-notifier-last-checked +0 -0
- package/src/shared/provide.ts +6 -6
- package/src/shims-vue-dompurify-html.d.ts +17 -0
- package/src/vue.d.ts +9 -9
- package/tsconfig.json +33 -33
- package/vite.config.ts +102 -101
- package/dist/chunk-index.cjs.js +0 -1
- package/dist/chunk-index.es.js +0 -64
package/src/draft/SliderCard.vue
CHANGED
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { OCarousel, OCarouselItem, OFigure, OLink } from '@opensig/opendesign';
|
|
3
|
-
import { useScreen } from '@/composables/useScreen';
|
|
4
|
-
|
|
5
|
-
const { lePadV } = useScreen();
|
|
6
|
-
|
|
7
|
-
interface CardT {
|
|
8
|
-
title: string;
|
|
9
|
-
content: string;
|
|
10
|
-
cover: string;
|
|
11
|
-
href: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const props = defineProps({
|
|
15
|
-
cards: {
|
|
16
|
-
type: Array as () => CardT[],
|
|
17
|
-
default: () => [],
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<template>
|
|
23
|
-
<div class="wrapper">
|
|
24
|
-
<OCarousel v-if="!lePadV" class="slider-card" indicator-click :loop="true" effect="toggle">
|
|
25
|
-
<OCarouselItem v-for="(card, index) in props.cards" :key="index" class="slider-card-item">
|
|
26
|
-
<OFigure :src="card.cover" :alt="card.title" class="slider-card-cover">
|
|
27
|
-
<div class="card-content">
|
|
28
|
-
<div class="card-title">{{ card.title }}</div>
|
|
29
|
-
<div class="card-description">{{ card.content }}</div>
|
|
30
|
-
<OLink v-if="card.href" :href="card.href" class="card-link"> 了解更多 </OLink>
|
|
31
|
-
</div>
|
|
32
|
-
</OFigure>
|
|
33
|
-
</OCarouselItem>
|
|
34
|
-
</OCarousel>
|
|
35
|
-
<OCarousel v-else class="slider-card" indicator-click :loop="true" effect="toggle">
|
|
36
|
-
<OCarouselItem v-for="(card, index) in props.cards" :key="index" class="slider-card-item">
|
|
37
|
-
<OFigure :src="card.cover" :alt="card.title" class="slider-card-cover">
|
|
38
|
-
<div class="card-content">
|
|
39
|
-
<div class="card-title">{{ card.title }}</div>
|
|
40
|
-
<div class="card-description">{{ card.content }}</div>
|
|
41
|
-
<OLink v-if="card.href" :href="card.href" class="card-link"> 了解更多 </OLink>
|
|
42
|
-
</div>
|
|
43
|
-
</OFigure>
|
|
44
|
-
</OCarouselItem>
|
|
45
|
-
</OCarousel>
|
|
46
|
-
</div>
|
|
47
|
-
</template>
|
|
48
|
-
|
|
49
|
-
<style lang="scss" scoped>
|
|
50
|
-
.slider-card {
|
|
51
|
-
--slide-width: calc(70vw - 36px);
|
|
52
|
-
--slide-gap: 16px;
|
|
53
|
-
--carousel-indicator-offset: -32px;
|
|
54
|
-
height: 360px;
|
|
55
|
-
width: 100%;
|
|
56
|
-
overflow: visible;
|
|
57
|
-
:deep(.the-slider-container) {
|
|
58
|
-
height: 100%;
|
|
59
|
-
overflow: hidden;
|
|
60
|
-
}
|
|
61
|
-
:deep(.o-carousel-indicator-bar) {
|
|
62
|
-
width: 100%;
|
|
63
|
-
&::after {
|
|
64
|
-
border-radius: 6px;
|
|
65
|
-
}
|
|
66
|
-
&::before {
|
|
67
|
-
border-radius: 6px;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
@include respond-to('pc_s') {
|
|
71
|
-
height: 300px;
|
|
72
|
-
}
|
|
73
|
-
@include respond-to('<=laptop') {
|
|
74
|
-
height: 280px;
|
|
75
|
-
}
|
|
76
|
-
@include respond-to('<=pad_v') {
|
|
77
|
-
--slide-width: calc(100vw - 64px);
|
|
78
|
-
width: calc(var(--slide-gap) + var(--slide-width));
|
|
79
|
-
height: 184px;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.slider-card-item {
|
|
84
|
-
height: 100%;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.slider-card-cover {
|
|
88
|
-
width: 100%;
|
|
89
|
-
height: 100%;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.card-content {
|
|
93
|
-
padding: 0 96px;
|
|
94
|
-
display: flex;
|
|
95
|
-
flex-direction: column;
|
|
96
|
-
justify-content: center;
|
|
97
|
-
height: 100%;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.card-title {
|
|
101
|
-
@include h1;
|
|
102
|
-
font-weight: 600;
|
|
103
|
-
color: var(--o-color-info1);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.card-description {
|
|
107
|
-
margin-top: var(--o3-gap-3);
|
|
108
|
-
margin-bottom: var(--o3-gap-7);
|
|
109
|
-
}
|
|
110
|
-
</style>
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { OCarousel, OCarouselItem, OFigure, OLink } from '@opensig/opendesign';
|
|
3
|
+
import { useScreen } from '@/composables/useScreen';
|
|
4
|
+
|
|
5
|
+
const { lePadV } = useScreen();
|
|
6
|
+
|
|
7
|
+
interface CardT {
|
|
8
|
+
title: string;
|
|
9
|
+
content: string;
|
|
10
|
+
cover: string;
|
|
11
|
+
href: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
cards: {
|
|
16
|
+
type: Array as () => CardT[],
|
|
17
|
+
default: () => [],
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<div class="wrapper">
|
|
24
|
+
<OCarousel v-if="!lePadV" class="slider-card" indicator-click :loop="true" effect="toggle">
|
|
25
|
+
<OCarouselItem v-for="(card, index) in props.cards" :key="index" class="slider-card-item">
|
|
26
|
+
<OFigure :src="card.cover" :alt="card.title" class="slider-card-cover">
|
|
27
|
+
<div class="card-content">
|
|
28
|
+
<div class="card-title">{{ card.title }}</div>
|
|
29
|
+
<div class="card-description">{{ card.content }}</div>
|
|
30
|
+
<OLink v-if="card.href" :href="card.href" class="card-link"> 了解更多 </OLink>
|
|
31
|
+
</div>
|
|
32
|
+
</OFigure>
|
|
33
|
+
</OCarouselItem>
|
|
34
|
+
</OCarousel>
|
|
35
|
+
<OCarousel v-else class="slider-card" indicator-click :loop="true" effect="toggle">
|
|
36
|
+
<OCarouselItem v-for="(card, index) in props.cards" :key="index" class="slider-card-item">
|
|
37
|
+
<OFigure :src="card.cover" :alt="card.title" class="slider-card-cover">
|
|
38
|
+
<div class="card-content">
|
|
39
|
+
<div class="card-title">{{ card.title }}</div>
|
|
40
|
+
<div class="card-description">{{ card.content }}</div>
|
|
41
|
+
<OLink v-if="card.href" :href="card.href" class="card-link"> 了解更多 </OLink>
|
|
42
|
+
</div>
|
|
43
|
+
</OFigure>
|
|
44
|
+
</OCarouselItem>
|
|
45
|
+
</OCarousel>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<style lang="scss" scoped>
|
|
50
|
+
.slider-card {
|
|
51
|
+
--slide-width: calc(70vw - 36px);
|
|
52
|
+
--slide-gap: 16px;
|
|
53
|
+
--carousel-indicator-offset: -32px;
|
|
54
|
+
height: 360px;
|
|
55
|
+
width: 100%;
|
|
56
|
+
overflow: visible;
|
|
57
|
+
:deep(.the-slider-container) {
|
|
58
|
+
height: 100%;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
}
|
|
61
|
+
:deep(.o-carousel-indicator-bar) {
|
|
62
|
+
width: 100%;
|
|
63
|
+
&::after {
|
|
64
|
+
border-radius: 6px;
|
|
65
|
+
}
|
|
66
|
+
&::before {
|
|
67
|
+
border-radius: 6px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
@include respond-to('pc_s') {
|
|
71
|
+
height: 300px;
|
|
72
|
+
}
|
|
73
|
+
@include respond-to('<=laptop') {
|
|
74
|
+
height: 280px;
|
|
75
|
+
}
|
|
76
|
+
@include respond-to('<=pad_v') {
|
|
77
|
+
--slide-width: calc(100vw - 64px);
|
|
78
|
+
width: calc(var(--slide-gap) + var(--slide-width));
|
|
79
|
+
height: 184px;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.slider-card-item {
|
|
84
|
+
height: 100%;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.slider-card-cover {
|
|
88
|
+
width: 100%;
|
|
89
|
+
height: 100%;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.card-content {
|
|
93
|
+
padding: 0 96px;
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
height: 100%;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.card-title {
|
|
101
|
+
@include h1;
|
|
102
|
+
font-weight: 600;
|
|
103
|
+
color: var(--o-color-info1);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.card-description {
|
|
107
|
+
margin-top: var(--o3-gap-3);
|
|
108
|
+
margin-bottom: var(--o3-gap-7);
|
|
109
|
+
}
|
|
110
|
+
</style>
|
package/src/env.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
1
|
+
/// <reference types="vite/client" />
|
package/src/i18n/en.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
search: 'Search',
|
|
3
|
-
'search.hot': 'Top search',
|
|
4
|
-
'search.placeholder': 'Please enter the content',
|
|
5
|
-
'search.expandedPlaceholder': 'Please enter the content',
|
|
6
|
-
'search.history': 'History',
|
|
7
|
-
'cookie.title': '{0} Community Respects Your Privacy',
|
|
8
|
-
'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 ',
|
|
9
|
-
'cookie.about': 'About Cookies',
|
|
10
|
-
'cookie.acceptAll': 'Accept All',
|
|
11
|
-
'cookie.rejectAll': 'Reject All',
|
|
12
|
-
'cookie.manage': 'Manage Cookies',
|
|
13
|
-
'cookie.necessaryCookie': 'Strictly Necessary Cookies',
|
|
14
|
-
'cookie.alwaysOn': 'Always active',
|
|
15
|
-
'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.',
|
|
16
|
-
'cookie.analyticalCookie': 'Analytics Cookies',
|
|
17
|
-
'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.',
|
|
18
|
-
'cookie.saveSetting': 'Save Settings',
|
|
19
|
-
'cookie.setting': 'Cookie settings',
|
|
20
|
-
};
|
|
1
|
+
export default {
|
|
2
|
+
search: 'Search',
|
|
3
|
+
'search.hot': 'Top search',
|
|
4
|
+
'search.placeholder': 'Please enter the content',
|
|
5
|
+
'search.expandedPlaceholder': 'Please enter the content',
|
|
6
|
+
'search.history': 'History',
|
|
7
|
+
'cookie.title': '{0} Community Respects Your Privacy',
|
|
8
|
+
'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 ',
|
|
9
|
+
'cookie.about': 'About Cookies',
|
|
10
|
+
'cookie.acceptAll': 'Accept All',
|
|
11
|
+
'cookie.rejectAll': 'Reject All',
|
|
12
|
+
'cookie.manage': 'Manage Cookies',
|
|
13
|
+
'cookie.necessaryCookie': 'Strictly Necessary Cookies',
|
|
14
|
+
'cookie.alwaysOn': 'Always active',
|
|
15
|
+
'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.',
|
|
16
|
+
'cookie.analyticalCookie': 'Analytics Cookies',
|
|
17
|
+
'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.',
|
|
18
|
+
'cookie.saveSetting': 'Save Settings',
|
|
19
|
+
'cookie.setting': 'Cookie settings',
|
|
20
|
+
};
|
package/src/i18n/index.ts
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { computed, inject, getCurrentInstance, ref } from 'vue';
|
|
2
|
-
|
|
3
|
-
import zh from './zh';
|
|
4
|
-
import en from './en';
|
|
5
|
-
import { configProviderInjectKey } from '@/shared/provide';
|
|
6
|
-
import { isString, isUndefined } from '@opensig/opendesign';
|
|
7
|
-
|
|
8
|
-
const i18nLangs = ref({
|
|
9
|
-
zh,
|
|
10
|
-
en,
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
export function useI18n() {
|
|
14
|
-
const instance = getCurrentInstance();
|
|
15
|
-
const configProvider = instance ? inject(configProviderInjectKey) : null;
|
|
16
|
-
const locale = computed(() => {
|
|
17
|
-
return configProvider?.locale || 'zh';
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
const transform = (key: string, ...args: any[]): string => {
|
|
21
|
-
const lang = i18nLangs.value[locale.value];
|
|
22
|
-
const value = lang[key as keyof typeof lang];
|
|
23
|
-
|
|
24
|
-
// 处理变量替换
|
|
25
|
-
if (args.length > 0 && isString(value)) {
|
|
26
|
-
return value.replace(/{(\d+)}/g, (match, index) => {
|
|
27
|
-
return args[index] ?? match;
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (isUndefined(value)) {
|
|
32
|
-
console.warn(`Cannot translate the value of keypath '${key}'`);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return value;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
return {
|
|
39
|
-
locale,
|
|
40
|
-
t: transform,
|
|
41
|
-
};
|
|
42
|
-
}
|
|
1
|
+
import { computed, inject, getCurrentInstance, ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
import zh from './zh';
|
|
4
|
+
import en from './en';
|
|
5
|
+
import { configProviderInjectKey } from '@/shared/provide';
|
|
6
|
+
import { isString, isUndefined } from '@opensig/opendesign';
|
|
7
|
+
|
|
8
|
+
const i18nLangs = ref({
|
|
9
|
+
zh,
|
|
10
|
+
en,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export function useI18n() {
|
|
14
|
+
const instance = getCurrentInstance();
|
|
15
|
+
const configProvider = instance ? inject(configProviderInjectKey) : null;
|
|
16
|
+
const locale = computed(() => {
|
|
17
|
+
return configProvider?.locale || 'zh';
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const transform = (key: string, ...args: any[]): string => {
|
|
21
|
+
const lang = i18nLangs.value[locale.value];
|
|
22
|
+
const value = lang[key as keyof typeof lang];
|
|
23
|
+
|
|
24
|
+
// 处理变量替换
|
|
25
|
+
if (args.length > 0 && isString(value)) {
|
|
26
|
+
return value.replace(/{(\d+)}/g, (match, index) => {
|
|
27
|
+
return args[index] ?? match;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (isUndefined(value)) {
|
|
32
|
+
console.warn(`Cannot translate the value of keypath '${key}'`);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return value;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
locale,
|
|
40
|
+
t: transform,
|
|
41
|
+
};
|
|
42
|
+
}
|
package/src/i18n/zh.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
search: '搜索',
|
|
3
|
-
'search.hot': '热门搜索',
|
|
4
|
-
'search.placeholder': '搜索',
|
|
5
|
-
'search.expandedPlaceholder': '请输入搜索内容',
|
|
6
|
-
'search.history': '历史搜索',
|
|
7
|
-
'cookie.desc': '我们使用cookie来确保您的高速浏览体验。继续浏览本站,即表示您同意我们使用cookie。',
|
|
8
|
-
'cookie.about': '查看详情',
|
|
9
|
-
|
|
1
|
+
export default {
|
|
2
|
+
search: '搜索',
|
|
3
|
+
'search.hot': '热门搜索',
|
|
4
|
+
'search.placeholder': '搜索',
|
|
5
|
+
'search.expandedPlaceholder': '请输入搜索内容',
|
|
6
|
+
'search.history': '历史搜索',
|
|
7
|
+
'cookie.desc': '我们使用cookie来确保您的高速浏览体验。继续浏览本站,即表示您同意我们使用cookie。',
|
|
8
|
+
'cookie.about': '查看详情',
|
|
9
|
+
'events.status': '活动状态',
|
|
10
|
+
'events.statusAll': '全部',
|
|
11
|
+
'events.statusIng': '进行中',
|
|
12
|
+
'events.statusFinish': '已结束',
|
|
13
|
+
'events.searchPlaceholder': '搜索活动名称、地点',
|
|
14
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -3,23 +3,37 @@
|
|
|
3
3
|
|
|
4
4
|
import OBanner from './components/OBanner.vue';
|
|
5
5
|
import OCookieNotice from './components/OCookieNotice.vue';
|
|
6
|
+
import OFooter from './components/OFooter.vue';
|
|
7
|
+
import OHeader from './components/OHeader.vue';
|
|
8
|
+
import OHeaderMoblie from './components/OHeaderMoblie.vue';
|
|
6
9
|
import OHeaderSearch from './components/OHeaderSearch.vue';
|
|
10
|
+
import OHeaderUser from './components/OHeaderUser.vue';
|
|
7
11
|
import OPlusConfigProvider from './components/OPlusConfigProvider.vue';
|
|
8
12
|
import OSection from './components/OSection.vue';
|
|
13
|
+
import OSourceCode from './components/OSourceCode.vue';
|
|
9
14
|
import OThemeSwitcher from './components/OThemeSwitcher.vue';
|
|
10
15
|
|
|
11
16
|
// 导出组件
|
|
12
17
|
const components = {
|
|
13
18
|
OBanner,
|
|
14
19
|
OCookieNotice,
|
|
20
|
+
OFooter,
|
|
21
|
+
OHeader,
|
|
22
|
+
OHeaderMoblie,
|
|
15
23
|
OHeaderSearch,
|
|
24
|
+
OHeaderUser,
|
|
16
25
|
OPlusConfigProvider,
|
|
17
26
|
OSection,
|
|
27
|
+
OSourceCode,
|
|
18
28
|
OThemeSwitcher
|
|
19
29
|
};
|
|
20
30
|
|
|
21
31
|
// 导出单个组件
|
|
22
|
-
export { OBanner, OCookieNotice, OHeaderSearch, OPlusConfigProvider, OSection, OThemeSwitcher };
|
|
32
|
+
export { OBanner, OCookieNotice, OFooter, OHeader, OHeaderMoblie, OHeaderSearch, OHeaderUser, OPlusConfigProvider, OSection, OSourceCode, OThemeSwitcher };
|
|
33
|
+
|
|
34
|
+
// 重新导出子目录中的组件
|
|
35
|
+
export * from './components/element-plus';
|
|
36
|
+
export * from './components/events';
|
|
23
37
|
|
|
24
38
|
// 默认导出(用于Vue插件安装)
|
|
25
39
|
export default {
|