@opendesign-plus/components 0.0.1-rc.2 → 0.0.1-rc.20

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 (203) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -0
  2. package/dist/chunk-OElCookieNotice.es.js +839 -0
  3. package/dist/components/OBanner.vue.d.ts +10 -1
  4. package/dist/components/OCookieNotice.vue.d.ts +6 -5
  5. package/dist/components/OFooter.vue.d.ts +46 -0
  6. package/dist/components/OHeaderSearch.vue.d.ts +4 -4
  7. package/dist/components/OHeaderUser.vue.d.ts +40 -0
  8. package/dist/components/OSourceCode.vue.d.ts +20 -0
  9. package/dist/components/activity/OActivityApproval.vue.d.ts +277 -0
  10. package/dist/components/activity/OActivityForm.vue.d.ts +140 -0
  11. package/dist/components/activity/OMyActivityCalendar.vue.d.ts +578 -0
  12. package/dist/components/activity/composables/useActivityConfig.d.ts +17 -0
  13. package/dist/components/activity/config.d.ts +1 -0
  14. package/dist/components/activity/index.d.ts +623 -0
  15. package/dist/components/activity/types.d.ts +81 -0
  16. package/dist/components/element-plus/OElCookieNotice.vue.d.ts +34 -0
  17. package/dist/components/element-plus/index.d.ts +2 -0
  18. package/dist/components/events/OEventsApply.vue.d.ts +16 -0
  19. package/dist/components/events/OEventsCalendar.vue.d.ts +5 -0
  20. package/dist/components/events/OEventsList.vue.d.ts +26 -0
  21. package/dist/components/events/config.d.ts +27 -0
  22. package/dist/components/events/index.d.ts +78 -0
  23. package/dist/components/events/types.d.ts +66 -0
  24. package/dist/components/events/utils.d.ts +7 -0
  25. package/dist/components/header/OHeader.vue.d.ts +30 -0
  26. package/dist/components/header/OHeaderMobile.vue.d.ts +171 -0
  27. package/dist/components/header/components/HeaderContent.vue.d.ts +13 -0
  28. package/dist/components/header/components/HeaderNav.vue.d.ts +19 -0
  29. package/dist/components/header/components/HeaderNavMobile.vue.d.ts +33 -0
  30. package/dist/components/header/index.d.ts +145 -0
  31. package/dist/components/header/types.d.ts +80 -0
  32. package/dist/components/meeting/OMeetingCalendar.vue.d.ts +299 -0
  33. package/dist/components/meeting/OMeetingForm.vue.d.ts +145 -0
  34. package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +586 -0
  35. package/dist/components/meeting/OSigMeetingCalendar.vue.d.ts +24 -0
  36. package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +28 -0
  37. package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +664 -0
  38. package/dist/components/meeting/components/OMeetingDetail.vue.d.ts +13 -0
  39. package/dist/components/meeting/components/OMeetingPlaybackSubtitles.vue.d.ts +5 -0
  40. package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +17 -0
  41. package/dist/components/meeting/components/OSigMeetingAside.vue.d.ts +16 -0
  42. package/dist/components/meeting/composables/useMeetingConfig.d.ts +14 -0
  43. package/dist/components/meeting/config.d.ts +12 -0
  44. package/dist/components/meeting/types.d.ts +168 -0
  45. package/dist/components/meeting/utils.d.ts +8 -0
  46. package/dist/components.cjs.js +224 -1
  47. package/dist/components.css +1 -1
  48. package/dist/components.element.cjs.js +1 -0
  49. package/dist/components.element.es.js +4 -0
  50. package/dist/components.es.js +44348 -785
  51. package/dist/index.d.ts +9 -2
  52. package/docs/design.md +27 -27
  53. package/docs/design_banner.md +41 -41
  54. package/docs/design_section.md +27 -27
  55. package/package.json +12 -3
  56. package/scripts/generate-components-index.js +103 -80
  57. package/src/assets/events/svg-icons/icon-checked.svg +3 -0
  58. package/src/assets/events/svg-icons/icon-competition.svg +7 -0
  59. package/src/assets/events/svg-icons/icon-events.svg +4 -0
  60. package/src/assets/events/svg-icons/icon-release.svg +4 -0
  61. package/src/assets/events/svg-icons/icon-summit.svg +4 -0
  62. package/src/assets/meeting/svg-icons/icon-all.svg +3 -0
  63. package/src/assets/meeting/svg-icons/icon-backward.svg +4 -0
  64. package/src/assets/meeting/svg-icons/icon-calendar.svg +3 -0
  65. package/src/assets/meeting/svg-icons/icon-cancel.svg +4 -0
  66. package/src/assets/meeting/svg-icons/icon-captions.svg +4 -0
  67. package/src/assets/meeting/svg-icons/icon-close-captions.svg +6 -0
  68. package/src/assets/meeting/svg-icons/icon-close-fullscreen.svg +6 -0
  69. package/src/assets/meeting/svg-icons/icon-copy.svg +3 -0
  70. package/src/assets/meeting/svg-icons/icon-create.svg +5 -0
  71. package/src/assets/meeting/svg-icons/icon-delete.svg +7 -0
  72. package/src/assets/meeting/svg-icons/icon-empty.svg +31 -0
  73. package/src/assets/meeting/svg-icons/icon-empty_dark.svg +49 -0
  74. package/src/assets/meeting/svg-icons/icon-event.svg +3 -0
  75. package/src/assets/meeting/svg-icons/icon-export.svg +3 -0
  76. package/src/assets/meeting/svg-icons/icon-forward.svg +4 -0
  77. package/src/assets/meeting/svg-icons/icon-fullscreen.svg +6 -0
  78. package/src/assets/meeting/svg-icons/icon-help.svg +3 -0
  79. package/src/assets/meeting/svg-icons/icon-important.svg +4 -0
  80. package/src/assets/meeting/svg-icons/icon-info.svg +3 -0
  81. package/src/assets/meeting/svg-icons/icon-meet.svg +3 -0
  82. package/src/assets/meeting/svg-icons/icon-meeting-message.svg +5 -0
  83. package/src/assets/meeting/svg-icons/icon-meeting.svg +4 -0
  84. package/src/assets/meeting/svg-icons/icon-play.svg +5 -0
  85. package/src/assets/meeting/svg-icons/icon-playing-tip.svg +7 -0
  86. package/src/assets/meeting/svg-icons/icon-playing.svg +5 -0
  87. package/src/assets/meeting/svg-icons/icon-question.svg +4 -0
  88. package/src/assets/meeting/svg-icons/icon-sound.svg +5 -0
  89. package/src/assets/meeting/svg-icons/icon-speaker.svg +3 -0
  90. package/src/assets/meeting/svg-icons/icon-summit.svg +3 -0
  91. package/src/assets/meeting/svg-icons/icon-telligent.svg +3 -0
  92. package/src/assets/meeting/svg-icons/icon-tip.svg +3 -0
  93. package/src/assets/meeting/svg-icons/icon-todo.svg +4 -0
  94. package/src/assets/meeting/transparent.png +0 -0
  95. package/src/assets/svg-icons/icon-arrow-left.svg +3 -0
  96. package/src/assets/svg-icons/icon-avatar-line.svg +3 -0
  97. package/src/assets/svg-icons/icon-caret-left.svg +3 -0
  98. package/src/assets/svg-icons/icon-caret-right.svg +3 -0
  99. package/src/assets/svg-icons/icon-chevron-down.svg +3 -0
  100. package/src/assets/svg-icons/icon-chevron-right.svg +3 -3
  101. package/src/assets/svg-icons/icon-chevron-up.svg +3 -0
  102. package/src/assets/svg-icons/icon-close.svg +3 -3
  103. package/src/assets/svg-icons/icon-delete.svg +3 -3
  104. package/src/assets/svg-icons/icon-filter.svg +3 -0
  105. package/src/assets/svg-icons/icon-header-back.svg +3 -3
  106. package/src/assets/svg-icons/icon-header-delete.svg +3 -3
  107. package/src/assets/svg-icons/icon-header-menu.svg +3 -0
  108. package/src/assets/svg-icons/icon-header-person.svg +3 -0
  109. package/src/assets/svg-icons/icon-header-search.svg +4 -4
  110. package/src/assets/svg-icons/icon-loading.svg +4 -0
  111. package/src/assets/svg-icons/icon-locale.svg +3 -0
  112. package/src/assets/svg-icons/icon-log-off.svg +3 -0
  113. package/src/assets/svg-icons/icon-message.svg +3 -0
  114. package/src/assets/svg-icons/icon-moon.svg +3 -3
  115. package/src/assets/svg-icons/icon-outlink.svg +3 -0
  116. package/src/assets/svg-icons/icon-overview.svg +3 -0
  117. package/src/assets/svg-icons/icon-search.svg +3 -0
  118. package/src/assets/svg-icons/icon-setting.svg +3 -0
  119. package/src/assets/svg-icons/icon-sun.svg +3 -3
  120. package/src/assets/svg-icons/icon-tips.svg +3 -0
  121. package/src/components/OBanner.vue +398 -390
  122. package/src/components/OCookieNotice.vue +575 -424
  123. package/src/components/OFooter.vue +576 -0
  124. package/src/components/OHeaderSearch.vue +601 -601
  125. package/src/components/OHeaderUser.vue +237 -0
  126. package/src/components/OPlusConfigProvider.vue +32 -32
  127. package/src/components/OSection.vue +178 -178
  128. package/src/components/OSourceCode.vue +153 -0
  129. package/src/components/OThemeSwitcher.vue +108 -108
  130. package/src/components/activity/OActivityApproval.vue +864 -0
  131. package/src/components/activity/OActivityForm.vue +542 -0
  132. package/src/components/activity/OMyActivityCalendar.vue +1486 -0
  133. package/src/components/activity/composables/useActivityConfig.ts +141 -0
  134. package/src/components/activity/config.ts +1 -0
  135. package/src/components/activity/index.ts +24 -0
  136. package/src/components/activity/types.ts +88 -0
  137. package/src/components/common/AppAvatar.vue +83 -0
  138. package/src/components/common/ClientOnlyWrapper.ts +21 -21
  139. package/src/components/common/ContentWrapper.vue +85 -85
  140. package/src/components/common/MoreText.vue +124 -0
  141. package/src/components/common/ThFilter.vue +330 -0
  142. package/src/components/element-plus/OElCookieNotice.vue +603 -0
  143. package/src/components/element-plus/index.ts +3 -0
  144. package/src/components/events/OEventsApply.vue +418 -0
  145. package/src/components/events/OEventsCalendar.vue +598 -0
  146. package/src/components/events/OEventsList.vue +362 -0
  147. package/src/components/events/config.ts +35 -0
  148. package/src/components/events/index.ts +24 -0
  149. package/src/components/events/types.ts +80 -0
  150. package/src/components/events/utils.ts +9 -0
  151. package/src/components/header/OHeader.vue +157 -0
  152. package/src/components/header/OHeaderMobile.vue +177 -0
  153. package/src/components/header/components/HeaderContent.vue +1121 -0
  154. package/src/components/header/components/HeaderNav.vue +278 -0
  155. package/src/components/header/components/HeaderNavMobile.vue +377 -0
  156. package/src/components/header/index.ts +16 -0
  157. package/src/components/header/types.ts +91 -0
  158. package/src/components/meeting/OMeetingCalendar.vue +878 -0
  159. package/src/components/meeting/OMeetingForm.vue +1053 -0
  160. package/src/components/meeting/OMeetingPlayback.vue +439 -0
  161. package/src/components/meeting/OMyMeetingCalendar.vue +1497 -0
  162. package/src/components/meeting/OSigMeetingCalendar.vue +410 -0
  163. package/src/components/meeting/components/OMeetingCalendarList.vue +510 -0
  164. package/src/components/meeting/components/OMeetingCalendarSelector.vue +206 -0
  165. package/src/components/meeting/components/OMeetingDetail.vue +229 -0
  166. package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +611 -0
  167. package/src/components/meeting/components/OMeetingPlaybackVideo.vue +741 -0
  168. package/src/components/meeting/components/OSigMeetingAside.vue +200 -0
  169. package/src/components/meeting/composables/useMeetingConfig.ts +108 -0
  170. package/src/components/meeting/config.ts +48 -0
  171. package/src/components/meeting/index.ts +45 -0
  172. package/src/components/meeting/types.ts +195 -0
  173. package/src/components/meeting/utils.ts +70 -0
  174. package/src/draft/Banner.vue +265 -265
  175. package/src/draft/ButtonCards.vue +105 -105
  176. package/src/draft/Feature.vue +133 -133
  177. package/src/draft/Footer.vue +512 -512
  178. package/src/draft/HorizontalAnchor.vue +165 -165
  179. package/src/draft/ItemSwiper.vue +133 -133
  180. package/src/draft/Logo.vue +141 -141
  181. package/src/draft/LogoCard.vue +74 -74
  182. package/src/draft/LogoV2.vue +19 -19
  183. package/src/draft/MainCard.vue +38 -38
  184. package/src/draft/MultiCard.vue +94 -94
  185. package/src/draft/MultiIconCard.vue +73 -73
  186. package/src/draft/OInfoCard.vue +176 -176
  187. package/src/draft/Process.vue +81 -81
  188. package/src/draft/Section.vue +167 -167
  189. package/src/draft/SingleTabCard.vue +84 -84
  190. package/src/draft/SliderCard.vue +110 -110
  191. package/src/env.d.ts +16 -1
  192. package/src/i18n/en.ts +264 -20
  193. package/src/i18n/index.ts +56 -42
  194. package/src/i18n/zh.ts +253 -9
  195. package/src/index.ts +14 -3
  196. package/src/shared/provide.ts +6 -6
  197. package/src/shims-vue-dompurify-html.d.ts +17 -0
  198. package/src/vue.d.ts +9 -9
  199. package/tsconfig.json +37 -33
  200. package/vite.config.ts +118 -94
  201. package/dist/components/OCookieNoticeEl.vue.d.ts +0 -29
  202. package/dist/components.umd.js +0 -1
  203. package/src/components/OCookieNoticeEl.vue +0 -404
