@opendesign-plus/components 0.0.1-rc.2 → 0.0.1-rc.21
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 -0
- package/dist/chunk-OElCookieNotice.es.js +839 -0
- package/dist/components/OBanner.vue.d.ts +10 -1
- package/dist/components/OCookieNotice.vue.d.ts +6 -5
- package/dist/components/OFooter.vue.d.ts +46 -0
- package/dist/components/OHeaderSearch.vue.d.ts +10 -14
- package/dist/components/OHeaderUser.vue.d.ts +40 -0
- package/dist/components/OSourceCode.vue.d.ts +18 -0
- package/dist/components/activity/OActivityApproval.vue.d.ts +273 -0
- package/dist/components/activity/OActivityForm.vue.d.ts +138 -0
- package/dist/components/activity/OMyActivityCalendar.vue.d.ts +570 -0
- package/dist/components/activity/composables/useActivityConfig.d.ts +17 -0
- package/dist/components/activity/config.d.ts +1 -0
- package/dist/components/activity/index.d.ts +615 -0
- package/dist/components/activity/types.d.ts +88 -0
- package/dist/components/element-plus/OElCookieNotice.vue.d.ts +34 -0
- package/dist/components/element-plus/index.d.ts +2 -0
- package/dist/components/events/OEventsApply.vue.d.ts +16 -0
- package/dist/components/events/OEventsCalendar.vue.d.ts +5 -0
- package/dist/components/events/OEventsList.vue.d.ts +26 -0
- package/dist/components/events/config.d.ts +14 -0
- package/dist/components/events/index.d.ts +78 -0
- package/dist/components/events/types.d.ts +69 -0
- package/dist/components/events/utils.d.ts +7 -0
- package/dist/components/header/OHeader.vue.d.ts +30 -0
- package/dist/components/header/OHeaderMobile.vue.d.ts +178 -0
- package/dist/components/header/components/HeaderContent.vue.d.ts +13 -0
- package/dist/components/header/components/HeaderNav.vue.d.ts +19 -0
- package/dist/components/header/components/HeaderNavMobile.vue.d.ts +36 -0
- package/dist/components/header/index.d.ts +152 -0
- package/dist/components/header/types.d.ts +84 -0
- package/dist/components/meeting/OMeetingCalendar.vue.d.ts +295 -0
- package/dist/components/meeting/OMeetingForm.vue.d.ts +143 -0
- package/dist/components/meeting/OMeetingPlayback.vue.d.ts +45 -0
- package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +578 -0
- package/dist/components/meeting/OSigMeetingCalendar.vue.d.ts +24 -0
- package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +28 -0
- package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +664 -0
- package/dist/components/meeting/components/OMeetingDetail.vue.d.ts +13 -0
- package/dist/components/meeting/components/OMeetingPlaybackSubtitles.vue.d.ts +5 -0
- package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +17 -0
- package/dist/components/meeting/components/OSigMeetingAside.vue.d.ts +16 -0
- package/dist/components/meeting/composables/useMeetingConfig.d.ts +14 -0
- package/dist/components/meeting/config.d.ts +12 -0
- package/dist/components/meeting/index.d.ts +786 -0
- package/dist/components/meeting/types.d.ts +233 -0
- package/dist/components/meeting/utils.d.ts +8 -0
- package/dist/components.cjs.js +224 -1
- package/dist/components.css +1 -1
- package/dist/components.element.cjs.js +1 -0
- package/dist/components.element.es.js +4 -0
- package/dist/components.es.js +44417 -784
- package/dist/index.d.ts +9 -2
- package/docs/design.md +27 -27
- package/docs/design_banner.md +41 -41
- package/docs/design_section.md +27 -27
- package/package.json +13 -4
- package/scripts/generate-components-index.js +103 -80
- package/src/assets/events/svg-icons/icon-checked.svg +3 -0
- package/src/assets/events/svg-icons/icon-competition.svg +7 -0
- package/src/assets/events/svg-icons/icon-events.svg +4 -0
- package/src/assets/events/svg-icons/icon-release.svg +4 -0
- package/src/assets/events/svg-icons/icon-summit.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-all.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-backward.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-calendar.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-cancel.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-captions.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-close-captions.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-close-fullscreen.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-copy.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-create.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-delete.svg +7 -0
- package/src/assets/meeting/svg-icons/icon-empty.svg +31 -0
- package/src/assets/meeting/svg-icons/icon-empty_dark.svg +49 -0
- package/src/assets/meeting/svg-icons/icon-event.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-export.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-forward.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-fullscreen.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-help.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-important.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-info.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-meet.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-meeting-message.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-meeting.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-play.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-playing-tip.svg +7 -0
- package/src/assets/meeting/svg-icons/icon-playing.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-question.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-sound.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-speaker.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-summit.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-telligent.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-tip.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-todo.svg +4 -0
- package/src/assets/meeting/transparent.png +0 -0
- package/src/assets/svg-icons/icon-arrow-left.svg +3 -0
- package/src/assets/svg-icons/icon-avatar-line.svg +3 -0
- package/src/assets/svg-icons/icon-caret-left.svg +3 -0
- package/src/assets/svg-icons/icon-caret-right.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-down.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-right.svg +3 -3
- package/src/assets/svg-icons/icon-chevron-up.svg +3 -0
- package/src/assets/svg-icons/icon-close.svg +3 -3
- package/src/assets/svg-icons/icon-delete.svg +3 -3
- package/src/assets/svg-icons/icon-filter.svg +3 -0
- package/src/assets/svg-icons/icon-header-back.svg +3 -3
- package/src/assets/svg-icons/icon-header-delete.svg +3 -3
- package/src/assets/svg-icons/icon-header-menu.svg +3 -0
- package/src/assets/svg-icons/icon-header-person.svg +3 -0
- package/src/assets/svg-icons/icon-header-search.svg +4 -4
- package/src/assets/svg-icons/icon-loading.svg +4 -0
- package/src/assets/svg-icons/icon-locale.svg +3 -0
- package/src/assets/svg-icons/icon-log-off.svg +3 -0
- package/src/assets/svg-icons/icon-message.svg +3 -0
- package/src/assets/svg-icons/icon-moon.svg +3 -3
- package/src/assets/svg-icons/icon-outlink.svg +3 -0
- package/src/assets/svg-icons/icon-overview.svg +3 -0
- package/src/assets/svg-icons/icon-search.svg +3 -0
- package/src/assets/svg-icons/icon-setting.svg +3 -0
- package/src/assets/svg-icons/icon-sun.svg +3 -3
- package/src/assets/svg-icons/icon-tips.svg +3 -0
- package/src/components/OBanner.vue +398 -390
- package/src/components/OCookieNotice.vue +575 -424
- package/src/components/OFooter.vue +576 -0
- package/src/components/OHeaderSearch.vue +601 -601
- package/src/components/OHeaderUser.vue +237 -0
- package/src/components/OPlusConfigProvider.vue +32 -32
- package/src/components/OSection.vue +178 -178
- package/src/components/OSourceCode.vue +151 -0
- package/src/components/OThemeSwitcher.vue +108 -108
- package/src/components/activity/OActivityApproval.vue +864 -0
- package/src/components/activity/OActivityForm.vue +542 -0
- package/src/components/activity/OMyActivityCalendar.vue +1502 -0
- package/src/components/activity/composables/useActivityConfig.ts +141 -0
- package/src/components/activity/config.ts +1 -0
- package/src/components/activity/index.ts +24 -0
- package/src/components/activity/types.ts +95 -0
- package/src/components/common/AppAvatar.vue +83 -0
- package/src/components/common/ClientOnlyWrapper.ts +21 -21
- package/src/components/common/ContentWrapper.vue +85 -85
- package/src/components/common/MoreText.vue +124 -0
- package/src/components/common/ThFilter.vue +330 -0
- package/src/components/element-plus/OElCookieNotice.vue +603 -0
- package/src/components/element-plus/index.ts +3 -0
- package/src/components/events/OEventsApply.vue +418 -0
- package/src/components/events/OEventsCalendar.vue +598 -0
- package/src/components/events/OEventsList.vue +389 -0
- package/src/components/events/config.ts +35 -0
- package/src/components/events/index.ts +24 -0
- package/src/components/events/types.ts +83 -0
- package/src/components/events/utils.ts +9 -0
- package/src/components/header/OHeader.vue +157 -0
- package/src/components/header/OHeaderMobile.vue +184 -0
- package/src/components/header/components/HeaderContent.vue +1125 -0
- package/src/components/header/components/HeaderNav.vue +278 -0
- package/src/components/header/components/HeaderNavMobile.vue +380 -0
- package/src/components/header/index.ts +16 -0
- package/src/components/header/types.ts +95 -0
- package/src/components/meeting/OMeetingCalendar.vue +890 -0
- package/src/components/meeting/OMeetingForm.vue +1072 -0
- package/src/components/meeting/OMeetingPlayback.vue +439 -0
- package/src/components/meeting/OMyMeetingCalendar.vue +1508 -0
- package/src/components/meeting/OSigMeetingCalendar.vue +413 -0
- package/src/components/meeting/components/OMeetingCalendarList.vue +515 -0
- package/src/components/meeting/components/OMeetingCalendarSelector.vue +210 -0
- package/src/components/meeting/components/OMeetingDetail.vue +244 -0
- package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +611 -0
- package/src/components/meeting/components/OMeetingPlaybackVideo.vue +741 -0
- package/src/components/meeting/components/OSigMeetingAside.vue +199 -0
- package/src/components/meeting/composables/useMeetingConfig.ts +108 -0
- package/src/components/meeting/config.ts +48 -0
- package/src/components/meeting/index.ts +45 -0
- package/src/components/meeting/types.ts +266 -0
- package/src/components/meeting/utils.ts +70 -0
- package/src/draft/Banner.vue +265 -265
- package/src/draft/ButtonCards.vue +105 -105
- package/src/draft/Feature.vue +133 -133
- package/src/draft/Footer.vue +512 -512
- package/src/draft/HorizontalAnchor.vue +165 -165
- package/src/draft/ItemSwiper.vue +133 -133
- package/src/draft/Logo.vue +141 -141
- package/src/draft/LogoCard.vue +74 -74
- package/src/draft/LogoV2.vue +19 -19
- package/src/draft/MainCard.vue +38 -38
- package/src/draft/MultiCard.vue +94 -94
- package/src/draft/MultiIconCard.vue +73 -73
- package/src/draft/OInfoCard.vue +176 -176
- package/src/draft/Process.vue +81 -81
- package/src/draft/Section.vue +167 -167
- package/src/draft/SingleTabCard.vue +84 -84
- package/src/draft/SliderCard.vue +110 -110
- package/src/env.d.ts +16 -1
- package/src/i18n/en.ts +264 -20
- package/src/i18n/index.ts +56 -42
- package/src/i18n/zh.ts +253 -9
- package/src/index.ts +14 -3
- package/src/shared/provide.ts +6 -6
- package/src/shims-vue-dompurify-html.d.ts +17 -0
- package/src/vue.d.ts +9 -9
- package/tsconfig.json +37 -33
- package/vite.config.ts +119 -94
- package/dist/components/OCookieNoticeEl.vue.d.ts +0 -29
- package/dist/components.umd.js +0 -1
- package/src/components/OCookieNoticeEl.vue +0 -404
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import { OptionItemT } from './types';
|
|
3
|
+
|
|
4
|
+
export const formatDate = (date: string | Date = new Date(), format: string = 'YYYY-MM-DD'): string => {
|
|
5
|
+
let dateStr = date;
|
|
6
|
+
if (!dateStr) {
|
|
7
|
+
dateStr = new Date();
|
|
8
|
+
}
|
|
9
|
+
if (!dayjs(new Date(dateStr)).isValid()) {
|
|
10
|
+
return dateStr as string;
|
|
11
|
+
}
|
|
12
|
+
return dayjs(new Date(dateStr)).format(format);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const findLabelFromOptions = (value: string | number, options: OptionItemT[], labelKey: keyof OptionItemT = 'label', valueKey: keyof OptionItemT = 'value') => {
|
|
16
|
+
const find = options.find((o) => o[valueKey] === value);
|
|
17
|
+
return find?.[labelKey] || value;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const speakerNum = (val: string) => {
|
|
21
|
+
const regex = /\d+/g;
|
|
22
|
+
const match = val.match(regex) || '';
|
|
23
|
+
|
|
24
|
+
return parseInt(match[0]);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const getDateNumber = (date: string) => {
|
|
28
|
+
const arr: string[] = date.split(':');
|
|
29
|
+
if (arr.length > 3 || !arr.length) {
|
|
30
|
+
return 0;
|
|
31
|
+
}
|
|
32
|
+
let res = 0;
|
|
33
|
+
let base = 1;
|
|
34
|
+
while (arr.length > 0) {
|
|
35
|
+
const current = arr.pop();
|
|
36
|
+
res += parseInt(current!) * base;
|
|
37
|
+
base *= 60;
|
|
38
|
+
}
|
|
39
|
+
return res;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const formatNumber = (num: number) => {
|
|
43
|
+
if (num < 0) return 'Invalid number';
|
|
44
|
+
if (num >= 10) return `${ num }`;
|
|
45
|
+
return `0${ num }`;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const formatDateNumber = (num: number) => {
|
|
49
|
+
if (num > 24 * 60 * 60) return 'Invalid date';
|
|
50
|
+
const h = Math.floor(num / 60 / 60);
|
|
51
|
+
const m = Math.floor((num - h * 60 * 60) / 60);
|
|
52
|
+
const s = num % 60;
|
|
53
|
+
return `${ formatNumber(h) }:${ formatNumber(m) }:${ formatNumber(s) }`;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const transformTime = (time: string) => {
|
|
57
|
+
const arr = time.split(':');
|
|
58
|
+
const hh = arr[arr.length - 3] ? parseInt(arr[arr.length - 3]) : 0;
|
|
59
|
+
const mm = parseInt(arr[arr.length - 2]);
|
|
60
|
+
const ss = parseFloat(arr[arr.length - 1]);
|
|
61
|
+
|
|
62
|
+
return hh * 60 * 60 + mm * 60 + ss;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const transformSeconds = (seconds: number) => {
|
|
66
|
+
const hh = Math.floor(seconds / 3600);
|
|
67
|
+
const mm = Math.floor((seconds - hh * 3600) / 60);
|
|
68
|
+
const ss = Math.floor(seconds - hh * 3600 - mm * 60);
|
|
69
|
+
return `${ hh ? `${ hh.toString().padStart(2, '0') }:` : '' }${ mm.toString().padStart(2, '0') }:${ ss.toString().padStart(2, '0') }`;
|
|
70
|
+
};
|
package/src/draft/Banner.vue
CHANGED
|
@@ -1,265 +1,265 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { onMounted, type PropType } from 'vue';
|
|
3
|
-
import { OButton } from '@opensig/opendesign';
|
|
4
|
-
|
|
5
|
-
import AOS from 'aos';
|
|
6
|
-
|
|
7
|
-
import ContentWrapper from './ContentWrapper.vue';
|
|
8
|
-
|
|
9
|
-
defineProps({
|
|
10
|
-
backgroundImage: {
|
|
11
|
-
type: String,
|
|
12
|
-
default: '',
|
|
13
|
-
},
|
|
14
|
-
title: {
|
|
15
|
-
type: String,
|
|
16
|
-
default: '',
|
|
17
|
-
},
|
|
18
|
-
subtitle: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: '',
|
|
21
|
-
},
|
|
22
|
-
href: {
|
|
23
|
-
type: String,
|
|
24
|
-
default: '',
|
|
25
|
-
},
|
|
26
|
-
text: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: '',
|
|
29
|
-
},
|
|
30
|
-
// 风格
|
|
31
|
-
theme: {
|
|
32
|
-
type: String as PropType<'light' | 'dark'>,
|
|
33
|
-
default: 'light',
|
|
34
|
-
},
|
|
35
|
-
// 指定在何处显示链接的资源
|
|
36
|
-
target: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: '_blank',
|
|
39
|
-
},
|
|
40
|
-
size: {
|
|
41
|
-
type: String as PropType<'small' | 'medium' | 'large'>,
|
|
42
|
-
default: 'medium',
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
onMounted(() => {
|
|
47
|
-
AOS.init({
|
|
48
|
-
duration: 800,
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
<template>
|
|
54
|
-
<div class="banner-content" :class="`banner-${size}`">
|
|
55
|
-
<div class="banner-bg" :style="{ backgroundImage: `url(${backgroundImage})` }"></div>
|
|
56
|
-
<ContentWrapper class="banner-text">
|
|
57
|
-
<div class="banner-text-content">
|
|
58
|
-
<p v-if="title" class="banner-title" data-aos="fade-up">{{ title }}</p>
|
|
59
|
-
<p v-if="subtitle" class="banner-subtitle" data-aos="fade-up">
|
|
60
|
-
{{ subtitle }}
|
|
61
|
-
</p>
|
|
62
|
-
<OButton v-if="href" variant="outline" color="primary" size="medium" :href="href" :target="target"
|
|
63
|
-
class="learn-btn">
|
|
64
|
-
<span>{{ text }}</span>
|
|
65
|
-
</OButton>
|
|
66
|
-
</div>
|
|
67
|
-
</ContentWrapper>
|
|
68
|
-
</div>
|
|
69
|
-
</template>
|
|
70
|
-
|
|
71
|
-
<style lang="scss">
|
|
72
|
-
.banner-content {
|
|
73
|
-
width: 100%;
|
|
74
|
-
position: relative;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.banner-bg {
|
|
78
|
-
height: 100%;
|
|
79
|
-
margin: 0 auto;
|
|
80
|
-
background-repeat: no-repeat;
|
|
81
|
-
background-size: cover;
|
|
82
|
-
background-position: center;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.banner-text {
|
|
86
|
-
position: absolute;
|
|
87
|
-
width: 100%;
|
|
88
|
-
height: 100%;
|
|
89
|
-
top: 0;
|
|
90
|
-
left: 0;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.banner-text-content {
|
|
94
|
-
height: 100%;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.learn-btn {
|
|
98
|
-
margin-top: 24px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.banner-small {
|
|
102
|
-
height: 280px;
|
|
103
|
-
|
|
104
|
-
.banner-title {
|
|
105
|
-
color: var(--o-color-info1);
|
|
106
|
-
font-weight: 500;
|
|
107
|
-
padding-top: 48px;
|
|
108
|
-
@include display2;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.banner-subtitle {
|
|
112
|
-
color: var(--o-color-info1);
|
|
113
|
-
margin-top: 8px;
|
|
114
|
-
width: 60%;
|
|
115
|
-
@include text2;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
@media (min-width: 1201px) and (max-width: 1680px) {
|
|
119
|
-
height: 220px;
|
|
120
|
-
|
|
121
|
-
.banner-title {
|
|
122
|
-
padding-top: 40px;
|
|
123
|
-
@include display3;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.banner-subtitle {
|
|
127
|
-
@include text1;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
@include respond-to('pad_h') {
|
|
132
|
-
height: 180px;
|
|
133
|
-
|
|
134
|
-
.banner-title {
|
|
135
|
-
padding-top: 32px;
|
|
136
|
-
@include h1;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.banner-subtitle {
|
|
140
|
-
@include tip1;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
@include respond-to('<=pad_v') {
|
|
145
|
-
display: none;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.banner-medium {
|
|
150
|
-
height: 360px;
|
|
151
|
-
|
|
152
|
-
.banner-title {
|
|
153
|
-
color: var(--o-color-info1);
|
|
154
|
-
font-weight: 500;
|
|
155
|
-
padding-top: 88px;
|
|
156
|
-
@include display2;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.banner-subtitle {
|
|
160
|
-
color: var(--o-color-info1);
|
|
161
|
-
margin-top: 8px;
|
|
162
|
-
width: 60%;
|
|
163
|
-
@include text2;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
@media (min-width: 1201px) and (max-width: 1680px) {
|
|
167
|
-
height: 280px;
|
|
168
|
-
|
|
169
|
-
.banner-title {
|
|
170
|
-
padding-top: 64px;
|
|
171
|
-
@include display3;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.banner-subtitle {
|
|
175
|
-
@include text1;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
@include respond-to('pad_h') {
|
|
180
|
-
height: 220px;
|
|
181
|
-
|
|
182
|
-
.banner-title {
|
|
183
|
-
padding-top: 48px;
|
|
184
|
-
@include h1;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.banner-subtitle {
|
|
188
|
-
@include tip1;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
@include respond-to('<=pad_v') {
|
|
193
|
-
height: 120px;
|
|
194
|
-
|
|
195
|
-
.banner-title {
|
|
196
|
-
text-align: center;
|
|
197
|
-
padding-top: 48px;
|
|
198
|
-
@include h3;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.banner-subtitle {
|
|
202
|
-
display: none;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.banner-large {
|
|
208
|
-
height: 460px;
|
|
209
|
-
|
|
210
|
-
.banner-title {
|
|
211
|
-
color: var(--o-color-info1);
|
|
212
|
-
font-weight: 500;
|
|
213
|
-
padding-top: 124px;
|
|
214
|
-
@include display1;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.banner-subtitle {
|
|
218
|
-
color: var(--o-color-info1);
|
|
219
|
-
margin-top: 8px;
|
|
220
|
-
width: 60%;
|
|
221
|
-
@include h4;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
@media (min-width: 1201px) and (max-width: 1680px) {
|
|
225
|
-
height: 400px;
|
|
226
|
-
|
|
227
|
-
.banner-title {
|
|
228
|
-
padding-top: 100px;
|
|
229
|
-
@include display2;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.banner-subtitle {
|
|
233
|
-
@include text2;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
@include respond-to('pad_h') {
|
|
238
|
-
height: 320px;
|
|
239
|
-
|
|
240
|
-
.banner-title {
|
|
241
|
-
padding-top: 80px;
|
|
242
|
-
@include display3;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.banner-subtitle {
|
|
246
|
-
@include text1;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
@include respond-to('<=pad_v') {
|
|
251
|
-
height: 184px;
|
|
252
|
-
|
|
253
|
-
.banner-title {
|
|
254
|
-
text-align: center;
|
|
255
|
-
padding-top: 48px;
|
|
256
|
-
@include h3;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
.banner-subtitle {
|
|
260
|
-
text-align: center;
|
|
261
|
-
@include tip2;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onMounted, type PropType } from 'vue';
|
|
3
|
+
import { OButton } from '@opensig/opendesign';
|
|
4
|
+
|
|
5
|
+
import AOS from 'aos';
|
|
6
|
+
|
|
7
|
+
import ContentWrapper from './ContentWrapper.vue';
|
|
8
|
+
|
|
9
|
+
defineProps({
|
|
10
|
+
backgroundImage: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: '',
|
|
13
|
+
},
|
|
14
|
+
title: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: '',
|
|
17
|
+
},
|
|
18
|
+
subtitle: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: '',
|
|
21
|
+
},
|
|
22
|
+
href: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: '',
|
|
25
|
+
},
|
|
26
|
+
text: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: '',
|
|
29
|
+
},
|
|
30
|
+
// 风格
|
|
31
|
+
theme: {
|
|
32
|
+
type: String as PropType<'light' | 'dark'>,
|
|
33
|
+
default: 'light',
|
|
34
|
+
},
|
|
35
|
+
// 指定在何处显示链接的资源
|
|
36
|
+
target: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: '_blank',
|
|
39
|
+
},
|
|
40
|
+
size: {
|
|
41
|
+
type: String as PropType<'small' | 'medium' | 'large'>,
|
|
42
|
+
default: 'medium',
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
onMounted(() => {
|
|
47
|
+
AOS.init({
|
|
48
|
+
duration: 800,
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<div class="banner-content" :class="`banner-${size}`">
|
|
55
|
+
<div class="banner-bg" :style="{ backgroundImage: `url(${backgroundImage})` }"></div>
|
|
56
|
+
<ContentWrapper class="banner-text">
|
|
57
|
+
<div class="banner-text-content">
|
|
58
|
+
<p v-if="title" class="banner-title" data-aos="fade-up">{{ title }}</p>
|
|
59
|
+
<p v-if="subtitle" class="banner-subtitle" data-aos="fade-up">
|
|
60
|
+
{{ subtitle }}
|
|
61
|
+
</p>
|
|
62
|
+
<OButton v-if="href" variant="outline" color="primary" size="medium" :href="href" :target="target"
|
|
63
|
+
class="learn-btn">
|
|
64
|
+
<span>{{ text }}</span>
|
|
65
|
+
</OButton>
|
|
66
|
+
</div>
|
|
67
|
+
</ContentWrapper>
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<style lang="scss">
|
|
72
|
+
.banner-content {
|
|
73
|
+
width: 100%;
|
|
74
|
+
position: relative;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.banner-bg {
|
|
78
|
+
height: 100%;
|
|
79
|
+
margin: 0 auto;
|
|
80
|
+
background-repeat: no-repeat;
|
|
81
|
+
background-size: cover;
|
|
82
|
+
background-position: center;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.banner-text {
|
|
86
|
+
position: absolute;
|
|
87
|
+
width: 100%;
|
|
88
|
+
height: 100%;
|
|
89
|
+
top: 0;
|
|
90
|
+
left: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.banner-text-content {
|
|
94
|
+
height: 100%;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.learn-btn {
|
|
98
|
+
margin-top: 24px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.banner-small {
|
|
102
|
+
height: 280px;
|
|
103
|
+
|
|
104
|
+
.banner-title {
|
|
105
|
+
color: var(--o-color-info1);
|
|
106
|
+
font-weight: 500;
|
|
107
|
+
padding-top: 48px;
|
|
108
|
+
@include display2;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.banner-subtitle {
|
|
112
|
+
color: var(--o-color-info1);
|
|
113
|
+
margin-top: 8px;
|
|
114
|
+
width: 60%;
|
|
115
|
+
@include text2;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@media (min-width: 1201px) and (max-width: 1680px) {
|
|
119
|
+
height: 220px;
|
|
120
|
+
|
|
121
|
+
.banner-title {
|
|
122
|
+
padding-top: 40px;
|
|
123
|
+
@include display3;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.banner-subtitle {
|
|
127
|
+
@include text1;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@include respond-to('pad_h') {
|
|
132
|
+
height: 180px;
|
|
133
|
+
|
|
134
|
+
.banner-title {
|
|
135
|
+
padding-top: 32px;
|
|
136
|
+
@include h1;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.banner-subtitle {
|
|
140
|
+
@include tip1;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@include respond-to('<=pad_v') {
|
|
145
|
+
display: none;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.banner-medium {
|
|
150
|
+
height: 360px;
|
|
151
|
+
|
|
152
|
+
.banner-title {
|
|
153
|
+
color: var(--o-color-info1);
|
|
154
|
+
font-weight: 500;
|
|
155
|
+
padding-top: 88px;
|
|
156
|
+
@include display2;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.banner-subtitle {
|
|
160
|
+
color: var(--o-color-info1);
|
|
161
|
+
margin-top: 8px;
|
|
162
|
+
width: 60%;
|
|
163
|
+
@include text2;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@media (min-width: 1201px) and (max-width: 1680px) {
|
|
167
|
+
height: 280px;
|
|
168
|
+
|
|
169
|
+
.banner-title {
|
|
170
|
+
padding-top: 64px;
|
|
171
|
+
@include display3;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.banner-subtitle {
|
|
175
|
+
@include text1;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
@include respond-to('pad_h') {
|
|
180
|
+
height: 220px;
|
|
181
|
+
|
|
182
|
+
.banner-title {
|
|
183
|
+
padding-top: 48px;
|
|
184
|
+
@include h1;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.banner-subtitle {
|
|
188
|
+
@include tip1;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@include respond-to('<=pad_v') {
|
|
193
|
+
height: 120px;
|
|
194
|
+
|
|
195
|
+
.banner-title {
|
|
196
|
+
text-align: center;
|
|
197
|
+
padding-top: 48px;
|
|
198
|
+
@include h3;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.banner-subtitle {
|
|
202
|
+
display: none;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.banner-large {
|
|
208
|
+
height: 460px;
|
|
209
|
+
|
|
210
|
+
.banner-title {
|
|
211
|
+
color: var(--o-color-info1);
|
|
212
|
+
font-weight: 500;
|
|
213
|
+
padding-top: 124px;
|
|
214
|
+
@include display1;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.banner-subtitle {
|
|
218
|
+
color: var(--o-color-info1);
|
|
219
|
+
margin-top: 8px;
|
|
220
|
+
width: 60%;
|
|
221
|
+
@include h4;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@media (min-width: 1201px) and (max-width: 1680px) {
|
|
225
|
+
height: 400px;
|
|
226
|
+
|
|
227
|
+
.banner-title {
|
|
228
|
+
padding-top: 100px;
|
|
229
|
+
@include display2;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.banner-subtitle {
|
|
233
|
+
@include text2;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@include respond-to('pad_h') {
|
|
238
|
+
height: 320px;
|
|
239
|
+
|
|
240
|
+
.banner-title {
|
|
241
|
+
padding-top: 80px;
|
|
242
|
+
@include display3;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.banner-subtitle {
|
|
246
|
+
@include text1;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
@include respond-to('<=pad_v') {
|
|
251
|
+
height: 184px;
|
|
252
|
+
|
|
253
|
+
.banner-title {
|
|
254
|
+
text-align: center;
|
|
255
|
+
padding-top: 48px;
|
|
256
|
+
@include h3;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.banner-subtitle {
|
|
260
|
+
text-align: center;
|
|
261
|
+
@include tip2;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
</style>
|