@opendesign-plus-test/components 0.0.1-rc.26 → 0.0.1-rc.28
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 +269 -197
- package/dist/components/OCookieNotice.vue.d.ts +3 -2
- package/dist/components/OFooter.vue.d.ts +22 -1
- package/dist/components/OHeaderUser.vue.d.ts +0 -2
- package/dist/components/activity/OMyActivityCalendar.vue.d.ts +6 -6
- package/dist/components/activity/index.d.ts +3 -3
- package/dist/components/element-plus/OElCookieNotice.vue.d.ts +6 -3
- package/dist/components/{OHeader.vue.d.ts → header/OHeader.vue.d.ts} +2 -1
- package/dist/components/{OHeaderMoblie.vue.d.ts → header/OHeaderMoblie.vue.d.ts} +2 -2
- package/dist/components/header/components/HeaderContent.vue.d.ts +6 -0
- package/dist/components/header/components/HeaderNav.vue.d.ts +7 -0
- package/dist/components/header/components/HeaderNavMoblie.vue.d.ts +17 -0
- package/dist/components/header/components/HeaderUbmcNav.vue.d.ts +2 -0
- package/dist/components/header/index.d.ts +22 -0
- package/dist/components/meeting/OMeetingCalendar.vue.d.ts +1 -6
- package/dist/components/meeting/OMeetingForm.vue.d.ts +3 -15
- package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +6 -6
- package/dist/components/meeting/types.d.ts +14 -5
- package/dist/components/meeting/utils.d.ts +1 -0
- package/dist/components.cjs.js +46 -46
- package/dist/components.css +1 -1
- package/dist/components.es.js +17909 -17780
- package/dist/index.d.ts +2 -3
- package/package.json +1 -1
- package/src/assets/svg-icons/icon-chevron-down.svg +1 -1
- package/src/components/OCookieNotice.vue +270 -118
- package/src/components/OFooter.vue +11 -1
- package/src/components/OHeaderUser.vue +14 -81
- package/src/components/OSourceCode.vue +1 -1
- package/src/components/activity/OActivityApproval.vue +60 -26
- package/src/components/activity/OActivityForm.vue +2 -5
- package/src/components/activity/OMyActivityCalendar.vue +80 -73
- package/src/components/common/MoreText.vue +3 -2
- package/src/components/common/ThFilter.vue +7 -3
- package/src/components/element-plus/OElCookieNotice.vue +306 -115
- package/src/components/events/OEventsApply.vue +16 -0
- package/src/components/events/OEventsList.vue +3 -0
- package/src/components/header/OHeader.vue +175 -0
- package/src/components/{OHeaderMoblie.vue → header/OHeaderMoblie.vue} +6 -3
- package/src/components/{common/HeaderEulerNav.vue → header/components/HeaderContent.vue} +375 -551
- package/src/components/header/components/HeaderNav.vue +280 -0
- package/src/components/{common → header/components}/HeaderNavMoblie.vue +20 -18
- package/src/components/{common → header/components}/HeaderUbmcNav.vue +6 -63
- package/src/components/header/index.ts +16 -0
- package/src/components/meeting/OMeetingCalendar.vue +19 -12
- package/src/components/meeting/OMeetingForm.vue +20 -27
- package/src/components/meeting/OMeetingPlayback.vue +1 -1
- package/src/components/meeting/OMyMeetingCalendar.vue +36 -36
- package/src/components/meeting/components/OMeetingCalendarList.vue +12 -9
- package/src/components/meeting/components/OMeetingDetail.vue +38 -17
- package/src/components/meeting/types.ts +13 -5
- package/src/components/meeting/utils.ts +18 -1
- package/src/i18n/en.ts +3 -1
- package/src/i18n/zh.ts +4 -2
- package/src/index.ts +2 -5
- package/dist/components/activity/data.d.ts +0 -51
- package/src/components/OHeader.vue +0 -97
- package/src/components/activity/data.ts +0 -365
- package/src/components/meeting/components/OMyCalendarWrapper.vue +0 -160
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, onMounted, onUnmounted, nextTick } from 'vue';
|
|
3
|
+
import { OIcon, OTag } from '@opensig/opendesign';
|
|
4
|
+
|
|
5
|
+
import IconCaretLeft from '~icons/components/icon-caret-left.svg';
|
|
6
|
+
import IconCaretRight from '~icons/components/icon-caret-right.svg';
|
|
7
|
+
|
|
8
|
+
import { useTheme } from '@opendesign-plus/composables';
|
|
9
|
+
|
|
10
|
+
import { useDebounceFn } from '@vueuse/core';
|
|
11
|
+
|
|
12
|
+
export interface OHeaderEmitsT {
|
|
13
|
+
(e: 'handle-mouseenter', val: any): void;
|
|
14
|
+
(e: 'handle-mouseleave', val: any): void;
|
|
15
|
+
(e: 'handle-click', val: any): void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const emit = defineEmits<OHeaderEmitsT>();
|
|
19
|
+
const { isDark } = useTheme();
|
|
20
|
+
|
|
21
|
+
const props = defineProps({
|
|
22
|
+
navData: undefined,
|
|
23
|
+
activeIndex: undefined,
|
|
24
|
+
hoverId: undefined,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const navRef = ref();
|
|
28
|
+
const navListRef = ref();
|
|
29
|
+
const resizeTimer = ref(null);
|
|
30
|
+
const navVisibleRight = ref(false);
|
|
31
|
+
const navVisibleLeft = ref(false);
|
|
32
|
+
|
|
33
|
+
const hoverIndex = ref();
|
|
34
|
+
|
|
35
|
+
const toggleDebounced = useDebounceFn((item: any | null, id: string) => {
|
|
36
|
+
hoverIndex.value = item?.id;
|
|
37
|
+
if (id === 'mouseenter') {
|
|
38
|
+
emit('handle-mouseenter', item);
|
|
39
|
+
}
|
|
40
|
+
if (id === 'mouseleave') {
|
|
41
|
+
hoverIndex.value = '';
|
|
42
|
+
emit('handle-mouseleave', item);
|
|
43
|
+
}
|
|
44
|
+
}, 100);
|
|
45
|
+
|
|
46
|
+
const handleClick = (item: any) => {
|
|
47
|
+
emit('handle-click', item);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const scrollNavRight = () => {
|
|
51
|
+
navVisibleLeft.value = true;
|
|
52
|
+
nextTick(() => {
|
|
53
|
+
navRef.value.scrollTo({
|
|
54
|
+
left: navRef.value.clientWidth,
|
|
55
|
+
behavior: 'smooth',
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
const scrollNavLeft = () => {
|
|
60
|
+
navRef.value.scrollTo({
|
|
61
|
+
left: 0,
|
|
62
|
+
behavior: 'smooth',
|
|
63
|
+
});
|
|
64
|
+
navVisibleLeft.value = false;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const calculateLayout = () => {
|
|
68
|
+
if (navRef.value?.clientWidth < navListRef.value?.clientWidth) {
|
|
69
|
+
navVisibleRight.value = true;
|
|
70
|
+
} else {
|
|
71
|
+
navVisibleRight.value = false;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// ------------导航埋点------------
|
|
76
|
+
// 首次hover时间
|
|
77
|
+
let hoverTime = 0;
|
|
78
|
+
// 最终点击导航所用步骤
|
|
79
|
+
let steps = 0;
|
|
80
|
+
|
|
81
|
+
const onHoverHeader = () => (steps = 0);
|
|
82
|
+
|
|
83
|
+
const onHoverNav = (name: string) => {
|
|
84
|
+
if (steps > 0) return void steps++;
|
|
85
|
+
steps++;
|
|
86
|
+
hoverTime = Date.now();
|
|
87
|
+
return {
|
|
88
|
+
event: 'hover',
|
|
89
|
+
properties: {
|
|
90
|
+
module: 'navigation',
|
|
91
|
+
level1: name,
|
|
92
|
+
target: name,
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const onClickNavItem = (item: any) => {
|
|
98
|
+
const res = {
|
|
99
|
+
properties: {
|
|
100
|
+
module: 'navigation',
|
|
101
|
+
level1: item.label,
|
|
102
|
+
target: item.label,
|
|
103
|
+
steps: steps,
|
|
104
|
+
url: item.href,
|
|
105
|
+
duration: Date.now() - hoverTime,
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
return res;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
onMounted(() => {
|
|
112
|
+
window.addEventListener('resize', calculateLayout);
|
|
113
|
+
// 确保 DOM 完全渲染后再计算
|
|
114
|
+
nextTick(() => {
|
|
115
|
+
calculateLayout();
|
|
116
|
+
resizeTimer.value = setTimeout(() => {
|
|
117
|
+
calculateLayout();
|
|
118
|
+
}, 1000);
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
// 清理
|
|
123
|
+
onUnmounted(() => {
|
|
124
|
+
window.removeEventListener('resize', calculateLayout);
|
|
125
|
+
clearTimeout(resizeTimer.value);
|
|
126
|
+
});
|
|
127
|
+
</script>
|
|
128
|
+
|
|
129
|
+
<template>
|
|
130
|
+
<div class="header-nav-wrap">
|
|
131
|
+
<div class="header-nav" :class="{ 'header-nav-scroll': navVisibleLeft }">
|
|
132
|
+
<div class="right-icon" v-if="navVisibleLeft">
|
|
133
|
+
<OIcon @click="scrollNavLeft"><IconCaretLeft /></OIcon>
|
|
134
|
+
</div>
|
|
135
|
+
<div ref="navRef" class="o-nav" :class="{ 'o-nav-scroll': navVisibleLeft || !navVisibleRight, dark: isDark }">
|
|
136
|
+
<ul ref="navListRef" class="o-nav-list" @mouseenter="onHoverHeader">
|
|
137
|
+
<li
|
|
138
|
+
v-for="(item, idx) in navData"
|
|
139
|
+
:key="item.id"
|
|
140
|
+
:class="{
|
|
141
|
+
'is-selected': hoverIndex === item.id || props.hoverId === item.id,
|
|
142
|
+
'is-active': props.activeIndex === idx,
|
|
143
|
+
}"
|
|
144
|
+
@mouseenter="toggleDebounced(item, 'mouseenter')"
|
|
145
|
+
@mouseleave="toggleDebounced(item, 'mouseleave')"
|
|
146
|
+
v-analytics:mouseenter="onHoverNav(item.label)"
|
|
147
|
+
v-analytics.catchBubble="onClickNavItem(item)"
|
|
148
|
+
>
|
|
149
|
+
<div v-if="item?.children?.length" :id="'tour_headerNav_' + item.id" class="nav-item">
|
|
150
|
+
<span class="nav-text">{{ item.label }}</span>
|
|
151
|
+
</div>
|
|
152
|
+
<div v-else :id="'tour_headerNav_' + item.id" class="nav-item item-other" @click="handleClick(item)">
|
|
153
|
+
<span class="nav-text">{{ item.label }}</span>
|
|
154
|
+
<OTag v-if="item.tag" round="pill" color="danger" size="small" class="content-tag">{{ item.tag }}</OTag>
|
|
155
|
+
</div>
|
|
156
|
+
</li>
|
|
157
|
+
</ul>
|
|
158
|
+
</div>
|
|
159
|
+
<div class="right-icon" v-if="navVisibleRight && !navVisibleLeft">
|
|
160
|
+
<OIcon @click="scrollNavRight"><IconCaretRight /></OIcon>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
</template>
|
|
165
|
+
|
|
166
|
+
<style lang="scss" scoped>
|
|
167
|
+
.header-nav-wrap {
|
|
168
|
+
height: 100%;
|
|
169
|
+
.header-nav {
|
|
170
|
+
height: 100%;
|
|
171
|
+
display: flex;
|
|
172
|
+
justify-content: space-between;
|
|
173
|
+
width: calc(100% - 64px);
|
|
174
|
+
align-items: center;
|
|
175
|
+
}
|
|
176
|
+
.header-nav-scroll {
|
|
177
|
+
width: calc(100% - 64px - 24px);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
.o-nav {
|
|
181
|
+
height: 100%;
|
|
182
|
+
position: relative;
|
|
183
|
+
overflow-y: hidden;
|
|
184
|
+
overflow-x: auto;
|
|
185
|
+
&::after {
|
|
186
|
+
content: '';
|
|
187
|
+
position: absolute;
|
|
188
|
+
width: 50px;
|
|
189
|
+
height: 100%;
|
|
190
|
+
right: 0;
|
|
191
|
+
top: 0;
|
|
192
|
+
background-image: linear-gradient(90deg, rgba(var(--o-mixedgray-1), 0) 0%, rgba(var(--o-mixedgray-1), 1) 100%);
|
|
193
|
+
z-index: 0;
|
|
194
|
+
}
|
|
195
|
+
&::-webkit-scrollbar {
|
|
196
|
+
display: none;
|
|
197
|
+
}
|
|
198
|
+
&.dark {
|
|
199
|
+
&::after {
|
|
200
|
+
background-image: linear-gradient(90deg, rgba(var(--o-mixedgray-4), 0) 0%, rgba(var(--o-mixedgray-4), 1) 100%);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
.o-nav-scroll {
|
|
205
|
+
&::after {
|
|
206
|
+
display: none;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
.o-nav-list {
|
|
210
|
+
display: flex;
|
|
211
|
+
height: 100%;
|
|
212
|
+
width: fit-content;
|
|
213
|
+
flex-wrap: nowrap;
|
|
214
|
+
white-space: nowrap;
|
|
215
|
+
padding: 0;
|
|
216
|
+
margin: 0;
|
|
217
|
+
li {
|
|
218
|
+
position: relative;
|
|
219
|
+
display: flex;
|
|
220
|
+
align-items: center;
|
|
221
|
+
height: 100%;
|
|
222
|
+
color: var(--o-color-info1);
|
|
223
|
+
transition: all var(--o-duration-s) var(--o-easing-standard);
|
|
224
|
+
.nav-text {
|
|
225
|
+
position: relative;
|
|
226
|
+
&::after {
|
|
227
|
+
content: '';
|
|
228
|
+
position: absolute;
|
|
229
|
+
left: 0;
|
|
230
|
+
opacity: 0;
|
|
231
|
+
bottom: -24px;
|
|
232
|
+
width: 100%;
|
|
233
|
+
height: 2px;
|
|
234
|
+
border-radius: 1px;
|
|
235
|
+
background: var(--o-color-primary1);
|
|
236
|
+
transition: all var(--o-duration-s) var(--o-easing-standard);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
&.is-selected,
|
|
240
|
+
&.is-active {
|
|
241
|
+
.nav-text {
|
|
242
|
+
color: var(--o-color-primary1);
|
|
243
|
+
z-index: 99;
|
|
244
|
+
font-weight: 500;
|
|
245
|
+
&::after {
|
|
246
|
+
content: '';
|
|
247
|
+
opacity: 1;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.nav-item {
|
|
254
|
+
cursor: default;
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
padding: 22px var(--o-gap-4);
|
|
258
|
+
@include text1;
|
|
259
|
+
|
|
260
|
+
@include respond-to('laptop') {
|
|
261
|
+
padding: 22px 12px;
|
|
262
|
+
}
|
|
263
|
+
@include respond-to('pad_h') {
|
|
264
|
+
padding: 22px 8px;
|
|
265
|
+
}
|
|
266
|
+
&.en {
|
|
267
|
+
@media (min-width: 841px) and (max-width: 1000px) {
|
|
268
|
+
padding: var(--o-gap-2);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
.item-other {
|
|
273
|
+
cursor: pointer;
|
|
274
|
+
.content-tag {
|
|
275
|
+
margin-left: var(--o-gap-2);
|
|
276
|
+
--layout-pkg-radius: var(--o-radius-xs);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
</style>
|
|
@@ -17,9 +17,13 @@ const navActive = ref('');
|
|
|
17
17
|
const navInfo = ref({});
|
|
18
18
|
|
|
19
19
|
const handleNavClick = (item: any) => {
|
|
20
|
+
if (item?.href) {
|
|
21
|
+
window.open(item?.href, '_self');
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
20
24
|
if (!item) {
|
|
21
25
|
navActive.value = 'source_code';
|
|
22
|
-
navInfo.value = props.codeData;
|
|
26
|
+
navInfo.value = props.codeData.list;
|
|
23
27
|
} else {
|
|
24
28
|
navActive.value = item.id;
|
|
25
29
|
navInfo.value = item;
|
|
@@ -27,8 +31,8 @@ const handleNavClick = (item: any) => {
|
|
|
27
31
|
};
|
|
28
32
|
|
|
29
33
|
const emit = defineEmits(['link-click']);
|
|
30
|
-
const linkClick = (url: string, target
|
|
31
|
-
window.open(url, target);
|
|
34
|
+
const linkClick = (url: string, target?: string) => {
|
|
35
|
+
window.open(url, target ? target : '_self');
|
|
32
36
|
emit('link-click');
|
|
33
37
|
};
|
|
34
38
|
|
|
@@ -40,7 +44,7 @@ onMounted(() => {
|
|
|
40
44
|
watch(
|
|
41
45
|
() => props.navData || props.codeData,
|
|
42
46
|
() => {
|
|
43
|
-
navInfo.value = navActive.value === 'source_code' ? props.codeData : props.navData.find((item) => item.id === navActive.value);
|
|
47
|
+
navInfo.value = navActive.value === 'source_code' ? props.codeData.list : props.navData.find((item) => item.id === navActive.value);
|
|
44
48
|
},
|
|
45
49
|
{
|
|
46
50
|
deep: true,
|
|
@@ -70,7 +74,7 @@ watch(
|
|
|
70
74
|
<p class="content-label">{{ item.label }}</p>
|
|
71
75
|
<div class="container-mobile">
|
|
72
76
|
<div v-for="subItem in item?.children" :key="subItem.label" class="content-container-mobile">
|
|
73
|
-
<a @click="linkClick(subItem.href,
|
|
77
|
+
<a @click="linkClick(subItem.href, subItem?.target)" rel="noopener noreferrer" class="content-subtitle">
|
|
74
78
|
<span class="item-label">{{ subItem.label }}</span>
|
|
75
79
|
<OIcon v-if="subItem.icon">
|
|
76
80
|
<component :is="subItem.icon" class="icon" />
|
|
@@ -84,7 +88,7 @@ watch(
|
|
|
84
88
|
</div>
|
|
85
89
|
</template>
|
|
86
90
|
<template v-else>
|
|
87
|
-
<a @click="linkClick(item.href,
|
|
91
|
+
<a @click="linkClick(item.href, item?.target)" rel="noopener noreferrer" class="content-subtitle item-not-children">
|
|
88
92
|
<span class="item-label">{{ item.label }}</span>
|
|
89
93
|
<OIcon v-if="item.icon">
|
|
90
94
|
<component :is="item.icon" class="icon" />
|
|
@@ -95,7 +99,7 @@ watch(
|
|
|
95
99
|
</li>
|
|
96
100
|
</ul>
|
|
97
101
|
<div v-else class="nav-aside-wrapper">
|
|
98
|
-
<a v-for="item in navInfo" :key="item.label" @click="linkClick(item.href,
|
|
102
|
+
<a v-for="item in navInfo" :key="item.label" @click="linkClick(item.href, item?.target)" class="source-code-item">
|
|
99
103
|
<span>{{ item.label }}</span>
|
|
100
104
|
<OIcon v-if="item.icon">
|
|
101
105
|
<component :is="item.icon" class="icon" />
|
|
@@ -115,7 +119,7 @@ watch(
|
|
|
115
119
|
active: navActive === 'source_code',
|
|
116
120
|
}"
|
|
117
121
|
>
|
|
118
|
-
|
|
122
|
+
{{ codeData.label }}
|
|
119
123
|
</div>
|
|
120
124
|
<div v-if="$slots.tool">
|
|
121
125
|
<slot name="tool"></slot>
|
|
@@ -136,6 +140,7 @@ watch(
|
|
|
136
140
|
&.active {
|
|
137
141
|
color: var(--o-color-primary1);
|
|
138
142
|
background: var(--o-color-fill2);
|
|
143
|
+
font-weight: 500;
|
|
139
144
|
}
|
|
140
145
|
}
|
|
141
146
|
|
|
@@ -164,6 +169,7 @@ watch(
|
|
|
164
169
|
transition-property: all;
|
|
165
170
|
transition-timing-function: cubic-bezier(0.5, 0, 0.84, 0.25);
|
|
166
171
|
display: block;
|
|
172
|
+
opacity: 0;
|
|
167
173
|
|
|
168
174
|
&.active {
|
|
169
175
|
opacity: 1;
|
|
@@ -189,7 +195,7 @@ watch(
|
|
|
189
195
|
> li {
|
|
190
196
|
position: relative;
|
|
191
197
|
text-align: center;
|
|
192
|
-
@include
|
|
198
|
+
@include text2;
|
|
193
199
|
@include nav-item;
|
|
194
200
|
}
|
|
195
201
|
}
|
|
@@ -226,8 +232,7 @@ watch(
|
|
|
226
232
|
}
|
|
227
233
|
.content-label {
|
|
228
234
|
color: var(--o-color-info3);
|
|
229
|
-
|
|
230
|
-
@include tip1;
|
|
235
|
+
@include text2;
|
|
231
236
|
}
|
|
232
237
|
|
|
233
238
|
.item-not-children {
|
|
@@ -275,7 +280,6 @@ watch(
|
|
|
275
280
|
}
|
|
276
281
|
|
|
277
282
|
.container-mobile {
|
|
278
|
-
color: var(--o-color-primary1);
|
|
279
283
|
margin-top: 8px;
|
|
280
284
|
@include text2;
|
|
281
285
|
|
|
@@ -287,7 +291,6 @@ watch(
|
|
|
287
291
|
}
|
|
288
292
|
|
|
289
293
|
.content-container-mobile {
|
|
290
|
-
margin-right: var(--o-gap-1);
|
|
291
294
|
margin-top: var(--o-gap-3);
|
|
292
295
|
|
|
293
296
|
&:last-child {
|
|
@@ -295,11 +298,10 @@ watch(
|
|
|
295
298
|
}
|
|
296
299
|
|
|
297
300
|
.content-subtitle {
|
|
298
|
-
|
|
299
|
-
color: var(--o-color-primary1);
|
|
301
|
+
color: var(--o-color-info1);
|
|
300
302
|
display: flex;
|
|
301
303
|
align-items: center;
|
|
302
|
-
@include
|
|
304
|
+
@include text2;
|
|
303
305
|
}
|
|
304
306
|
|
|
305
307
|
.content-tag {
|
|
@@ -316,7 +318,7 @@ watch(
|
|
|
316
318
|
margin-top: var(--o-gap-1);
|
|
317
319
|
text-align: justify;
|
|
318
320
|
word-break: normal;
|
|
319
|
-
@include
|
|
321
|
+
@include text1;
|
|
320
322
|
@include text-truncate(2);
|
|
321
323
|
}
|
|
322
324
|
}
|
|
@@ -339,6 +341,6 @@ watch(
|
|
|
339
341
|
.header-tool-code {
|
|
340
342
|
width: 99px;
|
|
341
343
|
@include nav-item;
|
|
342
|
-
@include
|
|
344
|
+
@include text1;
|
|
343
345
|
}
|
|
344
346
|
</style>
|
|
@@ -246,11 +246,11 @@ const handelHref = (href: string) => {
|
|
|
246
246
|
<nav class="header-nav-ubmc" ref="wrapperRef">
|
|
247
247
|
<ul
|
|
248
248
|
class="nav-list"
|
|
249
|
-
@mouseleave="onCancelNav"
|
|
250
249
|
ref="listRef"
|
|
251
250
|
:style="{
|
|
252
251
|
'--more-left': leftWidth,
|
|
253
252
|
}"
|
|
253
|
+
@mouseleave="onCancelNav"
|
|
254
254
|
>
|
|
255
255
|
<li
|
|
256
256
|
v-for="(item, idx) in [...navs, moreItem]"
|
|
@@ -281,7 +281,7 @@ const handelHref = (href: string) => {
|
|
|
281
281
|
<template v-if="childTab.disabled">
|
|
282
282
|
<div class="tab-disabled">
|
|
283
283
|
<span>{{ childTab.label }}</span>
|
|
284
|
-
<span class="disabled-tag"
|
|
284
|
+
<span class="disabled-tag">{{ locale === 'zh' ? '待上线' : 'Coming soon' }}</span>
|
|
285
285
|
</div>
|
|
286
286
|
</template>
|
|
287
287
|
<template v-else-if="childTab?.children">
|
|
@@ -298,6 +298,7 @@ const handelHref = (href: string) => {
|
|
|
298
298
|
class="dropdown-link"
|
|
299
299
|
:target="isHttpUrl(childTab.href) ? '_blank' : '_self'"
|
|
300
300
|
:rel="isHttpUrl(childTab.href) ? 'noopener noreferrer' : ''"
|
|
301
|
+
v-analytics="() => onRedirect(childTab)"
|
|
301
302
|
>
|
|
302
303
|
<span>{{ childTab.label }}</span>
|
|
303
304
|
<OTag
|
|
@@ -315,37 +316,6 @@ const handelHref = (href: string) => {
|
|
|
315
316
|
</template>
|
|
316
317
|
</template>
|
|
317
318
|
</el-cascader-panel>
|
|
318
|
-
<div class="dropdown-body-wrapper" style="display: none !important">
|
|
319
|
-
<div class="dropdown-body" v-for="(childTab, index) in item.children" :key="index" @mouseenter="onMouseEnter(idx)" @mouseleave="onMouseLeave">
|
|
320
|
-
<div class="dropdown-item" v-if="childTab.disabled">
|
|
321
|
-
<div class="tab-disabled">
|
|
322
|
-
<span>{{ childTab.label }}</span>
|
|
323
|
-
<span class="disabled-tag">待上线</span>
|
|
324
|
-
</div>
|
|
325
|
-
</div>
|
|
326
|
-
<div class="dropdown-item" v-else v-analytics="() => onRedirect(childTab)">
|
|
327
|
-
<a
|
|
328
|
-
:href="handelHref(childTab.href)"
|
|
329
|
-
class="dropdown-link"
|
|
330
|
-
:target="isHttpUrl(childTab.href) ? '_blank' : '_self'"
|
|
331
|
-
:rel="isHttpUrl(childTab.href) ? 'noopener noreferrer' : ''"
|
|
332
|
-
>
|
|
333
|
-
<span>{{ childTab.label }}</span>
|
|
334
|
-
<OTag
|
|
335
|
-
v-if="(tagMap[childTab?.href?.slice(1)] || childTab.tag) && checkVisible(childTab.tagExpire, childTab.tagLang)"
|
|
336
|
-
color="danger"
|
|
337
|
-
size="small"
|
|
338
|
-
round="pill"
|
|
339
|
-
>
|
|
340
|
-
{{ tagMap[childTab?.href?.slice(1)] || childTab.tag }}
|
|
341
|
-
</OTag>
|
|
342
|
-
<OIcon v-if="childTab.icon" class="jump-out-icon">
|
|
343
|
-
<component :is="childTab.icon" class="icon" />
|
|
344
|
-
</OIcon>
|
|
345
|
-
</a>
|
|
346
|
-
</div>
|
|
347
|
-
</div>
|
|
348
|
-
</div>
|
|
349
319
|
</div>
|
|
350
320
|
</div>
|
|
351
321
|
</li>
|
|
@@ -365,6 +335,7 @@ const handelHref = (href: string) => {
|
|
|
365
335
|
height: 100%;
|
|
366
336
|
width: fit-content;
|
|
367
337
|
flex-wrap: nowrap;
|
|
338
|
+
list-style: none;
|
|
368
339
|
}
|
|
369
340
|
.nav-item {
|
|
370
341
|
position: relative;
|
|
@@ -386,6 +357,7 @@ const handelHref = (href: string) => {
|
|
|
386
357
|
display: flex;
|
|
387
358
|
align-items: center;
|
|
388
359
|
transition: color var(--o-duration-s) var(--o-easing-standard);
|
|
360
|
+
text-decoration: none;
|
|
389
361
|
}
|
|
390
362
|
&::after {
|
|
391
363
|
content: '';
|
|
@@ -407,6 +379,7 @@ const handelHref = (href: string) => {
|
|
|
407
379
|
.info-wrap {
|
|
408
380
|
color: var(--o-color-primary1);
|
|
409
381
|
font-weight: 500;
|
|
382
|
+
cursor: default;
|
|
410
383
|
}
|
|
411
384
|
&::after {
|
|
412
385
|
opacity: 1;
|
|
@@ -506,37 +479,7 @@ const handelHref = (href: string) => {
|
|
|
506
479
|
}
|
|
507
480
|
}
|
|
508
481
|
}
|
|
509
|
-
.dropdown-body-wrapper {
|
|
510
|
-
background-color: var(--o-color-control-light);
|
|
511
|
-
border-radius: var(--o-radius-s);
|
|
512
|
-
box-shadow: var(--o-shadow-2);
|
|
513
|
-
}
|
|
514
482
|
|
|
515
|
-
.dropdown-item {
|
|
516
|
-
font-weight: 400;
|
|
517
|
-
white-space: nowrap;
|
|
518
|
-
display: flex;
|
|
519
|
-
align-items: center;
|
|
520
|
-
padding: 6px 12px;
|
|
521
|
-
min-width: 100px;
|
|
522
|
-
border-radius: var(--o-radius-s);
|
|
523
|
-
color: var(--o-color-info2);
|
|
524
|
-
background-color: transparent;
|
|
525
|
-
transition: background-color var(--o-duration-s) var(--o-easing-standard);
|
|
526
|
-
cursor: pointer;
|
|
527
|
-
@include text1;
|
|
528
|
-
@include hover {
|
|
529
|
-
background-color: var(--o-color-control2-light);
|
|
530
|
-
color: var(--o-color-primary1);
|
|
531
|
-
}
|
|
532
|
-
&.dropdown-item {
|
|
533
|
-
display: flex;
|
|
534
|
-
justify-content: space-between;
|
|
535
|
-
.o-icon {
|
|
536
|
-
font-size: 16px;
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
483
|
.dropdown-link {
|
|
541
484
|
color: inherit;
|
|
542
485
|
display: flex;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import _OHeader from './OHeader.vue';
|
|
2
|
+
import _OHeaderMoblie from './OHeaderMoblie.vue';
|
|
3
|
+
import type { App } from 'vue';
|
|
4
|
+
|
|
5
|
+
const OHeader = Object.assign(_OHeader, {
|
|
6
|
+
install(app: App) {
|
|
7
|
+
app.component('OEventsCalendar', _OHeader);
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
const OHeaderMoblie = Object.assign(_OHeaderMoblie, {
|
|
11
|
+
install(app: App) {
|
|
12
|
+
app.component('OEventsList', _OHeaderMoblie);
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export { OHeader, OHeaderMoblie };
|
|
@@ -31,7 +31,6 @@ const props = withDefaults(defineProps<{
|
|
|
31
31
|
getEventsListRequest: any;
|
|
32
32
|
hiddenEvents?: boolean;
|
|
33
33
|
hiddenSummit?: boolean;
|
|
34
|
-
createDesc?: string
|
|
35
34
|
}>(), {
|
|
36
35
|
getSummitListRequest: async () => [],
|
|
37
36
|
getEventsListRequest: async () => [],
|
|
@@ -79,14 +78,27 @@ const sig = ref('');
|
|
|
79
78
|
const sigOptions = ref<GroupItemT[]>([]);
|
|
80
79
|
const getSummitData = async (date) => {
|
|
81
80
|
if (props.getSummitListRequest) {
|
|
82
|
-
|
|
81
|
+
const list = await props.getSummitListRequest(date);
|
|
82
|
+
summitData.value = (list || []).map(v => {
|
|
83
|
+
return {
|
|
84
|
+
|
|
85
|
+
...v,
|
|
86
|
+
type: 'summit',
|
|
87
|
+
};
|
|
88
|
+
});
|
|
83
89
|
} else {
|
|
84
90
|
summitData.value = [];
|
|
85
91
|
}
|
|
86
92
|
};
|
|
87
93
|
const getActivityData = async (date) => {
|
|
88
94
|
if (props.getEventsListRequest) {
|
|
89
|
-
|
|
95
|
+
const list = await props.getEventsListRequest(date);
|
|
96
|
+
eventsData.value = (list || []).map(v => {
|
|
97
|
+
return {
|
|
98
|
+
...v,
|
|
99
|
+
type: 'activity',
|
|
100
|
+
};
|
|
101
|
+
});
|
|
90
102
|
} else {
|
|
91
103
|
eventsData.value = [];
|
|
92
104
|
}
|
|
@@ -251,17 +263,9 @@ const formatYearMonth = (date: string) => {
|
|
|
251
263
|
return date;
|
|
252
264
|
}
|
|
253
265
|
};
|
|
254
|
-
const emits = defineEmits(['create']);
|
|
255
|
-
const create = () => {
|
|
256
|
-
emits('create');
|
|
257
|
-
};
|
|
258
266
|
</script>
|
|
259
267
|
<template>
|
|
260
268
|
<div class="o-meeting-calendar">
|
|
261
|
-
<div class="calendar-header">
|
|
262
|
-
<span>{{ createDesc || '' }}</span>
|
|
263
|
-
<OButton color="primary" variant="solid" round="pill" @click="create">预定会议</OButton>
|
|
264
|
-
</div>
|
|
265
269
|
<div class="calendar-body">
|
|
266
270
|
<ElCalendar ref="calendar" class="calender">
|
|
267
271
|
<template #header="{ date }">
|
|
@@ -367,11 +371,13 @@ const create = () => {
|
|
|
367
371
|
.o-select {
|
|
368
372
|
flex-grow: 1;
|
|
369
373
|
max-width: 320px;
|
|
374
|
+
--select-radius: var(--o-radius-xs);
|
|
370
375
|
}
|
|
371
376
|
|
|
372
377
|
.el-calendar-table {
|
|
373
378
|
margin-bottom: 0;
|
|
374
379
|
display: table;
|
|
380
|
+
width: 100%;
|
|
375
381
|
}
|
|
376
382
|
|
|
377
383
|
.calendar-header {
|
|
@@ -648,6 +654,7 @@ const create = () => {
|
|
|
648
654
|
|
|
649
655
|
.date-calender {
|
|
650
656
|
position: relative;
|
|
657
|
+
margin-bottom: 0;
|
|
651
658
|
|
|
652
659
|
&::after {
|
|
653
660
|
content: '';
|
|
@@ -764,7 +771,7 @@ const create = () => {
|
|
|
764
771
|
.title-list {
|
|
765
772
|
display: flex;
|
|
766
773
|
align-items: center;
|
|
767
|
-
justify-content:
|
|
774
|
+
justify-content: center;
|
|
768
775
|
padding: 14px 24px;
|
|
769
776
|
position: relative;
|
|
770
777
|
height: 60px;
|