@@ -0,0 +1,510 @@
1
+ <script setup lang="ts">
2
+ import { OCollapse, OCollapseItem, ODivider, OIcon, OLink, OTag, useMessage } from '@opensig/opendesign';
3
+ import OMeetingDetail from './OMeetingDetail.vue';
4
+ import { computed, nextTick, ref, watch } from 'vue';
5
+ import IconCopy from '~icons/meeting/icon-copy.svg';
6
+ import { MeetingGroupType, MeetingItemT } from '../types.ts';
7
+ import IconChevronRight from '~icons/components/icon-chevron-right.svg';
8
+ import { INTERVAL_DAY, INTERVAL_MONTH, INTERVAL_WEEK } from '../config.ts';
9
+ import { formatDate } from '../utils.ts';
10
+ import { useMeetingConfig } from '../composables/useMeetingConfig';
11
+ import { useActivityConfig } from '@/components/activity/composables/useActivityConfig';
12
+
13
+ const { activityTypeMap } = useActivityConfig();
14
+
15
+ const props = withDefaults(defineProps<{
16
+ list: MeetingItemT[];
17
+ groupType: MeetingGroupType;
18
+ }>(), {
19
+ list: () => [],
20
+ });
21
+ const { t, locale, getConfig, getPointStr } = useMeetingConfig();
22
+ const detailRefs = ref([]);
23
+ const message = useMessage(null);
24
+ const copyInfo = async (idx) => {
25
+ const instance = detailRefs.value[idx];
26
+ await instance.copyInfo();
27
+ message.success({
28
+ content: t('common.copySuccess'),
29
+ });
30
+ };
31
+
32
+ const collapseNames = ref([]);
33
+ const i18n = computed(() => {
34
+ return {
35
+ SIG_GROUP: `${ props.groupType === MeetingGroupType.GROUP ? t('meeting.groups') : t('meeting.sigs') }: `,
36
+ NEW_DATE: t('meeting.latestMeeting'),
37
+ EMPTY_TEXT: t('meeting.meetingEmptyText'),
38
+ LEARN_MORE: t('common.seeMore'),
39
+ JOIN_MEETING: t('meeting.joinMeeting'),
40
+ SIGN: t('meeting.sign'),
41
+ DETAILS: t('meeting.detail'),
42
+ };
43
+ });
44
+
45
+ // -------------------- 监听尺寸变化 --------------------
46
+ const meetInfoRef = ref();
47
+ const resizeObserver = new ResizeObserver((entries) => {
48
+ for (let entry of entries) {
49
+ const { height } = entry.contentRect;
50
+ entry.target.classList.remove('hidden-divider');
51
+ if (height >= 30) {
52
+ entry.target.classList.add('hidden-divider');
53
+ }
54
+ }
55
+ });
56
+
57
+ watch(
58
+ () => props.list,
59
+ () => {
60
+ if (props.list.length === 1) {
61
+ collapseNames.value = [props.list[0].id];
62
+ } else {
63
+ collapseNames.value = [];
64
+ }
65
+ nextTick(() => {
66
+ meetInfoRef.value?.forEach((targetDiv) => {
67
+ resizeObserver.observe(targetDiv);
68
+ });
69
+ });
70
+ },
71
+ );
72
+
73
+ const computedList = computed(() => {
74
+ return props.list.map((v) => {
75
+ const type = v.type;
76
+ let dateRange = '';
77
+ if (type !== 'meeting') {
78
+ let activity_type = activityTypeMap.value.get(v.activity_type)?.label;
79
+ if (v.start && v.end) {
80
+ if (v.end_date === v.start_date) {
81
+ dateRange = `${ formatDate(v.start_date) } ${ v.start }-${ v.end }`;
82
+ } else {
83
+ dateRange = `${ formatDate(v.start_date) } ${ v.start }-${ formatDate(v.end_date) } ${ v.end }`;
84
+ }
85
+ } else {
86
+ dateRange = `${ formatDate(v.start_date, 'YYYY/MM/DD HH:mm') } ${ formatDate(v.end_date, 'YYYY/MM/DD HH:mm') }`;
87
+ }
88
+
89
+ return {
90
+ ...v,
91
+ activity_type,
92
+ dateRange,
93
+ };
94
+ }
95
+ const {
96
+ is_cycle,
97
+ date,
98
+ start,
99
+ end,
100
+ cycle_start_date,
101
+ cycle_end_date,
102
+ cycle_start,
103
+ cycle_end,
104
+ cycle_type,
105
+ cycle_interval,
106
+ cycle_point,
107
+ } = v;
108
+ dateRange = `${ formatDate(date) } ${ start } - ${ end }`;
109
+ if (is_cycle) {
110
+ dateRange = `${ formatDate(cycle_start_date) } - ${ formatDate(cycle_end_date) }`;
111
+ }
112
+
113
+ let timeRange = `${ start } - ${ end }`;
114
+ let replay_url = null;
115
+ let hasObsData = false;
116
+ const obsData = v.obs_data?.filter((v) => v.text_video_url) || [];
117
+
118
+ if (is_cycle) {
119
+ let cycleType = '';
120
+ if (cycle_type === INTERVAL_DAY) {
121
+ cycleType = t('meeting.cycleDay');
122
+ }
123
+ if (cycle_type === INTERVAL_WEEK) {
124
+ if (cycle_interval > 1) {
125
+ cycleType = t('meeting.cycleWeek.other', [getPointStr(cycle_type, cycle_point), cycle_interval]);
126
+ } else {
127
+ cycleType = t('meeting.cycleWeek.one', [getPointStr(cycle_type, cycle_point)]);
128
+ }
129
+ }
130
+ if (cycle_type === INTERVAL_MONTH) {
131
+ cycleType = t('meeting.cycleMonth', [getPointStr(cycle_type, cycle_point)]);
132
+ }
133
+ timeRange = t('meeting.cycleMeetingText2', {
134
+ startDate: cycle_start_date,
135
+ endDate: cycle_end_date,
136
+ startTime: cycle_start,
137
+ endTime: cycle_end,
138
+ cycleType,
139
+ });
140
+ hasObsData = obsData.some((t) => t.sub_id === v.cycle_sub.find((z) => z.date === date)?.sub_id);
141
+ } else {
142
+ hasObsData = obsData.length > 0;
143
+ }
144
+ if (hasObsData) {
145
+ replay_url = `${ location.origin }/${ locale.value }/video/${ v.group_name }/${ v.mid }/${ date }`;
146
+ }
147
+
148
+ return {
149
+ ...v,
150
+ dateRange,
151
+ timeRange,
152
+ replay_url,
153
+ };
154
+ });
155
+ });
156
+ </script>
157
+
158
+ <template>
159
+ <div class="o-meeting-calendar-list" :class="!computedList?.length ? 'is-empty':''">
160
+ <slot name="empty" v-if="!computedList?.length"></slot>
161
+ <OCollapse v-else v-model="collapseNames" :style="{ '--collapse-padding': '0' }">
162
+ <OCollapseItem v-for="(item, index) in computedList" :key="item.id" :value="item.id">
163
+ <template #title>
164
+ <div class="meet-title-left">
165
+ <div class="meet-title" :title="item.topic || item.name">
166
+ <OIcon
167
+ :style="{
168
+ backgroundColor: `${getConfig(item.type, 'color')}`
169
+ }"
170
+ >
171
+ <component :is="getConfig(item.type, 'icon')" />
172
+ </OIcon>
173
+ <div class="text">
174
+ {{ item.topic || item.name || item.title }}
175
+ </div>
176
+ <div class="tag-wrapper" v-if="item.is_cycle">
177
+ <OTag color="primary" variant="outline">{{ t('meeting.cycle') }}</OTag>
178
+ </div>
179
+ </div>
180
+ <div class="meet-info" ref="meetInfoRef">
181
+ <span class="start-time">
182
+ <span>{{ item.dateRange }}</span>
183
+ </span>
184
+ <ODivider direction="v" />
185
+ <div>
186
+ <template v-if="item.group_name">{{ i18n.SIG_GROUP }} {{ item.group_name }}</template>
187
+ <template v-if="item.activity_type">{{ item.activity_type }}</template>
188
+ </div>
189
+ </div>
190
+ <OLink v-if="item.url" :href="item.url" target="_blank" class="jump-detail-link">
191
+ <span>{{ i18n.LEARN_MORE }}</span>
192
+ <template #suffix>
193
+ <OIcon>
194
+ <IconChevronRight />
195
+ </OIcon>
196
+ </template>
197
+ </OLink>
198
+ <OLink v-if="item.join_url" :href="item.join_url" target="_blank" class="jump-detail-link">
199
+ <span>{{ i18n.JOIN_MEETING }}</span>
200
+ <template #suffix>
201
+ <OIcon>
202
+ <IconChevronRight />
203
+ </OIcon>
204
+ </template>
205
+ </OLink>
206
+ <OLink v-if="item.content_url" :href="item.content_url" target="_blank" class="jump-detail-link">
207
+ <span>{{ i18n.DETAILS }}</span>
208
+ <template #suffix>
209
+ <OIcon>
210
+ <IconChevronRight />
211
+ </OIcon>
212
+ </template>
213
+ </OLink>
214
+ <OLink v-if="item.register_url" :href="item.register_url" target="_blank" class="jump-detail-link">
215
+ <span>{{ i18n.SIGN }}</span>
216
+ <template #suffix>
217
+ <OIcon>
218
+ <IconChevronRight />
219
+ </OIcon>
220
+ </template>
221
+ </OLink>
222
+ </div>
223
+ <OIcon @click.stop="() => copyInfo(index)" class="copy-icon">
224
+ <IconCopy />
225
+ </OIcon>
226
+ </template>
227
+ <div class="calendar-info">
228
+ <OMeetingDetail
229
+ :show="collapseNames.includes(item.id)" :data="item"
230
+ :ref="(insRef) => (detailRefs[index] = insRef)"
231
+ from="home"
232
+ />
233
+ </div>
234
+ </OCollapseItem>
235
+ </OCollapse>
236
+ </div>
237
+ </template>
238
+
239
+ <style lang="scss">
240
+ .o-meeting-calendar-list {
241
+
242
+
243
+ &.is-empty {
244
+ height: 100%;
245
+ display: flex;
246
+ align-items: center;
247
+ justify-content: center;
248
+ }
249
+
250
+
251
+ .o-collapse {
252
+ --icon-size2: 24px;
253
+ --icon-right: 12px;
254
+ @include respond-to('<=pad') {
255
+ --icon-size2: 20px;
256
+ }
257
+ @include respond-to('<=pad_v') {
258
+ --icon-right: 8px;
259
+ }
260
+ @include respond-to('phone') {
261
+ --icon-right: 4px;
262
+ }
263
+
264
+ .o-collapse-item {
265
+ position: relative;
266
+ border-top: none;
267
+
268
+ &::after {
269
+ position: absolute;
270
+ content: '';
271
+ bottom: 0;
272
+ left: 50%;
273
+ transform: translateX(-50%);
274
+ width: calc(100% - 2 * 24px);
275
+ height: 1px;
276
+ background-color: var(--collapse-division-color);
277
+ }
278
+
279
+ &:last-child::after {
280
+ display: none;
281
+ }
282
+
283
+ @include hover {
284
+ .text {
285
+ color: var(--o-color-primary1);
286
+ }
287
+ }
288
+ @include respond-to('<=pad_v') {
289
+ &::after {
290
+ width: calc(100% - 2 * 16px);
291
+ }
292
+ &:last-child {
293
+ &::after {
294
+ display: none;
295
+ }
296
+ }
297
+ }
298
+
299
+ &.o-collapse-item-expanded {
300
+ .o-collapse-item-header {
301
+ padding-bottom: var(--o-gap-2);
302
+
303
+ .o-collapse-item-title {
304
+ .copy-icon {
305
+ display: inline-flex;
306
+ }
307
+ }
308
+ }
309
+
310
+ }
311
+ }
312
+
313
+ .o-collapse-item-icon {
314
+ height: min-content;
315
+ }
316
+
317
+ .o-collapse-item-header {
318
+ align-items: center;
319
+ padding: var(--o-gap-4) var(--o-gap-5);
320
+ position: relative;
321
+
322
+ @include respond-to('>pad_v') {
323
+ &:hover {
324
+ .o-collapse-item-title {
325
+ .copy-icon {
326
+ display: inline-flex;
327
+ }
328
+ }
329
+ }
330
+ }
331
+ @include respond-to('<=pad_v') {
332
+ padding: 12px 16px;
333
+ }
334
+
335
+ .o-collapse-item-title {
336
+ flex-grow: 1;
337
+ margin-bottom: 0;
338
+ display: flex;
339
+ align-items: center;
340
+ justify-content: center;
341
+ gap: var(--o-gap-4);
342
+ padding-right: var(--o-gap-4);
343
+
344
+ .meet-title-left {
345
+ flex-grow: 1;
346
+ }
347
+
348
+ .copy-icon {
349
+ flex-shrink: 0;
350
+ display: none;
351
+
352
+ &:hover {
353
+ color: var(--o-color-primary1);
354
+ }
355
+
356
+ svg path {
357
+ fill: currentColor;
358
+ }
359
+ }
360
+ }
361
+
362
+
363
+ .o-collapse-item-icon {
364
+ .o-svg-icon {
365
+ &:hover {
366
+ color: var(--o-color-primary1);
367
+ }
368
+ }
369
+ }
370
+
371
+ }
372
+
373
+ .o-collapse-item-body {
374
+ margin-bottom: 0;
375
+ padding: 0 12px 16px 12px;
376
+
377
+ a {
378
+ word-break: break-all;
379
+ }
380
+
381
+ .calendar-info {
382
+ display: flex;
383
+ color: var(--o-color-info3);
384
+ flex-direction: column;
385
+ background-color: color-mix(in srgb, var(--o-color-control2-light) 40%, transparent);
386
+ padding: 16px 16px 16px calc(var(--icon-right) + var(--icon-size2) + var(--o-gap-5) - 12px);
387
+ border-radius: var(--o-radius-xs);
388
+ @include tip1;
389
+
390
+ @include respond-to('<=pad_v') {
391
+ padding: 16px 16px 16px calc(var(--icon-right) + var(--icon-size2) + 16px - 12px);
392
+
393
+ }
394
+ @include respond-to('phone') {
395
+ padding: 12px 16px;
396
+ }
397
+
398
+ .info-item {
399
+ display: flex;
400
+ margin-top: 8px;
401
+
402
+ .item-title {
403
+ min-width: 110px;
404
+ }
405
+ }
406
+
407
+ .info-item:first-child {
408
+ margin-top: 0;
409
+ }
410
+ }
411
+
412
+ }
413
+
414
+ .jump-detail-link {
415
+ padding-left: calc(var(--icon-right) + var(--icon-size2));
416
+ margin-top: var(--o-gap-2);
417
+ color: var(--o-color-info2);
418
+ @include tip1;
419
+
420
+ &:hover {
421
+ color: var(--o-color-primary1);
422
+ }
423
+
424
+ .o-icon {
425
+ font-size: 16px;
426
+
427
+ svg path {
428
+ fill: currentColor;
429
+ }
430
+ }
431
+ }
432
+
433
+ .jump-detail-link + .jump-detail-link {
434
+ padding-left: 24px;
435
+ }
436
+
437
+ .meet-title {
438
+ display: flex;
439
+ align-items: center;
440
+ width: calc(100% - 48px);
441
+ color: var(--o-color-info2);
442
+ @include text2;
443
+
444
+ @include respond-to('<=pad_v') {
445
+ @include h3;
446
+ }
447
+
448
+ .tag-wrapper {
449
+ margin-left: var(--o-gap-2);
450
+
451
+ .o-tag {
452
+ background-color: var(--o-color-control2-light);
453
+ border: none;
454
+ }
455
+ }
456
+
457
+ .o-icon {
458
+ flex-shrink: 0;
459
+ border-radius: 50%;
460
+ overflow: hidden;
461
+ color: var(--o-color-white);
462
+ margin-right: var(--icon-right);
463
+ width: var(--icon-size2);
464
+ height: var(--icon-size2);
465
+ font-size: calc(var(--icon-size2) - 4px);
466
+
467
+ svg path {
468
+ fill: currentColor;
469
+ }
470
+ }
471
+
472
+ .text {
473
+ display: block;
474
+ font-weight: 600;
475
+ @include text-truncate(1);
476
+ }
477
+ }
478
+
479
+ .meet-info {
480
+ margin-left: calc(var(--icon-right) + var(--icon-size2));
481
+ margin-top: var(--o-gap-2);
482
+ display: flex;
483
+ flex-wrap: wrap;
484
+ align-items: center;
485
+ color: var(--o-color-info3);
486
+ text-decoration: none;
487
+ font-weight: 400;
488
+ @include tip1;
489
+
490
+ .o-divider {
491
+ @include tip1;
492
+ }
493
+
494
+ &.hidden-divider {
495
+ .start-time {
496
+ padding-right: 24px;
497
+ }
498
+
499
+ .o-divider {
500
+ display: none;
501
+ }
502
+ }
503
+ }
504
+
505
+
506
+
507
+ }
508
+ }
509
+
510
+ </style>
@@ -0,0 +1,206 @@
1
+ <script setup lang="ts">
2
+ import { OButton } from '@opensig/opendesign';
3
+ import { ElSelect, ElOption } from 'element-plus';
4
+ import { computed, ref, watchEffect } from 'vue';
5
+ import { useI18n } from '@/i18n';
6
+
7
+ const { t } = useI18n();
8
+ const props = withDefaults(
9
+ defineProps<{
10
+ modelValue: number[];
11
+ multiple?: boolean;
12
+ }>(),
13
+ {
14
+ modelValue: () => [],
15
+ multiple: false,
16
+ },
17
+ );
18
+ const emits = defineEmits(['update:modelValue']);
19
+ // 默认31天
20
+ const getList = () => {
21
+ let res = [];
22
+ for (let i = 1; i <= 31; i++) {
23
+ res.push(i);
24
+ }
25
+ return res;
26
+ };
27
+
28
+ const list = computed(() => getList());
29
+ const checked = ref([]);
30
+ const temp = ref([]);
31
+ const selectorRef = ref(null);
32
+
33
+ const init = () => {
34
+ checked.value = [...props.modelValue];
35
+ temp.value = [...props.modelValue];
36
+ };
37
+
38
+ watchEffect(() => {
39
+ init();
40
+ });
41
+
42
+ const confirm = () => {
43
+ emits('update:modelValue', temp.value);
44
+ selectorRef.value.expanded = false;
45
+ };
46
+
47
+ const cancel = () => {
48
+ init();
49
+ selectorRef.value.expanded = false;
50
+ };
51
+
52
+ const clickItem = (val: number) => {
53
+ if (props.multiple) {
54
+ const idx = temp.value.indexOf(val);
55
+ if (idx === -1) {
56
+ temp.value.push(val);
57
+ } else {
58
+ temp.value.splice(idx, 1);
59
+ }
60
+ temp.value.sort();
61
+ } else {
62
+ temp.value = [val];
63
+ confirm();
64
+ }
65
+ };
66
+
67
+ const removeTag = (val: number) => {
68
+ if (props.multiple) {
69
+ clickItem(val);
70
+ } else {
71
+ temp.value = [];
72
+ }
73
+ confirm();
74
+ };
75
+ </script>
76
+
77
+ <template>
78
+ <div class="calendar-selector" :class="!multiple && 'is-single'">
79
+ <ElSelect
80
+ ref="selectorRef"
81
+ popper-class="calendar-selector-popper"
82
+ :placeholder="t('meeting.selectRepeatDate')"
83
+ size="large"
84
+ multiple
85
+ collapseTags
86
+ maxCollapseTags="3"
87
+ :modelValue="checked"
88
+ @remove-tag="removeTag"
89
+ >
90
+ <ElOption
91
+ v-for="t in list"
92
+ :key="t"
93
+ :label="t"
94
+ :value="t"
95
+ @click="clickItem(t)"
96
+ :class="temp.includes(t) && 'is-checked'" />
97
+ <template #footer v-if="multiple">
98
+ <OButton round="pill" color="primary" variant="outline" @click="confirm">{{ t('common.confirm') }}</OButton>
99
+ <OButton variant="text" @click="cancel">{{ t('common.cancel') }}</OButton>
100
+ </template>
101
+ </ElSelect>
102
+ </div>
103
+ </template>
104
+
105
+ <style scoped lang="scss">
106
+ .calendar-selector {
107
+ width: 100%;
108
+
109
+ :deep(.el-select) {
110
+ .el-select__placeholder {
111
+ @include text1;
112
+ }
113
+
114
+ .el-select__icon {
115
+ height: 24px;
116
+ font-size: 24px;
117
+ margin-right: 2px;
118
+ color: var(--o-color-info1);
119
+ background-color: var(--o-color-info2);
120
+ mask: url(@/assets/meeting/svg-icons/icon-calendar.svg) no-repeat center;
121
+ background-size: 24px;
122
+ background-repeat: no-repeat;
123
+ background-position: center center;
124
+ transform: rotateZ(0deg);
125
+
126
+ svg {
127
+ display: none;
128
+ }
129
+ }
130
+ }
131
+
132
+ &.is-single {
133
+ :deep(.el-select) {
134
+ .el-select__selection {
135
+ margin-left: 0;
136
+ }
137
+
138
+ .el-tag {
139
+ padding: 0;
140
+ background-color: transparent;
141
+ color: var(--o-color-info1);
142
+ @include text1;
143
+
144
+ .el-tag__close {
145
+ display: none;
146
+ }
147
+ }
148
+ }
149
+ }
150
+ }
151
+ </style>
152
+ <style lang="scss">
153
+ .calendar-selector-popper {
154
+ padding: 0 24px;
155
+
156
+ .el-select-dropdown__list {
157
+ padding: 16px 0;
158
+ display: flex;
159
+ gap: 12px 8px;
160
+ flex-wrap: wrap;
161
+ width: 272px;
162
+
163
+ .el-select-dropdown__item {
164
+ padding: 0;
165
+ width: 32px;
166
+ height: 24px;
167
+ display: flex;
168
+ align-items: center;
169
+ justify-content: center;
170
+ background-color: var(--o-color-fill2);
171
+ color: var(--o-color-info1);
172
+ border-radius: var(--o-radius-xs);
173
+
174
+ &:hover,
175
+ &.is-checked {
176
+ background-color: var(--o-color-primary1);
177
+ color: #fff;
178
+ font-weight: inherit;
179
+ }
180
+
181
+ &.is-selected {
182
+ font-weight: inherit;
183
+
184
+ &::after {
185
+ content: none;
186
+ }
187
+ }
188
+ }
189
+ }
190
+
191
+ .el-select-dropdown__footer {
192
+ padding: 16px 0;
193
+ display: flex;
194
+ align-items: center;
195
+ justify-content: space-between;
196
+
197
+ .o-btn {
198
+ min-width: fit-content;
199
+
200
+ &:last-child {
201
+ padding: 0;
202
+ }
203
+ }
204
+ }
205
+ }
206
+ </style>