@opendesign-plus-test/components 0.0.1-rc.56 → 0.0.1-rc.57

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.
Files changed (41) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -1
  2. package/dist/chunk-OElCookieNotice.es.js +72 -69
  3. package/dist/components/OHeaderSearch.vue.d.ts +22 -22
  4. package/dist/components/OHeaderUser.vue.d.ts +1 -1
  5. package/dist/components/OLanguageSwitcher.vue.d.ts +49 -0
  6. package/dist/components/OThemeSwitcher.vue.d.ts +1 -1
  7. package/dist/components/activity/OActivityMyCalendar.vue.d.ts +4 -4
  8. package/dist/components/activity/index.d.ts +2 -2
  9. package/dist/components/banner/OBanner.vue.d.ts +13 -0
  10. package/dist/components/banner/OBannerContent.vue.d.ts +7 -0
  11. package/dist/components/banner/index.d.ts +68 -0
  12. package/dist/components/banner/types.d.ts +31 -0
  13. package/dist/components/meeting/OMeetingCalendar.vue.d.ts +2 -2
  14. package/dist/components/meeting/OMeetingMyCalendar.vue.d.ts +4 -4
  15. package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +1 -1
  16. package/dist/components/meeting/index.d.ts +3 -3
  17. package/dist/components/search/OSearchInput.vue.d.ts +22 -22
  18. package/dist/components/search/index.d.ts +11 -11
  19. package/dist/components/search/internal/SearchImageInput.vue.d.ts +17 -17
  20. package/dist/components.cjs.js +36 -36
  21. package/dist/components.css +1 -1
  22. package/dist/components.es.js +6702 -6526
  23. package/dist/index.d.ts +3 -2
  24. package/package.json +1 -1
  25. package/scripts/generate-components-index.js +1 -1
  26. package/src/components/OLanguageSwitcher.vue +211 -0
  27. package/src/components/OPlusConfigProvider.vue +2 -2
  28. package/src/components/banner/OBanner.vue +288 -0
  29. package/src/components/banner/OBannerContent.vue +175 -0
  30. package/src/components/banner/index.ts +18 -0
  31. package/src/components/banner/types.ts +39 -0
  32. package/src/components/header/OHeader.vue +1 -1
  33. package/src/components/meeting/OMeetingCalendar.vue +4 -4
  34. package/src/components/meeting/OMeetingForm.vue +10 -2
  35. package/src/components/meeting/components/OMeetingCalendarList.vue +2 -2
  36. package/src/components/meeting/components/OMeetingDetail.vue +17 -3
  37. package/src/i18n/en.ts +4 -2
  38. package/src/i18n/zh.ts +4 -3
  39. package/src/index.ts +4 -3
  40. package/dist/components/OBanner.vue.d.ts +0 -11
  41. package/src/components/OBanner.vue +0 -398
