@opendesign-plus/components 0.0.1-rc.18 → 0.0.1-rc.19

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 (49) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -1
  2. package/dist/chunk-OElCookieNotice.es.js +2 -2
  3. package/dist/components/OHeaderUser.vue.d.ts +2 -0
  4. package/dist/components/header/OHeader.vue.d.ts +8 -2
  5. package/dist/components/header/OHeaderMobile.vue.d.ts +171 -0
  6. package/dist/components/header/components/HeaderContent.vue.d.ts +8 -1
  7. package/dist/components/header/components/HeaderNav.vue.d.ts +13 -1
  8. package/dist/components/header/components/HeaderNavMobile.vue.d.ts +33 -0
  9. package/dist/components/header/index.d.ts +128 -5
  10. package/dist/components/header/types.d.ts +80 -0
  11. package/dist/components/meeting/OMeetingCalendar.vue.d.ts +1 -0
  12. package/dist/components/meeting/types.d.ts +1 -0
  13. package/dist/components.cjs.js +36 -36
  14. package/dist/components.css +1 -1
  15. package/dist/components.es.js +8683 -8955
  16. package/package.json +3 -3
  17. package/src/components/OHeaderUser.vue +4 -4
  18. package/src/components/OSourceCode.vue +1 -1
  19. package/src/components/activity/OActivityApproval.vue +3 -10
  20. package/src/components/activity/OActivityForm.vue +1 -8
  21. package/src/components/activity/OMyActivityCalendar.vue +0 -15
  22. package/src/components/activity/composables/useActivityConfig.ts +140 -140
  23. package/src/components/events/OEventsApply.vue +1 -2
  24. package/src/components/events/OEventsCalendar.vue +10 -0
  25. package/src/components/header/OHeader.vue +6 -24
  26. package/src/components/header/OHeaderMobile.vue +177 -0
  27. package/src/components/header/components/HeaderContent.vue +190 -11
  28. package/src/components/header/components/HeaderNav.vue +3 -5
  29. package/src/components/header/components/HeaderNavMobile.vue +377 -0
  30. package/src/components/header/index.ts +5 -5
  31. package/src/components/header/types.ts +91 -0
  32. package/src/components/meeting/OMeetingCalendar.vue +35 -37
  33. package/src/components/meeting/OMyMeetingCalendar.vue +5 -1
  34. package/src/components/meeting/OSigMeetingCalendar.vue +2 -1
  35. package/src/components/meeting/components/OMeetingCalendarList.vue +21 -29
  36. package/src/components/meeting/components/OMeetingDetail.vue +2 -2
  37. package/src/components/meeting/components/OSigMeetingAside.vue +1 -0
  38. package/src/components/meeting/composables/useMeetingConfig.ts +0 -3
  39. package/src/components/meeting/config.ts +58 -58
  40. package/src/components/meeting/index.ts +1 -1
  41. package/src/components/meeting/types.ts +1 -0
  42. package/src/components/meeting/utils.ts +69 -69
  43. package/src/i18n/en.ts +2 -2
  44. package/dist/components/header/OHeaderMoblie.vue.d.ts +0 -33
  45. package/dist/components/header/components/HeaderNavMoblie.vue.d.ts +0 -17
  46. package/dist/components/header/components/HeaderUbmcNav.vue.d.ts +0 -2
  47. package/src/components/header/OHeaderMoblie.vue +0 -152
  48. package/src/components/header/components/HeaderNavMoblie.vue +0 -346
  49. package/src/components/header/components/HeaderUbmcNav.vue +0 -540
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendesign-plus/components",
3
- "version": "0.0.1-rc.18",
3
+ "version": "0.0.1-rc.19",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -32,8 +32,8 @@
32
32
  "dayjs": "^1.11.13",
33
33
  "video.js": "^8.23.7",
34
34
  "vue-dompurify-html": "^3.1.2",
35
- "@opendesign-plus/styles": "0.0.1-rc.2",
36
- "@opendesign-plus/composables": "0.0.1-rc.6"
35
+ "@opendesign-plus/composables": "0.0.1-rc.6",
36
+ "@opendesign-plus/styles": "0.0.1-rc.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@vitejs/plugin-vue": "^5.1.0",
@@ -31,6 +31,7 @@ interface UserPropsT {
31
31
  noticeTotal?: number;
32
32
  userInfo?: UserInfoT;
33
33
  options?: OptionsItemT[];
34
+ customSize?: number;
34
35
  }
35
36
 
