@opendesign-plus-test/components 0.0.1-rc.35 → 0.0.1-rc.36

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 (47) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -1
  2. package/dist/chunk-OElCookieNotice.es.js +42 -42
  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 +35 -35
  14. package/dist/components.css +1 -1
  15. package/dist/components.es.js +8401 -8645
  16. package/package.json +2 -2
  17. package/src/components/OHeaderUser.vue +4 -4
  18. package/src/components/OSourceCode.vue +1 -1
  19. package/src/components/activity/OActivityForm.vue +2 -2
  20. package/src/components/activity/OMyActivityCalendar.vue +8 -8
  21. package/src/components/activity/composables/useActivityConfig.ts +142 -140
  22. package/src/components/header/OHeader.vue +6 -24
  23. package/src/components/header/OHeaderMobile.vue +177 -0
  24. package/src/components/header/components/HeaderContent.vue +190 -11
  25. package/src/components/header/components/HeaderNav.vue +3 -5
  26. package/src/components/header/components/HeaderNavMobile.vue +377 -0
  27. package/src/components/header/index.ts +5 -5
  28. package/src/components/header/types.ts +91 -0
  29. package/src/components/meeting/OMeetingCalendar.vue +34 -36
  30. package/src/components/meeting/OMyMeetingCalendar.vue +5 -1
  31. package/src/components/meeting/OSigMeetingCalendar.vue +2 -1
  32. package/src/components/meeting/components/OMeetingCalendarList.vue +21 -29
  33. package/src/components/meeting/components/OMeetingDetail.vue +4 -4
  34. package/src/components/meeting/components/OSigMeetingAside.vue +1 -0
  35. package/src/components/meeting/composables/useMeetingConfig.ts +0 -3
  36. package/src/components/meeting/config.ts +58 -58
  37. package/src/components/meeting/index.ts +1 -1
  38. package/src/components/meeting/types.ts +1 -0
  39. package/src/components/meeting/utils.ts +69 -69
  40. package/src/i18n/en.ts +3 -3
  41. package/src/i18n/zh.ts +2 -2
  42. package/dist/components/header/OHeaderMoblie.vue.d.ts +0 -33
  43. package/dist/components/header/components/HeaderNavMoblie.vue.d.ts +0 -17
  44. package/dist/components/header/components/HeaderUbmcNav.vue.d.ts +0 -2
  45. package/src/components/header/OHeaderMoblie.vue +0 -152
  46. package/src/components/header/components/HeaderNavMoblie.vue +0 -346
  47. package/src/components/header/components/HeaderUbmcNav.vue +0 -540
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendesign-plus-test/components",
3
- "version": "0.0.1-rc.35",
3
+ "version": "0.0.1-rc.36",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -33,7 +33,7 @@
33
33
  "video.js": "^8.23.7",
34
34
  "vue-dompurify-html": "^3.1.2",
35
35
  "@opendesign-plus/styles": "0.0.1-rc.2",
36
- "@opendesign-plus/composables": "0.0.1-rc.6"
36
+ "@opendesign-plus/composables": "npm:@opendesign-plus-test/composables@0.0.1-rc.5"
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" />
@@ -306,7 +306,7 @@ const confirm = async (val: boolean) => {
306
306
  await props.creatActivity?.(form.value);
307
307
  }
308
308
  message.success({
309
- content: t('meeting.activityActionSuccess', [form.value.title, type.toLowerCase]),
309
+ content: t('meeting.activityActionSuccess', [form.value.title, type.toLowerCase()]),
310
310
  });
311
311
  close();
312
312
  emits('confirm');
