@opendesign-plus/components 0.0.1-rc.10
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 +833 -0
- package/dist/components/OBanner.vue.d.ts +11 -0
- package/dist/components/OCookieNotice.vue.d.ts +17 -0
- package/dist/components/OFooter.vue.d.ts +46 -0
- package/dist/components/OHeaderSearch.vue.d.ts +692 -0
- package/dist/components/OHeaderUser.vue.d.ts +38 -0
- package/dist/components/OPlusConfigProvider.vue.d.ts +23 -0
- package/dist/components/OSection.vue.d.ts +37 -0
- package/dist/components/OSourceCode.vue.d.ts +20 -0
- package/dist/components/OThemeSwitcher.vue.d.ts +28 -0
- package/dist/components/activity/OActivityApproval.vue.d.ts +277 -0
- package/dist/components/activity/OActivityForm.vue.d.ts +140 -0
- package/dist/components/activity/OMyActivityCalendar.vue.d.ts +578 -0
- package/dist/components/activity/config.d.ts +15 -0
- package/dist/components/activity/index.d.ts +623 -0
- package/dist/components/activity/types.d.ts +81 -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 +27 -0
- package/dist/components/events/index.d.ts +78 -0
- package/dist/components/events/types.d.ts +66 -0
- package/dist/components/events/utils.d.ts +7 -0
- package/dist/components/header/OHeader.vue.d.ts +24 -0
- package/dist/components/header/OHeaderMoblie.vue.d.ts +33 -0
- 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 +298 -0
- package/dist/components/meeting/OMeetingForm.vue.d.ts +145 -0
- package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +586 -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 +12 -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/config.d.ts +27 -0
- package/dist/components/meeting/types.d.ts +166 -0
- package/dist/components/meeting/utils.d.ts +22 -0
- package/dist/components.cjs.js +224 -0
- package/dist/components.css +1 -0
- package/dist/components.element.cjs.js +1 -0
- package/dist/components.element.es.js +4 -0
- package/dist/components.es.js +45054 -0
- package/dist/index.d.ts +19 -0
- package/docs/design.md +27 -0
- package/docs/design_banner.md +41 -0
- package/docs/design_section.md +27 -0
- package/package.json +56 -0
- package/scripts/generate-components-index.js +104 -0
- 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 -0
- package/src/assets/svg-icons/icon-chevron-up.svg +3 -0
- package/src/assets/svg-icons/icon-close.svg +3 -0
- package/src/assets/svg-icons/icon-delete.svg +3 -0
- package/src/assets/svg-icons/icon-filter.svg +3 -0
- package/src/assets/svg-icons/icon-header-back.svg +3 -0
- package/src/assets/svg-icons/icon-header-delete.svg +3 -0
- 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 -0
- 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 -0
- 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 -0
- package/src/assets/svg-icons/icon-tips.svg +3 -0
- package/src/components/OBanner.vue +398 -0
- package/src/components/OCookieNotice.vue +575 -0
- package/src/components/OFooter.vue +576 -0
- package/src/components/OHeaderSearch.vue +601 -0
- package/src/components/OHeaderUser.vue +237 -0
- package/src/components/OPlusConfigProvider.vue +32 -0
- package/src/components/OSection.vue +178 -0
- package/src/components/OSourceCode.vue +153 -0
- package/src/components/OThemeSwitcher.vue +108 -0
- package/src/components/activity/OActivityApproval.vue +871 -0
- package/src/components/activity/OActivityForm.vue +548 -0
- package/src/components/activity/OMyActivityCalendar.vue +1501 -0
- package/src/components/activity/config.ts +141 -0
- package/src/components/activity/index.ts +24 -0
- package/src/components/activity/types.ts +88 -0
- package/src/components/common/AppAvatar.vue +83 -0
- package/src/components/common/ClientOnlyWrapper.ts +21 -0
- package/src/components/common/ContentWrapper.vue +85 -0
- 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 +419 -0
- package/src/components/events/OEventsCalendar.vue +588 -0
- package/src/components/events/OEventsList.vue +354 -0
- package/src/components/events/config.ts +35 -0
- package/src/components/events/index.ts +24 -0
- package/src/components/events/types.ts +80 -0
- package/src/components/events/utils.ts +9 -0
- package/src/components/header/OHeader.vue +175 -0
- package/src/components/header/OHeaderMoblie.vue +152 -0
- package/src/components/header/components/HeaderContent.vue +942 -0
- package/src/components/header/components/HeaderNav.vue +280 -0
- package/src/components/header/components/HeaderNavMoblie.vue +346 -0
- package/src/components/header/components/HeaderUbmcNav.vue +540 -0
- package/src/components/header/index.ts +16 -0
- package/src/components/meeting/OMeetingCalendar.vue +900 -0
- package/src/components/meeting/OMeetingForm.vue +1041 -0
- package/src/components/meeting/OMeetingPlayback.vue +439 -0
- package/src/components/meeting/OMyMeetingCalendar.vue +1502 -0
- package/src/components/meeting/OSigMeetingCalendar.vue +411 -0
- package/src/components/meeting/components/OMeetingCalendarList.vue +505 -0
- package/src/components/meeting/components/OMeetingCalendarSelector.vue +206 -0
- package/src/components/meeting/components/OMeetingDetail.vue +227 -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 +197 -0
- package/src/components/meeting/config.ts +121 -0
- package/src/components/meeting/index.ts +45 -0
- package/src/components/meeting/types.ts +193 -0
- package/src/components/meeting/utils.ts +123 -0
- package/src/draft/Banner.vue +265 -0
- package/src/draft/ButtonCards.vue +106 -0
- package/src/draft/Feature.vue +134 -0
- package/src/draft/Footer.vue +512 -0
- package/src/draft/HorizontalAnchor.vue +165 -0
- package/src/draft/ItemSwiper.vue +133 -0
- package/src/draft/Logo.vue +141 -0
- package/src/draft/LogoCard.vue +75 -0
- package/src/draft/LogoV2.vue +19 -0
- package/src/draft/MainCard.vue +38 -0
- package/src/draft/MultiCard.vue +95 -0
- package/src/draft/MultiIconCard.vue +74 -0
- package/src/draft/OInfoCard.vue +176 -0
- package/src/draft/Process.vue +81 -0
- package/src/draft/Section.vue +167 -0
- package/src/draft/SingleTabCard.vue +85 -0
- package/src/draft/SliderCard.vue +110 -0
- package/src/env.d.ts +16 -0
- package/src/i18n/en.ts +261 -0
- package/src/i18n/index.ts +56 -0
- package/src/i18n/zh.ts +250 -0
- package/src/index.ts +45 -0
- package/src/shared/provide.ts +6 -0
- package/src/shims-vue-dompurify-html.d.ts +17 -0
- package/src/vue.d.ts +10 -0
- package/tsconfig.json +37 -0
- package/vite.config.ts +118 -0
|
@@ -0,0 +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>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed } from 'vue';
|
|
3
|
+
import { OCard, type CardPropsT, OScroller, OLink, OButton } from '@opensig/opendesign';
|
|
4
|
+
import { useScreen } from '@/composables/useScreen.ts';
|
|
5
|
+
|
|
6
|
+
const { isPadV, isPhone } = useScreen();
|
|
7
|
+
|
|
8
|
+
export type OperationType = 'button' | 'link';
|
|
9
|
+
export type OperationAction = string | (() => void);
|
|
10
|
+
export type ButtonCardOperation = {
|
|
11
|
+
label: string;
|
|
12
|
+
type?: OperationType;
|
|
13
|
+
action: OperationAction;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type IconCardT = Pick<CardPropsT, 'title' | 'detail' | 'cover'> & {
|
|
17
|
+
operations?: ButtonCardOperation[]
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const props = withDefaults(defineProps<{
|
|
21
|
+
/*卡片各自的配置*/
|
|
22
|
+
cards: IconCardT[];
|
|
23
|
+
/*所有卡片的配置,优先级低于cards*/
|
|
24
|
+
cardProps?: CardPropsT;
|
|
25
|
+
}>(), {
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
const widthPerCard = computed(() => {
|
|
30
|
+
if(isPhone.value) {
|
|
31
|
+
return `100%`;
|
|
32
|
+
}
|
|
33
|
+
if(isPadV.value) {
|
|
34
|
+
return `calc((100% - var(--grid-column-gutter)) / 2)`;
|
|
35
|
+
}
|
|
36
|
+
if(props.cards.length <= 4) {
|
|
37
|
+
return `calc((100% - var(--grid-column-gutter) * ${props.cards.length - 1}) / ${props.cards.length})`;
|
|
38
|
+
}
|
|
39
|
+
return `calc((100% - var(--grid-column-gutter) * 3) / 4)`;
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const getAction = (action: OperationAction) => {
|
|
43
|
+
if (typeof action === 'string') {
|
|
44
|
+
window.open(action, '_blank');
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
action();
|
|
48
|
+
}
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<template>
|
|
52
|
+
<OScroller v-if="props.cards?.length" class="multi-card-wrapper" show-type="always" disabled-y>
|
|
53
|
+
<OCard
|
|
54
|
+
v-for="(card, index) in cards"
|
|
55
|
+
:key="index"
|
|
56
|
+
class="multi-icon-card-item"
|
|
57
|
+
v-bind="{
|
|
58
|
+
coverRatio: 16/9,
|
|
59
|
+
...props.cardProps,
|
|
60
|
+
...card,
|
|
61
|
+
}"
|
|
62
|
+
>
|
|
63
|
+
<template #footer>
|
|
64
|
+
<div class="operations">
|
|
65
|
+
<template v-for="item in card.operations" :key="item.label">
|
|
66
|
+
<OButton v-if="item.type === 'button'" size="large" round="pill" @click="getAction(item.action)">Button</OButton>
|
|
67
|
+
<OLink v-else @click="getAction(item.action)">Link</OLink>
|
|
68
|
+
</template>
|
|
69
|
+
</div>
|
|
70
|
+
</template>
|
|
71
|
+
</OCard>
|
|
72
|
+
</OScroller>
|
|
73
|
+
</template>
|
|
74
|
+
|
|
75
|
+
<style lang="scss" scoped>
|
|
76
|
+
.multi-card-wrapper {
|
|
77
|
+
white-space: nowrap;
|
|
78
|
+
--grid-column-gutter: var(--o3-gap-6);
|
|
79
|
+
--card-detail-max-row: 2;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.operations {
|
|
83
|
+
@include text1;
|
|
84
|
+
display: flex;
|
|
85
|
+
gap: var(--o3-gap-4);
|
|
86
|
+
align-items: center;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.o-card {
|
|
90
|
+
--card-content-color: var(--o-color-info3);
|
|
91
|
+
--card-footer-gap: var(--o3-gap-3);
|
|
92
|
+
display: inline-block;
|
|
93
|
+
width: v-bind(widthPerCard);
|
|
94
|
+
|
|
95
|
+
&:not(:first-child) {
|
|
96
|
+
margin-left: var(--grid-column-gutter);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@include respond-to("phone") {
|
|
100
|
+
--card-header-text-size: 16px;
|
|
101
|
+
--card-header-text-height: 24px;
|
|
102
|
+
--card-content-text-size: 14px;
|
|
103
|
+
--card-content-text-height: 22px;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
</style>
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { useScreen } from '@/composables/useScreen.ts';
|
|
3
|
+
|
|
4
|
+
const { gtPadV } = useScreen();
|
|
5
|
+
|
|
6
|
+
interface FeatureT {
|
|
7
|
+
title: string;
|
|
8
|
+
content: string;
|
|
9
|
+
icon?: any;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const props = defineProps<{
|
|
13
|
+
features: FeatureT[];
|
|
14
|
+
}>();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<div v-if="props.features.length" class="feature-list">
|
|
19
|
+
<div class="feature-list__item" v-for="(feature, index) in props.features" :key="index">
|
|
20
|
+
<div class="feature-item">
|
|
21
|
+
<component :is="feature.icon" class="g-icon-48"></component>
|
|
22
|
+
<div class="feature-title">{{ feature.title }}</div>
|
|
23
|
+
<div v-if="gtPadV" class="feature-content">{{ feature.content }}</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<style lang="scss" scoped>
|
|
30
|
+
.feature-list {
|
|
31
|
+
background-color: var(--o-color-fill2);
|
|
32
|
+
padding: var(--o3-gap-8) var(--o3-gap-10);
|
|
33
|
+
display: grid;
|
|
34
|
+
justify-items: center;
|
|
35
|
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
|
36
|
+
column-gap: var(--o3-gap-8);
|
|
37
|
+
row-gap: var(--o3-gap-7);
|
|
38
|
+
border-radius: var(--o3-radius-l);
|
|
39
|
+
|
|
40
|
+
@include respond-to('phone') {
|
|
41
|
+
gap: 0;
|
|
42
|
+
display: flex;
|
|
43
|
+
white-space: nowrap;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
overflow-x: scroll;
|
|
46
|
+
width: 100%;
|
|
47
|
+
padding: 16px 0;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.feature-list__item {
|
|
52
|
+
position: relative;
|
|
53
|
+
width: 100%;
|
|
54
|
+
text-align: center;
|
|
55
|
+
|
|
56
|
+
&::after {
|
|
57
|
+
content: '';
|
|
58
|
+
position: absolute;
|
|
59
|
+
top: 24px;
|
|
60
|
+
right: calc(0% - var(--o3-gap-8) / 2);
|
|
61
|
+
height: 96px;
|
|
62
|
+
background-color: rgba(0, 0, 0, 0.1);
|
|
63
|
+
width: 1px;
|
|
64
|
+
|
|
65
|
+
@include respond-to('<=pad_v') {
|
|
66
|
+
top: 16px;
|
|
67
|
+
height: 36px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:last-child,
|
|
72
|
+
&:nth-of-type(3n) {
|
|
73
|
+
&::after {
|
|
74
|
+
display: none;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&:nth-of-type(2) {
|
|
79
|
+
.feature-content {
|
|
80
|
+
max-width: 288px;
|
|
81
|
+
|
|
82
|
+
@include respond-to('<=laptop') {
|
|
83
|
+
max-width: 252px;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@include respond-to('phone') {
|
|
89
|
+
&::after {
|
|
90
|
+
display: none;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.feature-item {
|
|
96
|
+
text-align: center;
|
|
97
|
+
position: relative;
|
|
98
|
+
display: inline-block;
|
|
99
|
+
max-width: 320px;
|
|
100
|
+
|
|
101
|
+
@include respond-to('phone') {
|
|
102
|
+
flex: 0 0 auto;
|
|
103
|
+
width: 25vw;
|
|
104
|
+
padding: 0 24px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.feature-content {
|
|
108
|
+
@include text1
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.feature-title {
|
|
113
|
+
@include h4;
|
|
114
|
+
white-space: wrap;
|
|
115
|
+
font-weight: 600;
|
|
116
|
+
margin-top: var(--o3-gap-4);
|
|
117
|
+
margin-bottom: var(--o3-gap-2);
|
|
118
|
+
color: var(--o-color-info1);
|
|
119
|
+
|
|
120
|
+
@include respond-to('phone') {
|
|
121
|
+
white-space: pre-wrap;
|
|
122
|
+
|
|
123
|
+
@include tip2;
|
|
124
|
+
|
|
125
|
+
&::after {
|
|
126
|
+
display: none;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.g-icon-48 {
|
|
132
|
+
font-size: var(--o-icon_size-xl);
|
|
133
|
+
}
|
|
134
|
+
</style>
|