@@ -1,398 +0,0 @@
1
- <script setup lang="ts">
2
- import { OButton, OCarousel, OCarouselItem, OFigure } from '@opensig/opendesign';
3
- import { computed, ref } from 'vue';
4
-
5
- import { useScreen, useTheme } from '@opendesign-plus/composables';
6
- import ContentWrapper from './common/ContentWrapper.vue';
7
-
8
- const props = withDefaults(defineProps<{
9
- options: any;
10
- size: string;
11
- contentJustifyCenter: boolean;
12
- }>(), {
13
- options: undefined,
14
- size: 'large',
15
- contentJustifyCenter: false,
16
- });
17
-
18
- const { isLight } = useTheme('opendesignplus', document.domain || 'localhost');
19
- const { isPhone } = useScreen();
20
-
21
- const bannerInfo = computed(() => props.options);
22
-
23
- // 主题切换
24
- const theme = ref('');
25
- const onBeforeChange = (idx: number) => {
26
- setTimeout(() => {
27
- theme.value = bannerInfo.value[idx].bg_theme ?? 'light';
28
- }, 100);
29
- };
30
-
31
- // banner跳转
32
- const onClick = (href: string, hasBtn: boolean | undefined) => {
33
- if (href && !hasBtn) {
34
- window.open(href);
35
- }
36
- };
37
- </script>
38
-
39
- <template>
40
- <div :class="['home-banner', size]">
41
- <div v-if="size === 'tiny'">
42
- {{ bannerInfo[1].title }}
43
- </div>
44
-
45
- <OCarousel
46
- v-else-if="!isPhone"
47
- class="banner-carousel"
48
- effect="toggle"
49
- active-class="current-slide"
50
- indicator-click
51
- :auto-play="true"
52
- :data-o-theme="theme"
53
- @before-change="onBeforeChange"
54
- >
55
- <OCarouselItem v-for="(info, index) in bannerInfo" :key="index" class="banner-item" :class="`banner-item${index}`">
56
- <OFigure
57
- class="banner-bg"
58
- :src="info.bg"
59
- :class="{
60
- 'with-sticky-bg': info.withStickyBg,
61
- 'in-dark': !isLight,
62
- 'cursor-pointer': info.href && !info.btn,
63
- }"
64
- :style="{
65
- '--pad-offset': info.pad_offset,
66
- }"
67
- @click="onClick(info.href, info.btn)"
68
- >
69
- <ContentWrapper class="banner-wrapper" :class="['banner-wrapper', contentJustifyCenter ? 'content-center' : '']">
70
- <div class="banner-content">
71
- <img v-if="!isPhone && info.attach" :src="info.attach" class="banner-attach" />
72
-
73
- <!-- 标题 -->
74
- <div class="banner-title" v-if="info.title">{{ info.title }}</div>
75
- <!-- 副标题 -->
76
- <div class="banner-subtitle" v-if="info.subtitle">{{ info.subtitle }}</div>
77
- <div
78
- class="banner-text"
79
- v-if="info.bg_text"
80
- :style="{
81
- backgroundImage: `url(${info.bg_text})`,
82
- '--pc-width': info.pc_text_width,
83
- '--pc-height': info.pc_text_height,
84
- '--pad-width': info.pad_text_width,
85
- '--pad-height': info.pad_text_height,
86
- }"
87
- ></div>
88
- <!-- 操作按钮 -->
89
- <div v-if="info.btn" class="banner-opts">
90
- <OButton :href="info.href" target="_blank" variant="solid" color="primary" :size="size">
91
- {{ info.btn }}
92
- </OButton>
93
- </div>
94
- </div>
95
- </ContentWrapper>
96
- </OFigure>
97
- </OCarouselItem>
98
- </OCarousel>
99
-
100
- <OCarousel
101
- v-else-if="isPhone"
102
- class="banner-carousel"
103
- effect="gallery"
104
- indicator-click
105
- :data-o-theme="theme"
106
- arrow="never"
107
- :auto-play="true"
108
- @before-change="onBeforeChange"
109
- >
110
- <OCarouselItem
111
- v-for="(info, index) in bannerInfo"
112
- class="banner-item"
113
- :class="`banner-item${index}`"
114
- :key="index">
115
- <ContentWrapper class="banner-wrapper">
116
- <OFigure class="banner-bg" :src="info.bg" @click="onClick(info.href)" />
117
- </ContentWrapper>
118
- </OCarouselItem>
119
- </OCarousel>
120
- </div>
121
- </template>
122
-
123
- <style lang="scss" scoped>
124
- .home-banner {
125
- overflow: hidden;
126
- position: relative;
127
-
128
- &.tiny {
129
- @include display2;
130
- font-weight: 500;
131
- margin: var(--o-gap-8) 0;
132
- color: var(--o-color-info1);
133
- }
134
-
135
- .banner-title {
136
- color: var(--o-color-info1);
137
- font-weight: 500;
138
- font-size: 48px; // 基础字体大小
139
- margin-bottom: 8px;
140
- }
141
-
142
- .banner-subtitle {
143
- color: var(--o-color-info1);
144
- margin-top: 8px;
145
- font-size: 16px;
146
- }
147
-
148
- .banner-text {
149
- height: var(--pc-height);
150
- width: var(--pc-width);
151
- background-size: contain;
152
- background-repeat: no-repeat;
153
-
154
- @include respond('pad') {
155
- height: var(--pad-height);
156
- width: var(--pad-width);
157
- }
158
- }
159
-
160
- &.large {
161
- --banner-height: 460px;
162
- height: var(--banner-height);
163
-
164
- .banner-title {
165
- @include display1;
166
- }
167
-
168
- .banner-subtitle {
169
- @include h4;
170
- }
171
-
172
- @include respond('laptop-pc_s') {
173
- --banner-height: 400px;
174
- }
175
-
176
- @include respond('pad_h') {
177
- --banner-height: 360px;
178
- }
179
-
180
- @include respond('<=pad_v') {
181
- --banner-height: 184px;
182
- }
183
- }
184
-
185
- &.medium {
186
- --banner-height: 360px;
187
- height: var(--banner-height);
188
-
189
- .banner-title {
190
- @include display2;
191
- }
192
-
193
- .banner-subtitle {
194
- @include text2;
195
- }
196
-
197
- @include respond('laptop-pc_s') {
198
- --banner-height: 280px;
199
- }
200
-
201
- @include respond('pad_h') {
202
- --banner-height: 220px;
203
- }
204
-
205
- @include respond('<=pad_v') {
206
- --banner-height: 120px;
207
- }
208
-
209
- .banner-text {
210
- --pc-height: 100px !important;
211
- --pc-width: 500px !important;
212
-
213
- @include respond('pad') {
214
- --pc-height: 60px !important;
215
- --pc-width: 300px !important;
216
- }
217
- }
218
- }
219
-
220
- &.small {
221
- --banner-height: 280px;
222
- height: var(--banner-height);
223
-
224
- .banner-title {
225
- @include display2;
226
- }
227
-
228
- .banner-subtitle {
229
- @include text2;
230
- }
231
-
232
- @include respond('laptop-pc_s') {
233
- --banner-height: 220px;
234
- }
235
-
236
- @include respond('pad_h') {
237
- --banner-height: 180px;
238
- }
239
-
240
- @include respond('<=pad_v') {
241
- display: none;
242
- }
243
-
244
- .banner-text {
245
- --pc-height: 80px !important;
246
- --pc-width: 400px !important;
247
-
248
- @include respond('pad') {
249
- --pc-height: 50px !important;
250
- --pc-width: 250px !important;
251
- }
252
- }
253
- }
254
-
255
- :deep(.o-btn) {
256
- border-radius: var(--btn-height);
257
- }
258
- }
259
-
260
- .banner-carousel {
261
- width: 100%;
262
- height: 100%;
263
- @include respond('>pad_v') {
264
- --carousel-indicator-offset: 53px;
265
- }
266
-
267
- @include respond('<=pad_v') {
268
- --carousel-indicator-offset: 1px;
269
- }
270
-
271
- :deep(.o-carousel-indicator-bar) {
272
- height: 24px;
273
- }
274
- }
275
-
276
- .banner-item {
277
- width: 100%;
278
- height: 100%;
279
- }
280
-
281
- .banner-bg {
282
- width: 100%;
283
- height: 100%;
284
-
285
- :deep(.o-figure-img) {
286
- width: 100%;
287
- height: 100%;
288
- }
289
-
290
- @include respond('pad') {
291
- :deep(.o-figure-img) {
292
- transition: object-position 0.3s ease;
293
- object-position: var(--pad-offset);
294
- }
295
- }
296
-
297
- @include respond('phone') {
298
- --figure-radius: 4px;
299
- }
300
- }
301
-
302
- .banner-wrapper {
303
- height: 100%;
304
-
305
- &.content-center {
306
- display: flex;
307
- justify-content: center;
308
-
309
- & .banner-content {
310
- align-items: center;
311
- }
312
- }
313
- }
314
-
315
- .banner-content {
316
- height: 100%;
317
- display: inline-flex;
318
- flex-direction: column;
319
- justify-content: center;
320
- position: relative;
321
- }
322
-
323
- .banner-opts {
324
- margin-top: 24px;
325
- --d: 20px;
326
- }
327
-
328
- @keyframes fade-up {
329
- from {
330
- transform: translateY(var(--d));
331
- opacity: 0;
332
- }
333
- to {
334
- transform: translateY(0);
335
- opacity: 1;
336
- }
337
- }
338
-
339
- .current-slide {
340
- .banner-title {
341
- animation: fade-up 400ms ease-in;
342
- }
343
- .banner-subtitle {
344
- animation: fade-up 400ms ease-in;
345
- }
346
- .banner-text {
347
- animation: fade-up 400ms ease-in;
348
- }
349
- .banner-opts {
350
- animation: fade-up 400ms ease-in;
351
- }
352
- }
353
-
354
- .in-dark.with-sticky-bg {
355
- :deep(.o-figure-img) {
356
- @include img-in-dark;
357
- }
358
- }
359
- .cursor-pointer {
360
- cursor: pointer;
361
- }
362
- </style>
363
-
364
- <style lang="scss" scoped>
365
- // 定制修改item1
366
- .banner-item0 {
367
- .banner-attach {
368
- height: 120px;
369
-
370
- @include respond('pad') {
371
- height: 80px;
372
- }
373
- }
374
- }
375
-
376
- .banner-item1 {
377
- .banner-attach {
378
- height: 156px;
379
-
380
- @include respond('pad') {
381
- height: 120px;
382
- }
383
- }
384
- }
385
-
386
- // 定制修改item2
387
- .banner-item2 {
388
- .banner-content {
389
- width: 100%;
390
- justify-content: center;
391
- }
392
- .banner-attach {
393
- height: 38%;
394
- margin-top: -60px;
395
- object-fit: contain;
396
- }
397
- }
398
- </style>