@@ -315,7 +315,7 @@ const confirm = async (val: boolean) => {
315
315
  form.value.start_date = `${ form.value.start_date } ${ form.value.start }`;
316
316
  form.value.end_date = `${ form.value.end_date } ${ form.value.end }`;
317
317
  message.danger({
318
- content: t('meeting.activityActionFail', [form.value.title, type.toLowerCase]),
318
+ content: t('meeting.activityActionFail', [form.value.title, type.toLowerCase()]),
319
319
  });
320
320
  } finally {
321
321
  loading.value = false;
@@ -312,7 +312,7 @@ const confirm = () => {
312
312
  return;
313
313
  }
314
314
  dialogLoading.value = true;
315
- props.revokeActivityRequest(currentRow.value?.id)
315
+ props.revokeActivityRequest(currentRow.value?.id)
316
316
  .then(() => {
317
317
  message.success({
318
318
  content: t('meeting.revokeActivitySuccess', [currentRow.value.title]),
@@ -324,7 +324,7 @@ props.revokeActivityRequest(currentRow.value?.id)
324
324
  message.danger({
325
325
  content: t('meeting.revokeActivityFail', [currentRow.value.title]),
326
326
  });
327
- })
327
+ })
328
328
  .finally(() => {
329
329
  revokeVisible.value = false;
330
330
  dialogLoading.value = false;
@@ -372,7 +372,7 @@ const handleSubmitReviewItem = (val: ActivityItemT) => {
372
372
  approver,
373
373
  is_publish: 'true',
374
374
  } as ParamsItemT;
375
- props.editActivityRequest(val.id, params)
375
+ props.editActivityRequest(val.id, params)
376
376
  .then(() => {
377
377
  message.success({
378
378
  content: t('meeting.submitReviewSuccess', [val.title]),
@@ -386,7 +386,7 @@ props.editActivityRequest(val.id, params)
386
386
  });
387
387
  });
388
388
  };
389
- // 删除活动
389
+ // 删除活动
390
390
  const deleteVisible = ref(false);
391
391
  const handleDeleteItem = (val: ActivityItemT) => {
392
392
  currentRow.value = val;
@@ -397,7 +397,7 @@ const confirmDelete = () => {
397
397
  return;
398
398
  }
399
399
  dialogLoading.value = true;
400
- props.deleteActivityRequest(currentRow.value?.id)
400
+ props.deleteActivityRequest(currentRow.value?.id)
401
401
  .then(() => {
402
402
  message.success({
403
403
  content: t('meeting.deleteActivitySuccess', [currentRow.value.title]),
@@ -414,7 +414,7 @@ props.deleteActivityRequest(currentRow.value?.id)
414
414
  deleteVisible.value = false;
415
415
  dialogLoading.value = false;
416
416
  });
417
- };
417
+ };
418
418
  const cancelDelete = () => {
419
419
  deleteVisible.value = false;
420
420
  };
@@ -719,7 +719,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
719
719
  </div>
720
720
  </div>
721
721
  </div>
722
- <!-- 撤销审核弹窗 -->
722
+ <!-- 撤销审核弹窗 -->
723
723
  <ODialog v-model:visible="revokeVisible" main-class="handle-dialog-active" :actions="revokeActions">
724
724
  <template #header>{{ t('meeting.withdrawReview') }}</template>
725
725
  <div class="dialog-content">{{ t('meeting.confirmRevokeActivity', [currentRow.title]) }}</div>
@@ -729,7 +729,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
729
729
  <template #header>{{ t('meeting.deleteActivity') }}</template>
730
730
  <div class="dialog-content">{{ t('meeting.confirmDeleteActivity', [currentRow.title]) }}</div>
731
731
  </ODialog>
732
- </template>
732
+ </template>
733
733
 
734
734
  <style lang="scss">
735
735
 
@@ -1,141 +1,143 @@
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, watch } from 'vue';
2
+ import { useI18n } from '@/i18n';
3
+
4
+ export const useActivityConfig = () => {
5
+ const { t, locale } = useI18n();
6
+ watch(() => locale.value, () => {
7
+ console.log(locale.value);
8
+ });
9
+ const activityTypeMap = computed(() => new Map([
10
+ [
11
+ 1,
12
+ {
13
+ label: t('meeting.offline'),
14
+ value: 1,
15
+ },
16
+ ],
17
+ [
18
+ 2,
19
+ {
20
+ label: t('meeting.online'),
21
+ value: 2,
22
+ },
23
+ ],
24
+ [
25
+ 3,
26
+ {
27
+ label: t('meeting.onlineOffline'),
28
+ value: 3,
29
+ },
30
+ ],
31
+ ]));
32
+
33
+ const statusMap = computed(() => new Map([
34
+ [
35
+ 1,
36
+ {
37
+ id: 'draft',
38
+ label: t('meeting.statusDraft'),
39
+ text: t('meeting.statusDraft'),
40
+ value: 1,
41
+ },
42
+ ],
43
+ [
44
+ 2,
45
+ {
46
+ id: 'under-review',
47
+ label: t('meeting.statusUnderReview'),
48
+ text: t('meeting.statusPending'),
49
+ value: 2,
50
+ },
51
+ ],
52
+ [
53
+ 3,
54
+ {
55
+ id: 'registration',
56
+ label: t('meeting.statusRegistering'),
57
+ text: t('meeting.statusApproved'),
58
+ value: 3,
59
+ },
60
+ ],
61
+ [
62
+ 4,
63
+ {
64
+ id: 'in-progress',
65
+ label: t('meeting.statusInProgress'),
66
+ text: t('meeting.statusApproved'),
67
+ value: 4,
68
+ },
69
+ ],
70
+ [
71
+ 5,
72
+ {
73
+ id: 'ended',
74
+ label: t('meeting.statusEnded'),
75
+ text: t('meeting.statusEnded'),
76
+ value: 5,
77
+ },
78
+ ],
79
+ [
80
+ 6,
81
+ {
82
+ id: 'modified',
83
+ label: t('meeting.statusModified'),
84
+ text: t('meeting.statusModified'),
85
+ value: 6,
86
+ },
87
+ ],
88
+ [
89
+ 7,
90
+ {
91
+ id: 'reject',
92
+ label: t('meeting.statusRejected'),
93
+ text: t('meeting.statusRejected'),
94
+ value: 7,
95
+ },
96
+ ],
97
+ ]));
98
+
99
+ const approvalStatusMap = computed(() => new Map([
100
+ [
101
+ 'all',
102
+ {
103
+ label: t('common.all'),
104
+ value: 'all',
105
+ },
106
+ ],
107
+ [
108
+ 'rejected',
109
+ {
110
+ label: t('meeting.statusRejected'),
111
+ value: 'rejected',
112
+ },
113
+ ],
114
+ [
115
+ 'approved',
116
+ {
117
+ label: t('meeting.statusApproved'),
118
+ value: 'approved',
119
+ },
120
+ ],
121
+ [
122
+ 'publish',
123
+ {
124
+ label: t('meeting.statusPending'),
125
+ value: 'publish',
126
+ },
127
+ ],
128
+ [
129
+ 'cancel',
130
+ {
131
+ label: t('meeting.statusCanceled'),
132
+ value: 'cancel',
133
+ },
134
+ ],
135
+ ]));
136
+
137
+ return {
138
+ t,
139
+ activityTypeMap,
140
+ statusMap,
141
+ approvalStatusMap,
142
+ };
141
143
  };
@@ -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;