@opendesign-plus-test/components 0.0.1-rc.60 → 0.0.1-rc.61
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 +28 -28
- package/dist/components/OHeaderSearch.vue.d.ts +22 -22
- package/dist/components/OHeaderUser.vue.d.ts +1 -1
- package/dist/components/OLanguageSwitcher.vue.d.ts +49 -0
- package/dist/components/OThemeSwitcher.vue.d.ts +1 -1
- package/dist/components/activity/OActivityMyCalendar.vue.d.ts +4 -4
- package/dist/components/activity/index.d.ts +2 -2
- package/dist/components/banner/OBanner.vue.d.ts +13 -0
- package/dist/components/banner/OBannerContent.vue.d.ts +7 -0
- package/dist/components/banner/index.d.ts +68 -0
- package/dist/components/banner/types.d.ts +31 -0
- package/dist/components/header/types.d.ts +1 -0
- package/dist/components/meeting/OMeetingCalendar.vue.d.ts +2 -2
- package/dist/components/meeting/OMeetingForm.vue.d.ts +0 -2
- package/dist/components/meeting/OMeetingMyCalendar.vue.d.ts +4 -4
- package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +1 -1
- package/dist/components/meeting/index.d.ts +3 -9
- package/dist/components/meeting/types.d.ts +2 -4
- package/dist/components/search/OSearchInput.vue.d.ts +22 -22
- package/dist/components/search/index.d.ts +11 -11
- package/dist/components/search/internal/SearchImageInput.vue.d.ts +17 -17
- package/dist/components.cjs.js +39 -39
- package/dist/components.css +1 -1
- package/dist/components.es.js +8780 -8594
- package/dist/index.d.ts +3 -2
- package/package.json +3 -3
- package/scripts/generate-components-index.js +1 -1
- package/src/components/OHeaderSearch.vue +1 -1
- package/src/components/OLanguageSwitcher.vue +211 -0
- package/src/components/activity/OActivityMyCalendar.vue +1 -1
- package/src/components/banner/OBanner.vue +288 -0
- package/src/components/banner/OBannerContent.vue +175 -0
- package/src/components/banner/index.ts +18 -0
- package/src/components/banner/types.ts +39 -0
- package/src/components/header/types.ts +1 -0
- package/src/components/meeting/OMeetingCalendar.vue +23 -4
- package/src/components/meeting/OMeetingForm.vue +21 -13
- package/src/components/meeting/components/OMeetingCalendarList.vue +6 -2
- package/src/components/meeting/components/OMeetingDetail.vue +17 -3
- package/src/components/meeting/types.ts +2 -4
- package/src/components/search/OSearchInput.vue +1 -1
- package/src/i18n/en.ts +1 -1
- package/src/i18n/zh.ts +1 -1
- package/src/index.ts +4 -3
- package/dist/components/OBanner.vue.d.ts +0 -11
- package/src/components/OBanner.vue +0 -398
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { OButton, OFigure } from '@opensig/opendesign';
|
|
3
|
+
import ContentWrapper from '../common/ContentWrapper.vue';
|
|
4
|
+
import type { BannerContentProps } from './types';
|
|
5
|
+
|
|
6
|
+
defineProps<BannerContentProps>();
|
|
7
|
+
|
|
8
|
+
// 内联定义 emits 类型
|
|
9
|
+
const emit = defineEmits<{
|
|
10
|
+
(e: 'click', href: string | undefined): void;
|
|
11
|
+
}>();
|
|
12
|
+
|
|
13
|
+
const onClick = (href: string | undefined, hasBtn: string | undefined) => {
|
|
14
|
+
if (href && !hasBtn) {
|
|
15
|
+
window.open(href);
|
|
16
|
+
emit('click', href);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<OFigure
|
|
23
|
+
class="banner-bg"
|
|
24
|
+
:src="info.bg"
|
|
25
|
+
:class="{
|
|
26
|
+
'with-sticky-bg': info.withStickyBg,
|
|
27
|
+
'cursor-pointer': info.href && !info.btn,
|
|
28
|
+
}"
|
|
29
|
+
:style="{
|
|
30
|
+
'--pad-offset': info.pad_offset,
|
|
31
|
+
}"
|
|
32
|
+
@click="onClick(info.href, info.btn)"
|
|
33
|
+
>
|
|
34
|
+
<ContentWrapper class="banner-wrapper" :class="['banner-wrapper', contentJustifyCenter ? 'content-center' : '']">
|
|
35
|
+
<div class="banner-content">
|
|
36
|
+
<img v-if="!isPhone && info.attach" :src="info.attach" class="banner-attach" />
|
|
37
|
+
|
|
38
|
+
<!-- 标题 -->
|
|
39
|
+
<div
|
|
40
|
+
:class="{
|
|
41
|
+
'banner-title': true,
|
|
42
|
+
'text-dark': info.text_theme === 'dark'
|
|
43
|
+
}"
|
|
44
|
+
v-if="info.title"
|
|
45
|
+
>
|
|
46
|
+
{{ info.title }}
|
|
47
|
+
</div>
|
|
48
|
+
<!-- 副标题 -->
|
|
49
|
+
<div
|
|
50
|
+
:class="{
|
|
51
|
+
'banner-subtitle': true,
|
|
52
|
+
'text-dark': info.text_theme === 'dark'
|
|
53
|
+
}"
|
|
54
|
+
v-if="info.subtitle"
|
|
55
|
+
>
|
|
56
|
+
{{ info.subtitle }}
|
|
57
|
+
</div>
|
|
58
|
+
<div
|
|
59
|
+
class="banner-text"
|
|
60
|
+
v-if="info.bg_text"
|
|
61
|
+
:style="{
|
|
62
|
+
backgroundImage: `url(${info.bg_text})`,
|
|
63
|
+
'--pc-width': info.pc_text_width,
|
|
64
|
+
'--pc-height': info.pc_text_height,
|
|
65
|
+
'--pad-width': info.pad_text_width,
|
|
66
|
+
'--pad-height': info.pad_text_height,
|
|
67
|
+
}"
|
|
68
|
+
></div>
|
|
69
|
+
<!-- 操作按钮 -->
|
|
70
|
+
<div v-if="info.btn" class="banner-opts">
|
|
71
|
+
<OButton
|
|
72
|
+
:href="info.href"
|
|
73
|
+
target="_blank"
|
|
74
|
+
variant="solid"
|
|
75
|
+
color="primary"
|
|
76
|
+
:size="size === 'tiny' ? undefined : size"
|
|
77
|
+
>
|
|
78
|
+
{{ info.btn }}
|
|
79
|
+
</OButton>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</ContentWrapper>
|
|
83
|
+
</OFigure>
|
|
84
|
+
</template>
|
|
85
|
+
|
|
86
|
+
<style lang="scss" scoped>
|
|
87
|
+
.banner-bg {
|
|
88
|
+
width: 100%;
|
|
89
|
+
height: 100%;
|
|
90
|
+
|
|
91
|
+
:deep(.o-figure-img) {
|
|
92
|
+
width: 100%;
|
|
93
|
+
height: 100%;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@include respond-to('pad') {
|
|
97
|
+
:deep(.o-figure-img) {
|
|
98
|
+
transition: object-position 0.3s ease;
|
|
99
|
+
object-position: var(--pad-offset);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@include respond-to('phone') {
|
|
104
|
+
--figure-radius: 4px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.banner-wrapper {
|
|
109
|
+
height: 100%;
|
|
110
|
+
|
|
111
|
+
&.content-center {
|
|
112
|
+
display: flex;
|
|
113
|
+
justify-content: center;
|
|
114
|
+
|
|
115
|
+
& .banner-content {
|
|
116
|
+
align-items: center;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.banner-content {
|
|
122
|
+
height: 100%;
|
|
123
|
+
display: inline-flex;
|
|
124
|
+
flex-direction: column;
|
|
125
|
+
justify-content: center;
|
|
126
|
+
position: relative;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.banner-title {
|
|
130
|
+
@include display1;
|
|
131
|
+
color: var(--o-color-info1);
|
|
132
|
+
font-weight: 500;
|
|
133
|
+
margin-bottom: 8px;
|
|
134
|
+
|
|
135
|
+
&.text-dark {
|
|
136
|
+
color: var(--o-color-info1-inverse);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@include respond-to('<=pad_v') {
|
|
140
|
+
font-size: 22px;
|
|
141
|
+
line-height: 30px;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.banner-subtitle {
|
|
146
|
+
color: var(--o-color-info1);
|
|
147
|
+
margin-top: 8px;
|
|
148
|
+
font-size: 16px;
|
|
149
|
+
|
|
150
|
+
&.text-dark {
|
|
151
|
+
color: var(--o-color-info1-inverse);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.banner-text {
|
|
156
|
+
height: var(--pc-height);
|
|
157
|
+
width: var(--pc-width);
|
|
158
|
+
background-size: contain;
|
|
159
|
+
background-repeat: no-repeat;
|
|
160
|
+
|
|
161
|
+
@include respond-to('pad') {
|
|
162
|
+
height: var(--pad-height);
|
|
163
|
+
width: var(--pad-width);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.banner-opts {
|
|
168
|
+
margin-top: 24px;
|
|
169
|
+
--d: 20px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.cursor-pointer {
|
|
173
|
+
cursor: pointer;
|
|
174
|
+
}
|
|
175
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import _OBanner from './OBanner.vue';
|
|
2
|
+
import _OBannerContent from './OBannerContent.vue';
|
|
3
|
+
import type { App } from 'vue';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const OBanner = Object.assign(_OBanner, {
|
|
7
|
+
install(app: App) {
|
|
8
|
+
app.component('OBanner', _OBanner);
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
const OBannerContent = Object.assign(_OBannerContent, {
|
|
12
|
+
install(app: App) {
|
|
13
|
+
app.component('OBannerContent', _OBannerContent);
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export { OBanner, OBannerContent };
|
|
18
|
+
export * from './types';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Banner 项的类型定义
|
|
2
|
+
export interface BannerItem {
|
|
3
|
+
title?: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
bg: string;
|
|
6
|
+
text_theme?: 'light' | 'dark';
|
|
7
|
+
bg_text?: string;
|
|
8
|
+
pc_text_width?: string;
|
|
9
|
+
pc_text_height?: string;
|
|
10
|
+
pad_text_width?: string;
|
|
11
|
+
pad_text_height?: string;
|
|
12
|
+
attach?: string;
|
|
13
|
+
href?: string;
|
|
14
|
+
btn?: string;
|
|
15
|
+
withStickyBg?: boolean;
|
|
16
|
+
pad_offset?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// BannerContent 组件的 Props 类型
|
|
20
|
+
export interface BannerContentProps {
|
|
21
|
+
info: BannerItem;
|
|
22
|
+
size?: 'large' | 'medium' | 'small' | 'tiny';
|
|
23
|
+
contentJustifyCenter?: boolean;
|
|
24
|
+
isPhone?: boolean;
|
|
25
|
+
isLight?: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Emits 事件类型
|
|
29
|
+
export interface HomeBannerEmits {
|
|
30
|
+
(e: 'before-change', index: number): void;
|
|
31
|
+
(e: 'click', href: string | undefined): void;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface BannerContentEmits {
|
|
35
|
+
(e: 'click', href: string | undefined): void;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// 组件尺寸类型
|
|
39
|
+
export type ComponentSize = 'large' | 'medium' | 'small' | 'tiny';
|
|
@@ -77,13 +77,22 @@ const isAutoClick = ref(false);
|
|
|
77
77
|
const group = ref('');
|
|
78
78
|
const getSummitData = async (date: string) => {
|
|
79
79
|
if (props.getSummitListRequest) {
|
|
80
|
+
summitData.value = [];
|
|
80
81
|
const list = await props.getSummitListRequest(date);
|
|
81
82
|
summitData.value = (list || []).map((v: SummitItemT) => {
|
|
83
|
+
const dates: string[] = [];
|
|
84
|
+
let cur = dayjs(v.start_date);
|
|
85
|
+
const end = dayjs(v.end_date);
|
|
86
|
+
while (!cur.isAfter(end)) {
|
|
87
|
+
dates.push(cur.format('YYYY-MM-DD'));
|
|
88
|
+
cur = cur.add(1, 'day');
|
|
89
|
+
}
|
|
82
90
|
return {
|
|
83
91
|
...v,
|
|
92
|
+
dates,
|
|
84
93
|
type: CalendarDataType.SUMMIT,
|
|
85
|
-
start_date_time: `${ formatDate(v.start_date) } ${ v.start }`,
|
|
86
|
-
end_date_time: `${ formatDate(v.end_date) } ${ v.end }`,
|
|
94
|
+
start_date_time: `${ formatDate(v.start_date) } ${ v.start || '' }`,
|
|
95
|
+
end_date_time: `${ formatDate(v.end_date) } ${ v.end || '' }`,
|
|
87
96
|
};
|
|
88
97
|
});
|
|
89
98
|
} else {
|
|
@@ -92,13 +101,22 @@ const getSummitData = async (date: string) => {
|
|
|
92
101
|
};
|
|
93
102
|
const getActivityData = async (date: string) => {
|
|
94
103
|
if (props.getEventsListRequest) {
|
|
104
|
+
eventsData.value = [];
|
|
95
105
|
const list = await props.getEventsListRequest(date);
|
|
96
106
|
eventsData.value = (list || []).map((v: MeetingEventsItemT) => {
|
|
107
|
+
const dates: string[] = [];
|
|
108
|
+
let cur = dayjs(v.start_date);
|
|
109
|
+
const end = dayjs(v.end_date);
|
|
110
|
+
while (!cur.isAfter(end)) {
|
|
111
|
+
dates.push(cur.format('YYYY-MM-DD'));
|
|
112
|
+
cur = cur.add(1, 'day');
|
|
113
|
+
}
|
|
97
114
|
return {
|
|
98
115
|
...v,
|
|
116
|
+
dates,
|
|
99
117
|
type: CalendarDataType.EVENTS,
|
|
100
|
-
start_date_time: `${ formatDate(v.start_date) } ${ v.start }`,
|
|
101
|
-
end_date_time: `${ formatDate(v.end_date) } ${ v.end }`,
|
|
118
|
+
start_date_time: `${ formatDate(v.start_date) } ${ v.start || '' }`,
|
|
119
|
+
end_date_time: `${ formatDate(v.end_date) } ${ v.end || '' }`,
|
|
102
120
|
};
|
|
103
121
|
});
|
|
104
122
|
} else {
|
|
@@ -132,6 +150,7 @@ const paramGetDaysData = async (params: { date: string; type: string }) => {
|
|
|
132
150
|
return;
|
|
133
151
|
}
|
|
134
152
|
try {
|
|
153
|
+
meetingData.value = [];
|
|
135
154
|
const res: MeetingItemT[] = await props.getMeetingListRequest(params.date, group.value, '');
|
|
136
155
|
meetingData.value = res.map((v) => {
|
|
137
156
|
return {
|
|
@@ -19,7 +19,15 @@ import {
|
|
|
19
19
|
} from '@opensig/opendesign';
|
|
20
20
|
import IconHelp from '~icons/meeting/icon-help.svg';
|
|
21
21
|
import IconTip from '~icons/meeting/icon-tip.svg';
|
|
22
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
CycleSubItemT,
|
|
24
|
+
MeetingFormPropsT,
|
|
25
|
+
MeetingGroupType,
|
|
26
|
+
MeetingItemT,
|
|
27
|
+
MeetingPostT,
|
|
28
|
+
OptionItemT,
|
|
29
|
+
PlatformT,
|
|
30
|
+
} from './types';
|
|
23
31
|
import dayjs from 'dayjs';
|
|
24
32
|
import { findLabelFromOptions, formatDateNumber, getDateNumber } from './utils';
|
|
25
33
|
import { EMAIL_REGEX, INTERVAL_DAY, INTERVAL_MONTH, INTERVAL_WEEK } from './config';
|
|
@@ -31,8 +39,6 @@ import { ValidatorResultT } from '@opensig/opendesign/lib/form/types';
|
|
|
31
39
|
const { t, locale, cycleTypeOptions0, intervalWeekOptions, getPlatformLabel } = useMeetingConfig();
|
|
32
40
|
|
|
33
41
|
const props = withDefaults(defineProps<MeetingFormPropsT>(), {
|
|
34
|
-
isSub: false,
|
|
35
|
-
isEdit: false,
|
|
36
42
|
showBtns: true,
|
|
37
43
|
groupType: MeetingGroupType.SIG,
|
|
38
44
|
});
|
|
@@ -41,6 +47,8 @@ const message = useMessage(null);
|
|
|
41
47
|
const cycleTypeOptions = cycleTypeOptions0;
|
|
42
48
|
const weekOptions = intervalWeekOptions;
|
|
43
49
|
|
|
50
|
+
const isEdit = computed(() => Object.keys(props?.data || {}).length > 0);
|
|
51
|
+
const isSub = computed(() => !!props.subId);
|
|
44
52
|
const intervalTypeMax = computed(() => {
|
|
45
53
|
return findLabelFromOptions(form.value.cycle_type, cycleTypeOptions.value, 'max');
|
|
46
54
|
});
|
|
@@ -202,7 +210,7 @@ const rules = computed<Record<string, RulesT[]>>(() => {
|
|
|
202
210
|
email_list: [
|
|
203
211
|
{
|
|
204
212
|
validator: (value: any) => {
|
|
205
|
-
if (
|
|
213
|
+
if (isEdit.value) {
|
|
206
214
|
return {} as unknown as ValidatorResultT;
|
|
207
215
|
}
|
|
208
216
|
const str = value.replaceAll(' ', '').replaceAll(',', ';') || '';
|
|
@@ -287,7 +295,7 @@ const getPropData = () => {
|
|
|
287
295
|
...(is_cycle
|
|
288
296
|
? {
|
|
289
297
|
date_range: [cycle_start_date, cycle_end_date],
|
|
290
|
-
cycle_point: cycle_point?.map((v) => parseInt(v)) || [],
|
|
298
|
+
cycle_point: cycle_point?.map((v) => parseInt(v as unknown as string)) || [],
|
|
291
299
|
cycle_interval: cycle_interval || 1,
|
|
292
300
|
time: `${ cycle_start }-${ cycle_end }`,
|
|
293
301
|
start: cycle_start,
|
|
@@ -301,13 +309,13 @@ watch(
|
|
|
301
309
|
() => props.data,
|
|
302
310
|
(data) => {
|
|
303
311
|
if (data) {
|
|
304
|
-
const propData = getPropData() as unknown as
|
|
305
|
-
const sub = propData?.cycle_sub?.find((v) => v.sub_id === (props.subId
|
|
312
|
+
const propData = getPropData() as unknown as MeetingItemT;
|
|
313
|
+
const sub = propData?.cycle_sub?.find((v) => v.sub_id === (props.subId)) || {} as unknown as CycleSubItemT;
|
|
306
314
|
const { mid, date, start, end, sub_id } = sub;
|
|
307
315
|
Object.assign(
|
|
308
316
|
form.value,
|
|
309
317
|
propData,
|
|
310
|
-
|
|
318
|
+
isSub.value
|
|
311
319
|
? {
|
|
312
320
|
is_cycle: false,
|
|
313
321
|
mid,
|
|
@@ -368,12 +376,12 @@ const changeIntervalType = () => {
|
|
|
368
376
|
};
|
|
369
377
|
|
|
370
378
|
const changeIsCycle = () => {
|
|
371
|
-
form.value.platform = '
|
|
379
|
+
form.value.platform = typeOptions.value.find(v => (v.value as unknown as string).toLowerCase() === 'welink')?.value as unknown as string || 'WeLink';
|
|
372
380
|
};
|
|
373
381
|
|
|
374
382
|
const { lePadV } = useScreen();
|
|
375
383
|
const confirm = async () => {
|
|
376
|
-
let type =
|
|
384
|
+
let type = isEdit.value ? t('meeting.editSuccess') : t('meeting.booSuccess');
|
|
377
385
|
try {
|
|
378
386
|
loading.value = true;
|
|
379
387
|
const valid = await formRef.value.validate();
|
|
@@ -431,8 +439,8 @@ const confirm = async () => {
|
|
|
431
439
|
end,
|
|
432
440
|
};
|
|
433
441
|
}
|
|
434
|
-
if (
|
|
435
|
-
if (
|
|
442
|
+
if (isEdit.value) {
|
|
443
|
+
if (isSub.value) {
|
|
436
444
|
const { mid, sub_id } = form.value;
|
|
437
445
|
const { date, start, end } = params;
|
|
438
446
|
flag = await props?.editSubMeetingRequest(sub_id, {
|
|
@@ -482,7 +490,7 @@ onMounted(() => {
|
|
|
482
490
|
|
|
483
491
|
const changeSig = (sig: any) => {
|
|
484
492
|
const find = sigOptions.value.find((v) => v.value === sig);
|
|
485
|
-
if (!
|
|
493
|
+
if (!isEdit.value) {
|
|
486
494
|
form.value.etherpad = find?.etherpad || '';
|
|
487
495
|
form.value.email_list = find?.email_list || '';
|
|
488
496
|
}
|
|
@@ -90,7 +90,11 @@ const computedList = computed<any[]>(() => {
|
|
|
90
90
|
dateRange = `${ formatDate(v.start_date) } ${ v.start }-${ formatDate(v.end_date) } ${ v.end }`;
|
|
91
91
|
}
|
|
92
92
|
} else {
|
|
93
|
-
|
|
93
|
+
if (v.start_date === v.end_date) {
|
|
94
|
+
dateRange = formatDate(v.start_date, 'YYYY/MM/DD');
|
|
95
|
+
} else {
|
|
96
|
+
dateRange = `${ formatDate(v.start_date, 'YYYY/MM/DD') }-${ formatDate(v.end_date, 'YYYY/MM/DD') }`;
|
|
97
|
+
}
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
return {
|
|
@@ -169,7 +173,7 @@ const computedList = computed<any[]>(() => {
|
|
|
169
173
|
<OCollapseItem v-for="(item, index) in computedList" :key="item.id" :value="item.id">
|
|
170
174
|
<template #title>
|
|
171
175
|
<div class="meet-title-left">
|
|
172
|
-
<div class="meet-title" :title="item.topic || item.name">
|
|
176
|
+
<div class="meet-title" :title="item.topic || item.name || item.title">
|
|
173
177
|
<OIcon
|
|
174
178
|
:style="{
|
|
175
179
|
backgroundColor: `${getConfig(item.type, 'color')}`
|
|
@@ -5,6 +5,7 @@ import { CalendarDataType, MeetingItemT } from '../types.ts';
|
|
|
5
5
|
import MoreText from '@/components/common/MoreText.vue';
|
|
6
6
|
import { formatDate } from '@/components/meeting/utils.ts';
|
|
7
7
|
import { useMeetingConfig } from '../composables/useMeetingConfig';
|
|
8
|
+
import { useI18n } from '@/i18n';
|
|
8
9
|
|
|
9
10
|
const props = defineProps<{
|
|
10
11
|
data: MeetingItemT;
|
|
@@ -13,7 +14,8 @@ const props = defineProps<{
|
|
|
13
14
|
page?: CalendarDataType
|
|
14
15
|
}>();
|
|
15
16
|
const { t, getPlatformLabel } = useMeetingConfig();
|
|
16
|
-
|
|
17
|
+
const { locale } = useI18n();
|
|
18
|
+
const isZh = computed(() => locale.value === 'zh');
|
|
17
19
|
// 会议详情配置
|
|
18
20
|
const infoList = computed(() =>
|
|
19
21
|
[
|
|
@@ -83,11 +85,15 @@ const columns = computed<ColumnItemT[]>(() => {
|
|
|
83
85
|
});
|
|
84
86
|
|
|
85
87
|
const domRef = ref([]);
|
|
88
|
+
const SPLIT_MARK = '|';
|
|
86
89
|
// 复制会议内容
|
|
87
90
|
const copyInfo = () => {
|
|
88
91
|
try {
|
|
89
|
-
|
|
90
|
-
text
|
|
92
|
+
const colon = isZh.value ? ':' : ': ';
|
|
93
|
+
let text = `${ t('meeting.meetingTopic') }${ colon }${ props.data.topic || props.data.name || props.data.title }\n`;
|
|
94
|
+
text += [...domRef.value].reduce((pre, cur: HTMLDivElement) => {
|
|
95
|
+
return `${ pre }${ cur.textContent ? cur.textContent.replace(SPLIT_MARK, colon) : '' }\n`;
|
|
96
|
+
}, '');
|
|
91
97
|
navigator.clipboard.writeText(text);
|
|
92
98
|
return Promise.resolve();
|
|
93
99
|
} catch (e) {
|
|
@@ -114,6 +120,7 @@ defineExpose({ copyInfo });
|
|
|
114
120
|
>
|
|
115
121
|
<template v-if="getField(info.key) && !info.isRecord">
|
|
116
122
|
<span class="label">{{ info.label }}</span>
|
|
123
|
+
<span class="split-mark">{{ SPLIT_MARK }}</span>
|
|
117
124
|
<MoreText :show="show" v-if="info.ellipsis" :text="getField(info.key) || '-'" />
|
|
118
125
|
<OLink
|
|
119
126
|
v-else-if="info.isLink"
|
|
@@ -190,6 +197,13 @@ defineExpose({ copyInfo });
|
|
|
190
197
|
}
|
|
191
198
|
}
|
|
192
199
|
|
|
200
|
+
.split-mark {
|
|
201
|
+
width: 0;
|
|
202
|
+
height: 0;
|
|
203
|
+
opacity: 0;
|
|
204
|
+
overflow: hidden;
|
|
205
|
+
}
|
|
206
|
+
|
|
193
207
|
&.type_events {
|
|
194
208
|
.label {
|
|
195
209
|
width: 6em;
|
|
@@ -37,7 +37,7 @@ export interface OptionItemT {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
export type PlatformT = 'welink' | 'tencent' | 'zoom' | 'WELINK' | 'TENCENT' | 'ZOOM';
|
|
40
|
+
export type PlatformT = 'welink' | 'tencent' | 'zoom' | 'WELINK' | 'TENCENT' | 'ZOOM' | 'WeLink' | 'Tencent';
|
|
41
41
|
|
|
42
42
|
export enum MeetingGroupType {
|
|
43
43
|
SIG = 'sig',
|
|
@@ -63,7 +63,7 @@ export interface MeetingPostT {
|
|
|
63
63
|
topic: string; // 会议主题 128
|
|
64
64
|
sponsor?: string; // 会议发起人 20
|
|
65
65
|
group_name: string; // 所属SIG 64
|
|
66
|
-
platform: PlatformT; // 会议平台
|
|
66
|
+
platform: PlatformT | string; // 会议平台
|
|
67
67
|
date: string; // 会议日期
|
|
68
68
|
date_range?: string[]; // 日期返回
|
|
69
69
|
time: string; // 会议时间
|
|
@@ -88,8 +88,6 @@ export interface MeetingPostT {
|
|
|
88
88
|
|
|
89
89
|
export interface MeetingFormPropsT {
|
|
90
90
|
data?: MeetingItemT;
|
|
91
|
-
isSub?: boolean;
|
|
92
|
-
isEdit?: boolean;
|
|
93
91
|
subId?: string;
|
|
94
92
|
createMeetingRequest: any,
|
|
95
93
|
editMeetingRequest: any;
|
|
@@ -230,7 +230,7 @@ const handleSuggestClick = (item: OSearchRecommendItem) => {
|
|
|
230
230
|
emit('recommend-click', item);
|
|
231
231
|
suppressNextInput = true;
|
|
232
232
|
innerValue.value = item.key;
|
|
233
|
-
runSearch(item.key);
|
|
233
|
+
runSearch(item.key ?? '');
|
|
234
234
|
};
|
|
235
235
|
|
|
236
236
|
const handleOnestepClick = (item: OSearchRecommendItem) => {
|
package/src/i18n/en.ts
CHANGED
|
@@ -146,7 +146,7 @@ export default {
|
|
|
146
146
|
'meeting.groups': 'Groups',
|
|
147
147
|
'meeting.activityAddress': 'Address',
|
|
148
148
|
'meeting.livePlatform': 'Live Platform',
|
|
149
|
-
'meeting.meetingTopic': 'Topics
|
|
149
|
+
'meeting.meetingTopic': 'Topics',
|
|
150
150
|
'meeting.meetingDetail': 'Details',
|
|
151
151
|
'meeting.meetingEtherpad': 'Etherpad',
|
|
152
152
|
'meeting.meetingReplay': 'Playback',
|
package/src/i18n/zh.ts
CHANGED
|
@@ -145,7 +145,7 @@ export default {
|
|
|
145
145
|
'meeting.groups': '工作组',
|
|
146
146
|
'meeting.activityAddress': '活动地点',
|
|
147
147
|
'meeting.livePlatform': '直播平台',
|
|
148
|
-
'meeting.meetingTopic': '
|
|
148
|
+
'meeting.meetingTopic': '会议主题',
|
|
149
149
|
'meeting.meetingDetail': '会议详情',
|
|
150
150
|
'meeting.meetingEtherpad': '会议纪要',
|
|
151
151
|
'meeting.meetingReplay': '智能回放',
|
package/src/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// OpenDesignPlus Components 库入口文件
|
|
2
2
|
// 此文件由 scripts/generate-components-index.js 自动生成
|
|
3
3
|
|
|
4
|
-
import OBanner from './components/OBanner.vue';
|
|
5
4
|
import OCookieNotice from './components/OCookieNotice.vue';
|
|
6
5
|
import OFooter from './components/OFooter.vue';
|
|
7
6
|
import OHeaderSearch from './components/OHeaderSearch.vue';
|
|
8
7
|
import OHeaderUser from './components/OHeaderUser.vue';
|
|
8
|
+
import OLanguageSwitcher from './components/OLanguageSwitcher.vue';
|
|
9
9
|
import OPlusConfigProvider from './components/OPlusConfigProvider.vue';
|
|
10
10
|
import OSection from './components/OSection.vue';
|
|
11
11
|
import OSourceCode from './components/OSourceCode.vue';
|
|
@@ -13,11 +13,11 @@ import OThemeSwitcher from './components/OThemeSwitcher.vue';
|
|
|
13
13
|
|
|
14
14
|
// 导出组件
|
|
15
15
|
const components = {
|
|
16
|
-
OBanner,
|
|
17
16
|
OCookieNotice,
|
|
18
17
|
OFooter,
|
|
19
18
|
OHeaderSearch,
|
|
20
19
|
OHeaderUser,
|
|
20
|
+
OLanguageSwitcher,
|
|
21
21
|
OPlusConfigProvider,
|
|
22
22
|
OSection,
|
|
23
23
|
OSourceCode,
|
|
@@ -25,10 +25,11 @@ const components = {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
// 导出单个组件
|
|
28
|
-
export {
|
|
28
|
+
export { OCookieNotice, OFooter, OHeaderSearch, OHeaderUser, OLanguageSwitcher, OPlusConfigProvider, OSection, OSourceCode, OThemeSwitcher };
|
|
29
29
|
|
|
30
30
|
// 重新导出子目录中的组件
|
|
31
31
|
export * from './components/activity';
|
|
32
|
+
export * from './components/banner';
|
|
32
33
|
export * from './components/element-plus';
|
|
33
34
|
export * from './components/events';
|
|
34
35
|
export * from './components/header';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
options: any;
|
|
3
|
-
size: string;
|
|
4
|
-
contentJustifyCenter: boolean;
|
|
5
|
-
};
|
|
6
|
-
declare const _default: import('../../vue/dist/vue.esm-bundler.js').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, import('../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, {}, string, import('../../vue/dist/vue.esm-bundler.js').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
-
options: any;
|
|
8
|
-
size: string;
|
|
9
|
-
contentJustifyCenter: boolean;
|
|
10
|
-
}, {}, {}, {}, string, import('../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
|
-
export default _default;
|