36
37
  withDefaults(defineProps<UserPropsT>(), {
@@ -39,6 +40,7 @@ withDefaults(defineProps<UserPropsT>(), {
39
40
  noticeTotal: undefined,
40
41
  userInfo: undefined,
41
42
  options: undefined,
43
+ customSize: undefined,
42
44
  });
43
45
 
44
46
  export interface OHeaderUserEmitsT {
@@ -79,7 +81,7 @@ const jumpToPage = (val: any) => {
79
81
  >
80
82
  <div class="info-wrap hover-icon-rotate">
81
83
  <OBadge :value="noticeTotal" :dot="true" color="danger" class="header-message user-avatar" :class="{ 'notice-not': !noticeTotal }">
82
- <AppAvatar :avatar="userInfo.photo" :name="userInfo.username" :custom-size="20" />
84
+ <AppAvatar :avatar="userInfo.photo" :name="userInfo.username" :custom-size="customSize" />
83
85
  </OBadge>
84
86
  <p class="user-account">{{ userInfo.username }}</p>
85
87
  <OIcon class="icon">
@@ -194,7 +196,7 @@ const jumpToPage = (val: any) => {
194
196
 
195
197
  <style lang="scss">
196
198
  .user-dropdown {
197
- --dropdown-list-radius: var(--o-radius-m);
199
+ --dropdown-list-radius: var(--o-radius-xs);
198
200
  }
199
201
  .avatar-icon {
200
202
  font-size: 24px;
@@ -207,8 +209,6 @@ const jumpToPage = (val: any) => {
207
209
  }
208
210
  @include respond-to('<=pad_v') {
209
211
  .user-dropdown {
210
- --dropdown-list-radius: 8px;
211
-
212
212
  .o-divider {
213
213
  display: none;
214
214
  }
@@ -38,7 +38,7 @@ const visibleChange = (val: boolean) => {
38
38
 
39
39
  <template>
40
40
  <div class="source-code">
41
- <div v-if="url" class="info-wrap">
41
+ <div v-if="url" class="info-wrap" @click="itemChange({ url: url })">
42
42
  <span class="title">{{ title }}</span>
43
43
  <OIcon v-if="icon">
44
44
  <component :is="icon" class="icon" />
@@ -39,7 +39,7 @@ const params = reactive<ReviewParamsT>({
39
39
  });
40
40
 
41
41
  // -------------------- 申请人 --------------------
42
- const applicantValue = ref('');
42
+ const applicantValue = ref<string[]>([]);
43
43
  const applicantOptions = computed(() => props.applicantList.map(v => ({ value: v, label: v })));
44
44
 
45
45
  const filterApplicantList = () => {
@@ -140,7 +140,6 @@ const confirm = async () => {
140
140
  if (!props.approveActivityRequest || !props.rejectActivityRequest) {
141
141
  return;
142
142
  }
143
- const msg = reviewStatus.value === 1 ? t('meeting.approveReview') : t('meeting.rejectReview');
144
143
  try {
145
144
  loading.value = true;
146
145
  const valid = await formRef.value?.validate();
@@ -158,12 +157,9 @@ const confirm = async () => {
158
157
  message.success({
159
158
  content: t('meeting.reviewSuccess', [currentRow.value?.title]),
160
159
  });
161
- } catch {
160
+ } finally {
162
161
  reviewVisible.value = false;
163
162
  loading.value = false;
164
- message.danger({
165
- content: t('meeting.reviewFail', [currentRow.value?.title]),
166
- });
167
163
  }
168
164
  };
169
165
  const cancel = () => {
@@ -187,12 +183,9 @@ const confirmCancel = async () => {
187
183
  message.success({
188
184
  content: t('meeting.activityActionSuccess', [currentRow.value?.title, cancelText.value]),
189
185
  });
190
- } catch (err) {
186
+ } finally {
191
187
  loading.value = false;
192
188
  cancelVisible.value = false;
193
- message.danger({
194
- content: t('meeting.activityActionFail', [currentRow.value?.title, cancelText.value]),
195
- });
196
189
  }
197
190
  }
198
191
  };
@@ -310,13 +310,6 @@ const confirm = async (val: boolean) => {
310
310
  });
311
311
  close();
312
312
  emits('confirm');
313
- } catch {
314
- loading.value = false;
315
- form.value.start_date = `${ form.value.start_date } ${ form.value.start }`;
316
- form.value.end_date = `${ form.value.end_date } ${ form.value.end }`;
317
- message.danger({
318
- content: t('meeting.activityActionFail', [form.value.title, type.toLowerCase()]),
319
- });
320
313
  } finally {
321
314
  loading.value = false;
322
315
  }
@@ -514,7 +507,7 @@ defineExpose({
514
507
  }
515
508
 
516
509
  .o-form-item-label {
517
- flex: 0 0 80px;
510
+ flex: 0 0 88px;
518
511
  }
519
512
  }
520
513
  }
@@ -320,11 +320,6 @@ const confirm = () => {
320
320
  reloadAll.value = true;
321
321
  getList();
322
322
  })
323
- .catch(() => {
324
- message.danger({
325
- content: t('meeting.revokeActivityFail', [currentRow.value.title]),
326
- });
327
- })
328
323
  .finally(() => {
329
324
  revokeVisible.value = false;
330
325
  dialogLoading.value = false;
@@ -380,11 +375,6 @@ const handleSubmitReviewItem = (val: ActivityItemT) => {
380
375
  reloadAll.value = true;
381
376
  getList();
382
377
  })
383
- .catch(() => {
384
- message.danger({
385
- content: t('meeting.submitReviewFail', [val.title]),
386
- });
387
- });
388
378
  };
389
379
  // 删除活动
390
380
  const deleteVisible = ref(false);
@@ -405,11 +395,6 @@ const confirmDelete = () => {
405
395
  reloadAll.value = true;
406
396
  getList();
407
397
  })
408
- .catch(() => {
409
- message.danger({
410
- content: t('meeting.deleteActivityFail', [currentRow.value.title]),
411
- });
412
- })
413
398
  .finally(() => {
414
399
  deleteVisible.value = false;
415
400
  dialogLoading.value = false;
@@ -1,141 +1,141 @@
1
- import { computed } from 'vue';
2
- import { useI18n } from '@/i18n';
3
-
4
- export const useActivityConfig = () => {
5
- const { t } = useI18n();
6
-
7
- const activityTypeMap = computed(() => new Map([
8
- [
9
- 1,
10
- {
11
- label: t('meeting.offline'),
12
- value: 1,
13
- },
14
- ],
15
- [
16
- 2,
17
- {
18
- label: t('meeting.online'),
19
- value: 2,
20
- },
21
- ],
22
- [
23
- 3,
24
- {
25
- label: t('meeting.onlineOffline'),
26
- value: 3,
27
- },
28
- ],
29
- ]));
30
-
31
- const statusMap = computed(() => new Map([
32
- [
33
- 1,
34
- {
35
- id: 'draft',
36
- label: t('meeting.statusDraft'),
37
- text: t('meeting.statusDraft'),
38
- value: 1,
39
- },
40
- ],
41
- [
42
- 2,
43
- {
44
- id: 'under-review',
45
- label: t('meeting.statusUnderReview'),
46
- text: t('meeting.statusPending'),
47
- value: 2,
48
- },
49
- ],
50
- [
51
- 3,
52
- {
53
- id: 'registration',
54
- label: t('meeting.statusRegistering'),
55
- text: t('meeting.statusApproved'),
56
- value: 3,
57
- },
58
- ],
59
- [
60
- 4,
61
- {
62
- id: 'in-progress',
63
- label: t('meeting.statusInProgress'),
64
- text: t('meeting.statusApproved'),
65
- value: 4,
66
- },
67
- ],
68
- [
69
- 5,
70
- {
71
- id: 'ended',
72
- label: t('meeting.statusEnded'),
73
- text: t('meeting.statusEnded'),
74
- value: 5,
75
- },
76
- ],
77
- [
78
- 6,
79
- {
80
- id: 'modified',
81
- label: t('meeting.statusModified'),
82
- text: t('meeting.statusModified'),
83
- value: 6,
84
- },
85
- ],
86
- [
87
- 7,
88
- {
89
- id: 'reject',
90
- label: t('meeting.statusRejected'),
91
- text: t('meeting.statusRejected'),
92
- value: 7,
93
- },
94
- ],
95
- ]));
96
-
97
- const approvalStatusMap = computed(() => new Map([
98
- [
99
- 'all',
100
- {
101
- label: t('common.all'),
102
- value: 'all',
103
- },
104
- ],
105
- [
106
- 'rejected',
107
- {
108
- label: t('meeting.statusRejected'),
109
- value: 'rejected',
110
- },
111
- ],
112
- [
113
- 'approved',
114
- {
115
- label: t('meeting.statusApproved'),
116
- value: 'approved',
117
- },
118
- ],
119
- [
120
- 'publish',
121
- {
122
- label: t('meeting.statusPending'),
123
- value: 'publish',
124
- },
125
- ],
126
- [
127
- 'cancel',
128
- {
129
- label: t('meeting.statusCanceled'),
130
- value: 'cancel',
131
- },
132
- ],
133
- ]));
134
-
135
- return {
136
- t,
137
- activityTypeMap,
138
- statusMap,
139
- approvalStatusMap,
140
- };
1
+ import { computed } from 'vue';
2
+ import { useI18n } from '@/i18n';
3
+
4
+ export const useActivityConfig = () => {
5
+ const { t } = useI18n();
6
+
7
+ const activityTypeMap = computed(() => new Map([
8
+ [
9
+ 1,
10
+ {
11
+ label: t('meeting.offline'),
12
+ value: 1,
13
+ },
14
+ ],
15
+ [
16
+ 2,
17
+ {
18
+ label: t('meeting.online'),
19
+ value: 2,
20
+ },
21
+ ],
22
+ [
23
+ 3,
24
+ {
25
+ label: t('meeting.onlineOffline'),
26
+ value: 3,
27
+ },
28
+ ],
29
+ ]));
30
+
31
+ const statusMap = computed(() => new Map([
32
+ [
33
+ 1,
34
+ {
35
+ id: 'draft',
36
+ label: t('meeting.statusDraft'),
37
+ text: t('meeting.statusDraft'),
38
+ value: 1,
39
+ },
40
+ ],
41
+ [
42
+ 2,
43
+ {
44
+ id: 'under-review',
45
+ label: t('meeting.statusUnderReview'),
46
+ text: t('meeting.statusPending'),
47
+ value: 2,
48
+ },
49
+ ],
50
+ [
51
+ 3,
52
+ {
53
+ id: 'registration',
54
+ label: t('meeting.statusRegistering'),
55
+ text: t('meeting.statusApproved'),
56
+ value: 3,
57
+ },
58
+ ],
59
+ [
60
+ 4,
61
+ {
62
+ id: 'in-progress',
63
+ label: t('meeting.statusInProgress'),
64
+ text: t('meeting.statusApproved'),
65
+ value: 4,
66
+ },
67
+ ],
68
+ [
69
+ 5,
70
+ {
71
+ id: 'ended',
72
+ label: t('meeting.statusEnded'),
73
+ text: t('meeting.statusEnded'),
74
+ value: 5,
75
+ },
76
+ ],
77
+ [
78
+ 6,
79
+ {
80
+ id: 'modified',
81
+ label: t('meeting.statusModified'),
82
+ text: t('meeting.statusModified'),
83
+ value: 6,
84
+ },
85
+ ],
86
+ [
87
+ 7,
88
+ {
89
+ id: 'reject',
90
+ label: t('meeting.statusRejected'),
91
+ text: t('meeting.statusRejected'),
92
+ value: 7,
93
+ },
94
+ ],
95
+ ]));
96
+
97
+ const approvalStatusMap = computed(() => new Map([
98
+ [
99
+ 'all',
100
+ {
101
+ label: t('common.all'),
102
+ value: 'all',
103
+ },
104
+ ],
105
+ [
106
+ 'rejected',
107
+ {
108
+ label: t('meeting.statusRejected'),
109
+ value: 'rejected',
110
+ },
111
+ ],
112
+ [
113
+ 'approved',
114
+ {
115
+ label: t('meeting.statusApproved'),
116
+ value: 'approved',
117
+ },
118
+ ],
119
+ [
120
+ 'publish',
121
+ {
122
+ label: t('meeting.statusPending'),
123
+ value: 'publish',
124
+ },
125
+ ],
126
+ [
127
+ 'cancel',
128
+ {
129
+ label: t('meeting.statusCanceled'),
130
+ value: 'cancel',
131
+ },
132
+ ],
133
+ ]));
134
+
135
+ return {
136
+ t,
137
+ activityTypeMap,
138
+ statusMap,
139
+ approvalStatusMap,
140
+ };
141
141
  };
@@ -121,8 +121,7 @@ defineProps<EventsApplyPropsT>();
121
121
  @include respond-to('<=pad_v') {
122
122
  grid-template-columns: auto 1fr; // 第1列自适应,第2列占满
123
123
  grid-template-rows: auto; // 行数自动
124
- gap: 0 var(--o-gap-3); // 列间距12px,行间距0
125
- row-gap: var(--o-gap-6); // 行间距
124
+ gap: var(--o-gap-3); // 列间距12px,行间距12px
126
125
  }
127
126
 
128
127
  .step-item {
@@ -271,9 +271,13 @@ const getIcon = (item: CalendarItemT) => {
271
271
  .o-collapse-item-header {
272
272
  padding: var(--o-gap-4) var(--o-gap-6);
273
273
  align-items: center;
274
+ @include respond-to('<=pad_v') {
275
+ padding: var(--o-gap-2) var(--o-gap-3);
276
+ }
274
277
 
275
278
  .o-collapse-item-title {
276
279
  flex: 1;
280
+ margin-bottom: 0;
277
281
  }
278
282
  }
279
283
 
@@ -313,6 +317,9 @@ const getIcon = (item: CalendarItemT) => {
313
317
  justify-content: center;
314
318
  margin-right: var(--o-gap-4);
315
319
  background-color: rgb(var(--bg-color));
320
+ @include respond-to('<=pad_v') {
321
+ margin-right: var(--o-gap-2);
322
+ }
316
323
  }
317
324
 
318
325
  .o-icon {
@@ -542,6 +549,9 @@ const getIcon = (item: CalendarItemT) => {
542
549
  color: var(--o-color-info2);
543
550
  font-weight: 400;
544
551
  @include tip1;
552
+ @include respond-to('<=pad_v') {
553
+ @include text2;
554
+ }
545
555
  }
546
556
 
547
557
  .event-item {
@@ -4,7 +4,8 @@ import { ref } from 'vue';
4
4
  import ContentWrapper from '../common/ContentWrapper.vue';
5
5
  import HeaderNav from './components/HeaderNav.vue';
6
6
  import HeaderContent from './components/HeaderContent.vue';
7
- import HeaderUbmcNav from './components/HeaderUbmcNav.vue';
7
+
8
+ import { type NavT } from './types.ts';
8
9
 
9
10
  import { useTheme } from '@opendesign-plus/composables';
10
11
 
@@ -17,16 +18,7 @@ export interface OHeaderT {
17
18
 
18
19
  const emit = defineEmits<OHeaderT>();
19
20
 
20
- const props = defineProps({
21
- logo: undefined,
22
- lang: undefined,
23
- community: undefined,
24
- navData: undefined,
25
- bgLeft: undefined,
26
- bgRight: undefined,
27
- tagMap: undefined,
28
- activeIndex: undefined,
29
- });
21
+ const props = defineProps<NavT>();
30
22
 
31
23
  const hoverIndex = ref();
32
24
  const hoverId = ref();
@@ -69,7 +61,7 @@ const handleMouseleaveSub = (val: string) => {
69
61
  </slot>
70
62
  </div>
71
63
  <!-- nav -->
72
- <div v-if="props.community !== 'openUBMC'" class="header-nav">
64
+ <div class="header-nav">
73
65
  <slot name="nav">
74
66
  <HeaderNav
75
67
  v-if="props.navData"
@@ -82,19 +74,13 @@ const handleMouseleaveSub = (val: string) => {
82
74
  ></HeaderNav>
83
75
  </slot>
84
76
  </div>
85
- <!-- openUBMC nav -->
86
- <div v-if="props.community === 'openUBMC'" class="header-nav-openubmc">
87
- <slot name="nav">
88
- <HeaderUbmcNav v-if="props.navData" :nav-data="props.navData" :has-perm="true" :tag-map="props.tagMap" />
89
- </slot>
90
- </div>
91
77
  <!-- toolbar -->
92
78
  <div v-if="$slots.toolbar" class="header-toolbar">
93
79
  <slot name="toolbar"></slot>
94
80
  </div>
95
81
  </ContentWrapper>
96
82
  </div>
97
- <div v-if="props.community !== 'openUBMC'" class="header-nav-content">
83
+ <div class="header-nav-content">
98
84
  <HeaderContent
99
85
  :itemData="itemData"
100
86
  :item-visible="itemVisible"
@@ -147,13 +133,9 @@ const handleMouseleaveSub = (val: string) => {
147
133
  overflow: hidden;
148
134
  position: relative;
149
135
  }
150
- .header-nav-openubmc {
151
- flex: 1;
152
- height: 100%;
153
- min-width: 0;
154
- }
155
136
  .header-toolbar {
156
137
  height: 100%;
138
+ position: relative;
157
139
  }
158
140
  .header-nav-content {
159
141
  position: fixed;