@opendesign-plus-test/components 0.0.1-rc.42 → 0.0.1-rc.45
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 -1
- package/dist/chunk-OElCookieNotice.es.js +132 -112
- package/dist/components/OHeaderSearch.vue.d.ts +824 -506
- package/dist/components/OSourceCode.vue.d.ts +4 -6
- package/dist/components/activity/OActivityApproval.vue.d.ts +6 -10
- package/dist/components/activity/OActivityForm.vue.d.ts +3 -5
- package/dist/components/activity/OMyActivityCalendar.vue.d.ts +100 -46
- package/dist/components/activity/index.d.ts +56 -33
- package/dist/components/activity/types.d.ts +8 -1
- package/dist/components/events/config.d.ts +5 -18
- package/dist/components/events/types.d.ts +4 -1
- package/dist/components/header/OHeaderMobile.vue.d.ts +18 -11
- package/dist/components/header/components/HeaderNavMobile.vue.d.ts +4 -1
- package/dist/components/header/index.d.ts +12 -5
- package/dist/components/header/types.d.ts +4 -0
- package/dist/components/meeting/OMeetingCalendar.vue.d.ts +8 -12
- package/dist/components/meeting/OMeetingForm.vue.d.ts +3 -5
- package/dist/components/meeting/OMeetingPlayback.vue.d.ts +45 -0
- package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +100 -46
- package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +1 -1
- package/dist/components/meeting/index.d.ts +817 -0
- package/dist/components/meeting/types.d.ts +82 -17
- package/dist/components/meeting/utils.d.ts +1 -1
- package/dist/components/search/OSearchInput.vue.d.ts +1003 -0
- package/dist/components/search/composables/useImageSearch.d.ts +48 -0
- package/dist/components/search/composables/useKeywordHighlight.d.ts +2 -0
- package/dist/components/search/composables/useSearchHistory.d.ts +14 -0
- package/dist/components/search/index.d.ts +590 -0
- package/dist/components/search/internal/HighlightText.vue.d.ts +9 -0
- package/dist/components/search/internal/SearchImageInput.vue.d.ts +716 -0
- package/dist/components/search/internal/SearchPanel.vue.d.ts +100 -0
- package/dist/components/search/types.d.ts +20 -0
- package/dist/components.cjs.js +43 -43
- package/dist/components.css +1 -1
- package/dist/components.es.js +11681 -10636
- package/dist/index.d.ts +1 -0
- package/package.json +3 -3
- package/src/assets/svg-icons/icon-delete-hover.svg +4 -0
- package/src/assets/svg-icons/icon-delete.svg +5 -1
- package/src/assets/svg-icons/icon-image-close.svg +4 -0
- package/src/assets/svg-icons/icon-image-upload.svg +3 -0
- package/src/assets/svg-icons/icon-image-zoomin.svg +3 -0
- package/src/assets/svg-icons/icon-refresh.svg +3 -0
- package/src/components/OBanner.vue +18 -18
- package/src/components/OCookieNotice.vue +21 -21
- package/src/components/OFooter.vue +18 -17
- package/src/components/OHeaderSearch.vue +402 -420
- package/src/components/OHeaderUser.vue +3 -2
- package/src/components/OSection.vue +4 -4
- package/src/components/OSourceCode.vue +8 -10
- package/src/components/activity/OActivityApproval.vue +32 -32
- package/src/components/activity/OActivityForm.vue +5 -5
- package/src/components/activity/OMyActivityCalendar.vue +66 -50
- package/src/components/activity/config.ts +1 -1
- package/src/components/activity/types.ts +8 -1
- package/src/components/common/ContentWrapper.vue +3 -3
- package/src/components/common/MoreText.vue +1 -1
- package/src/components/common/ThFilter.vue +7 -7
- package/src/components/element-plus/OElCookieNotice.vue +27 -27
- package/src/components/events/OEventsApply.vue +44 -44
- package/src/components/events/OEventsCalendar.vue +14 -14
- package/src/components/events/OEventsList.vue +53 -26
- package/src/components/events/config.ts +1 -1
- package/src/components/events/types.ts +4 -1
- package/src/components/header/OHeader.vue +2 -2
- package/src/components/header/OHeaderMobile.vue +8 -1
- package/src/components/header/components/HeaderContent.vue +67 -63
- package/src/components/header/components/HeaderNav.vue +4 -4
- package/src/components/header/components/HeaderNavMobile.vue +8 -5
- package/src/components/header/types.ts +4 -0
- package/src/components/meeting/OMeetingCalendar.vue +66 -54
- package/src/components/meeting/OMeetingForm.vue +70 -51
- package/src/components/meeting/OMeetingPlayback.vue +8 -8
- package/src/components/meeting/OMyMeetingCalendar.vue +56 -45
- package/src/components/meeting/OSigMeetingCalendar.vue +31 -28
- package/src/components/meeting/components/OMeetingCalendarList.vue +31 -26
- package/src/components/meeting/components/OMeetingCalendarSelector.vue +10 -6
- package/src/components/meeting/components/OMeetingDetail.vue +32 -18
- package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +1 -1
- package/src/components/meeting/components/OMeetingPlaybackVideo.vue +12 -12
- package/src/components/meeting/components/OSigMeetingAside.vue +8 -9
- package/src/components/meeting/types.ts +88 -17
- package/src/components/search/OSearchInput.vue +463 -0
- package/src/components/search/composables/useImageSearch.ts +157 -0
- package/src/components/search/composables/useKeywordHighlight.ts +30 -0
- package/src/components/search/composables/useSearchHistory.ts +75 -0
- package/src/components/search/index.ts +23 -0
- package/src/components/search/internal/HighlightText.vue +37 -0
- package/src/components/search/internal/SearchImageInput.vue +488 -0
- package/src/components/search/internal/SearchPanel.vue +430 -0
- package/src/components/search/types.ts +25 -0
- package/src/draft/Banner.vue +6 -6
- package/src/draft/ButtonCards.vue +1 -1
- package/src/draft/Feature.vue +6 -6
- package/src/draft/Footer.vue +29 -22
- package/src/draft/HorizontalAnchor.vue +4 -4
- package/src/draft/ItemSwiper.vue +2 -2
- package/src/draft/Logo.vue +3 -3
- package/src/draft/LogoCard.vue +2 -2
- package/src/draft/MultiCard.vue +1 -1
- package/src/draft/MultiIconCard.vue +1 -1
- package/src/draft/OInfoCard.vue +4 -4
- package/src/draft/Section.vue +4 -4
- package/src/draft/SingleTabCard.vue +1 -1
- package/src/draft/SliderCard.vue +4 -3
- package/src/i18n/en.ts +10 -0
- package/src/i18n/zh.ts +10 -0
- package/src/index.ts +1 -0
- package/vite.config.ts +4 -3
|
@@ -17,6 +17,7 @@ import { useI18n } from '@/i18n';
|
|
|
17
17
|
|
|
18
18
|
import { CITY_MAP, DEFAULT_COVER } from './config.ts';
|
|
19
19
|
import { useScreen } from '@opendesign-plus/composables';
|
|
20
|
+
import dayjs from 'dayjs';
|
|
20
21
|
|
|
21
22
|
const { t } = useI18n();
|
|
22
23
|
const { lePadV } = useScreen();
|
|
@@ -84,12 +85,30 @@ const changeKeyword = () => {
|
|
|
84
85
|
const list = computed(() => {
|
|
85
86
|
return props.data
|
|
86
87
|
.map((v: EventsCardItemT) => {
|
|
88
|
+
let startDate = v.startDate;
|
|
89
|
+
let endDate = v.endDate;
|
|
90
|
+
let dateStr = dayjs(v.date).format('YYYY/MM/DD');
|
|
91
|
+
if (startDate && endDate) {
|
|
92
|
+
const yearFirstDay = dayjs().format('YYYY-01-01');
|
|
93
|
+
if (compareDate(yearFirstDay, startDate)) {
|
|
94
|
+
startDate = yearFirstDay;
|
|
95
|
+
}
|
|
96
|
+
const yearLastDay = dayjs().format('YYYY-12-31');
|
|
97
|
+
if (compareDate(endDate, yearLastDay)) {
|
|
98
|
+
endDate = yearLastDay;
|
|
99
|
+
}
|
|
100
|
+
dateStr = `${ dayjs(startDate).format('YYYY/MM/DD') }-${ dayjs(endDate).format('MM/DD') }`;
|
|
101
|
+
}
|
|
87
102
|
return {
|
|
88
103
|
...v,
|
|
89
|
-
|
|
104
|
+
startDate,
|
|
105
|
+
endDate,
|
|
106
|
+
dateStr,
|
|
107
|
+
status: !compareDate(new Date(), v.date || v.endDate as string) ? EventsStatusT.ING : EventsStatusT.FINISH,
|
|
108
|
+
|
|
90
109
|
};
|
|
91
110
|
})
|
|
92
|
-
.sort((a: EventsCardItemT, b: EventsCardItemT) => (compareDate(a.date as string, b.date as string) ? -1 : 1))
|
|
111
|
+
.sort((a: EventsCardItemT, b: EventsCardItemT) => (compareDate(a.date || a.endDate as string, b.date || b.endDate as string) ? -1 : 1))
|
|
93
112
|
.map((v) => {
|
|
94
113
|
const city = v.city?.replace('市', '')?.replace('中国', '')?.replaceAll(' ', '');
|
|
95
114
|
let cover = null;
|
|
@@ -143,7 +162,7 @@ const list = computed(() => {
|
|
|
143
162
|
</OTag>
|
|
144
163
|
<div class="event-name">{{ item.name }}</div>
|
|
145
164
|
<div class="event-desc">
|
|
146
|
-
<div class="event-date">{{ item.
|
|
165
|
+
<div class="event-date">{{ item.dateStr }}</div>
|
|
147
166
|
<ODivider direction="v" />
|
|
148
167
|
<div class="event-location" v-if="item.city">{{ item.city }}</div>
|
|
149
168
|
</div>
|
|
@@ -177,7 +196,7 @@ const list = computed(() => {
|
|
|
177
196
|
padding: var(--o-gap-5) var(--o-gap-6);
|
|
178
197
|
gap: var(--o-gap-3) var(--o-gap-2);
|
|
179
198
|
@include text1;
|
|
180
|
-
@include respond
|
|
199
|
+
@include respond('<=pad_v') {
|
|
181
200
|
padding: var(--o-gap-3) var(--o-gap-4);
|
|
182
201
|
}
|
|
183
202
|
|
|
@@ -191,10 +210,10 @@ const list = computed(() => {
|
|
|
191
210
|
flex-shrink: 0;
|
|
192
211
|
margin-right: var(--o-gap-5);
|
|
193
212
|
font-weight: 500;
|
|
194
|
-
@include respond
|
|
213
|
+
@include respond('pad_v') {
|
|
195
214
|
margin-right: var(--o-gap-4);
|
|
196
215
|
}
|
|
197
|
-
@include respond
|
|
216
|
+
@include respond('phone') {
|
|
198
217
|
margin-right: var(--o-gap-4);
|
|
199
218
|
}
|
|
200
219
|
}
|
|
@@ -217,7 +236,7 @@ const list = computed(() => {
|
|
|
217
236
|
.o-input {
|
|
218
237
|
.o-icon-search {
|
|
219
238
|
font-size: 24px;
|
|
220
|
-
@include respond
|
|
239
|
+
@include respond('<=pad_v') {
|
|
221
240
|
font-size: 16px;
|
|
222
241
|
}
|
|
223
242
|
}
|
|
@@ -228,15 +247,15 @@ const list = computed(() => {
|
|
|
228
247
|
grid-template-columns: repeat(4, 1fr);
|
|
229
248
|
gap: var(--o-gap-6);
|
|
230
249
|
margin-top: var(--o-gap-6);
|
|
231
|
-
@include respond
|
|
250
|
+
@include respond('<=pad_v') {
|
|
232
251
|
grid-template-columns: repeat(1, 1fr);
|
|
233
252
|
container-type: inline-size;
|
|
234
253
|
}
|
|
235
|
-
@include respond
|
|
254
|
+
@include respond('pad_v') {
|
|
236
255
|
margin-top: var(--o-gap-4);
|
|
237
256
|
gap: var(--o-gap-3);
|
|
238
257
|
}
|
|
239
|
-
@include respond
|
|
258
|
+
@include respond('phone') {
|
|
240
259
|
margin-top: var(--o-gap-4);
|
|
241
260
|
gap: var(--o-gap-3);
|
|
242
261
|
}
|
|
@@ -244,23 +263,22 @@ const list = computed(() => {
|
|
|
244
263
|
.o-card {
|
|
245
264
|
aspect-ratio: 1 / 1;
|
|
246
265
|
position: relative;
|
|
247
|
-
@include respond
|
|
266
|
+
@include respond('<=pad_v') {
|
|
248
267
|
aspect-ratio: 1 / 0.4;
|
|
249
268
|
}
|
|
250
269
|
@container (max-width: 300px) {
|
|
251
270
|
height: 140px;
|
|
271
|
+
width: 100%;
|
|
252
272
|
aspect-ratio: unset;
|
|
253
273
|
}
|
|
254
274
|
|
|
255
275
|
.o-card-cover {
|
|
256
276
|
padding: 0;
|
|
277
|
+
height: 100%;
|
|
257
278
|
}
|
|
258
279
|
|
|
259
|
-
.o-card-
|
|
260
|
-
|
|
261
|
-
flex-direction: column;
|
|
262
|
-
align-items: center;
|
|
263
|
-
justify-content: center;
|
|
280
|
+
.o-card-main {
|
|
281
|
+
padding: 0;
|
|
264
282
|
position: absolute;
|
|
265
283
|
overflow: hidden; // 防止内容溢出
|
|
266
284
|
box-sizing: border-box; // 确保 padding 计入总尺寸
|
|
@@ -268,16 +286,25 @@ const list = computed(() => {
|
|
|
268
286
|
top: 0;
|
|
269
287
|
width: 100%;
|
|
270
288
|
height: 100%;
|
|
289
|
+
}
|
|
290
|
+
.o-card-content {
|
|
291
|
+
position: absolute;
|
|
292
|
+
top: 0;
|
|
293
|
+
left: 0;
|
|
294
|
+
right: 0;
|
|
295
|
+
bottom: 0;
|
|
296
|
+
display: flex;
|
|
297
|
+
flex-direction: column;
|
|
298
|
+
align-items: center;
|
|
299
|
+
justify-content: center;
|
|
271
300
|
color: var(--o-color-white);
|
|
272
301
|
text-align: center;
|
|
273
|
-
cursor: pointer;
|
|
274
302
|
padding: var(--o-gap-6);
|
|
275
|
-
z-index: 10;
|
|
276
303
|
|
|
277
|
-
@include respond
|
|
304
|
+
@include respond('pad_v') {
|
|
278
305
|
margin-top: var(--o-gap-4);
|
|
279
306
|
}
|
|
280
|
-
@include respond
|
|
307
|
+
@include respond('phone') {
|
|
281
308
|
margin-top: var(--o-gap-4);
|
|
282
309
|
}
|
|
283
310
|
|
|
@@ -290,7 +317,7 @@ const list = computed(() => {
|
|
|
290
317
|
top: var(--o-gap-3);
|
|
291
318
|
right: var(--o-gap-3);
|
|
292
319
|
border-radius: var(--o-radius-xs);
|
|
293
|
-
@include respond
|
|
320
|
+
@include respond('<=pad_v') {
|
|
294
321
|
--tag-padding: var(--o-gap-1);
|
|
295
322
|
}
|
|
296
323
|
}
|
|
@@ -301,10 +328,10 @@ const list = computed(() => {
|
|
|
301
328
|
height: 3lh; // 3倍行高
|
|
302
329
|
@include h2;
|
|
303
330
|
@include text-truncate(3);
|
|
304
|
-
@include respond
|
|
331
|
+
@include respond('pad_v') {
|
|
305
332
|
@include h1;
|
|
306
333
|
}
|
|
307
|
-
@include respond
|
|
334
|
+
@include respond('phone') {
|
|
308
335
|
height: 2lh;
|
|
309
336
|
@include text-truncate(2);
|
|
310
337
|
}
|
|
@@ -322,13 +349,13 @@ const list = computed(() => {
|
|
|
322
349
|
}
|
|
323
350
|
|
|
324
351
|
@include text1;
|
|
325
|
-
@include respond
|
|
352
|
+
@include respond('pad_v') {
|
|
326
353
|
margin-top: var(--o-gap-2);
|
|
327
354
|
}
|
|
328
|
-
@include respond
|
|
355
|
+
@include respond('phone') {
|
|
329
356
|
margin-top: var(--o-gap-2);
|
|
330
357
|
}
|
|
331
|
-
@include respond
|
|
358
|
+
@include respond('<=pad_v') {
|
|
332
359
|
display: flex;
|
|
333
360
|
align-items: center;
|
|
334
361
|
.o-divider {
|
|
@@ -17,7 +17,7 @@ export const EVENTS_ICON_MAP = {
|
|
|
17
17
|
summit: IconSummit,
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
export const CITY_MAP = {
|
|
20
|
+
export const CITY_MAP: Record<string, string | string[]> = {
|
|
21
21
|
上海: 'https://infrastructure-website.osinfra.cn/picture/city/shanghai.jpg',
|
|
22
22
|
北京: 'https://infrastructure-website.osinfra.cn/picture/city/beijing.jpg',
|
|
23
23
|
南京: 'https://infrastructure-website.osinfra.cn/picture/city/nanjing.jpg',
|
|
@@ -47,7 +47,10 @@ export interface StepItemT {
|
|
|
47
47
|
// 活动列表
|
|
48
48
|
export interface EventsCardItemT {
|
|
49
49
|
name: string; // 事件名称
|
|
50
|
-
date
|
|
50
|
+
date?: string; // 事件日期
|
|
51
|
+
startDate?: string; // 事件开始日期
|
|
52
|
+
endDate?: string; // 事件结束日期
|
|
53
|
+
dateStr?: string; // 经处理后的展示时间
|
|
51
54
|
city: string; // 事件城市
|
|
52
55
|
cover?: string; // 卡片封面,如果不传递,组件内部通过date计算得出
|
|
53
56
|
status?: EventsStatusT; // 事件状态,不传递,组件内部通过date计算得出
|
|
@@ -149,9 +149,9 @@ const handleMouseleaveSub = (val: string) => {
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
.header-wrap-dark {
|
|
152
|
-
box-shadow: 0 3px 9px 0 rgba(var(--o-
|
|
152
|
+
box-shadow: 0 3px 9px 0 rgba(var(--o-grey-4), 0.08);
|
|
153
153
|
.header-nav-content {
|
|
154
|
-
box-shadow: 0 3px 9px 0 rgba(var(--o-
|
|
154
|
+
box-shadow: 0 3px 9px 0 rgba(var(--o-grey-4), 0.08);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
</style>
|
|
@@ -5,13 +5,14 @@ import { OIcon, OIconArrowLeft } from '@opensig/opendesign';
|
|
|
5
5
|
import ContentWrapper from '../common/ContentWrapper.vue';
|
|
6
6
|
import HeaderNavMobile from './components/HeaderNavMobile.vue';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import type { NavT, LangItemT } from './types.ts';
|
|
9
9
|
|
|
10
10
|
import IconClose from '~icons/components/icon-close.svg';
|
|
11
11
|
import IconMenu from '~icons/components/icon-header-menu.svg';
|
|
12
12
|
|
|
13
13
|
export interface OHeaderT {
|
|
14
14
|
(e: 'go-back'): void;
|
|
15
|
+
(e: 'lang-click', val: LangItemT): void;
|
|
15
16
|
(e: 'go-home'): void;
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -40,6 +41,11 @@ const mobileClick = () => {
|
|
|
40
41
|
const handleClick = () => {
|
|
41
42
|
menuPanel();
|
|
42
43
|
};
|
|
44
|
+
|
|
45
|
+
const langClick = (val: LangItemT) => {
|
|
46
|
+
emit('lang-click', val);
|
|
47
|
+
menuPanel();
|
|
48
|
+
};
|
|
43
49
|
</script>
|
|
44
50
|
|
|
45
51
|
<template>
|
|
@@ -89,6 +95,7 @@ const handleClick = () => {
|
|
|
89
95
|
:menu-show="menuShow"
|
|
90
96
|
@handle-click="handleClick"
|
|
91
97
|
@on-click="mobileClick"
|
|
98
|
+
@lang-click="langClick"
|
|
92
99
|
>
|
|
93
100
|
<template #tool>
|
|
94
101
|
<slot name="tool"></slot>
|