@opendesign-plus/components 0.0.1-rc.25 → 0.0.1-rc.27
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 +111 -88
- package/dist/components/OHeaderSearch.vue.d.ts +814 -534
- package/dist/components/OHeaderUser.vue.d.ts +1 -1
- package/dist/components/OLanguageSwitcher.vue.d.ts +49 -0
- package/dist/components/OThemeSwitcher.vue.d.ts +1 -1
- package/dist/components/activity/OActivityMyCalendar.vue.d.ts +4 -4
- package/dist/components/activity/index.d.ts +2 -2
- package/dist/components/banner/OBanner.vue.d.ts +13 -0
- package/dist/components/banner/OBannerContent.vue.d.ts +7 -0
- package/dist/components/banner/index.d.ts +68 -0
- package/dist/components/banner/types.d.ts +31 -0
- package/dist/components/meeting/OMeetingCalendar.vue.d.ts +5 -3
- package/dist/components/meeting/OMeetingMyCalendar.vue.d.ts +4 -4
- package/dist/components/meeting/OMeetingPlayback.vue.d.ts +50 -1
- package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +1 -1
- package/dist/components/meeting/components/OMeetingPlaybackSubtitles.vue.d.ts +16 -1
- package/dist/components/meeting/composables/useMeetingConfig.d.ts +1 -1
- package/dist/components/meeting/index.d.ts +17 -7
- package/dist/components/meeting/types.d.ts +1 -1
- package/dist/components/search/OSearchInput.vue.d.ts +1005 -0
- package/dist/components/search/composables/useImageSearch.d.ts +48 -0
- package/dist/components/search/composables/useKeywordHighlight.d.ts +2 -0
- package/dist/components/search/composables/useSearchHistory.d.ts +14 -0
- package/dist/components/search/index.d.ts +590 -0
- package/dist/components/search/internal/HighlightText.vue.d.ts +9 -0
- package/dist/components/search/internal/SearchImageInput.vue.d.ts +716 -0
- package/dist/components/search/internal/SearchPanel.vue.d.ts +100 -0
- package/dist/components/search/types.d.ts +20 -0
- package/dist/components.cjs.js +41 -41
- package/dist/components.css +1 -1
- package/dist/components.es.js +11383 -10083
- package/dist/index.d.ts +4 -2
- package/package.json +4 -4
- package/scripts/generate-components-index.js +1 -1
- package/src/assets/styles/element-plus.scss +16 -9
- package/src/assets/svg-icons/icon-delete-hover.svg +4 -0
- package/src/assets/svg-icons/icon-delete.svg +5 -1
- package/src/assets/svg-icons/icon-image-close.svg +4 -0
- package/src/assets/svg-icons/icon-image-upload.svg +3 -0
- package/src/assets/svg-icons/icon-image-zoomin.svg +3 -0
- package/src/assets/svg-icons/icon-refresh.svg +3 -0
- package/src/components/OHeaderSearch.vue +445 -418
- package/src/components/OLanguageSwitcher.vue +211 -0
- package/src/components/OPlusConfigProvider.vue +2 -2
- package/src/components/activity/OActivityForm.vue +7 -3
- package/src/components/activity/OActivityMyCalendar.vue +16 -7
- package/src/components/banner/OBanner.vue +288 -0
- package/src/components/banner/OBannerContent.vue +175 -0
- package/src/components/banner/index.ts +18 -0
- package/src/components/banner/types.ts +39 -0
- package/src/components/header/OHeader.vue +1 -1
- package/src/components/meeting/OMeetingCalendar.vue +11 -6
- package/src/components/meeting/OMeetingForm.vue +55 -9
- package/src/components/meeting/OMeetingMyCalendar.vue +17 -14
- package/src/components/meeting/OMeetingPlayback.vue +10 -4
- package/src/components/meeting/OMeetingSigCalendar.vue +1 -1
- package/src/components/meeting/components/OMeetingCalendarList.vue +57 -21
- package/src/components/meeting/components/OMeetingCalendarSelector.vue +11 -8
- package/src/components/meeting/components/OMeetingDetail.vue +1 -1
- package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +7 -4
- package/src/components/meeting/composables/useMeetingConfig.ts +5 -5
- package/src/components/meeting/types.ts +1 -1
- package/src/components/search/OSearchInput.vue +526 -0
- package/src/components/search/composables/useImageSearch.ts +157 -0
- package/src/components/search/composables/useKeywordHighlight.ts +30 -0
- package/src/components/search/composables/useSearchHistory.ts +75 -0
- package/src/components/search/index.ts +23 -0
- package/src/components/search/internal/HighlightText.vue +37 -0
- package/src/components/search/internal/SearchImageInput.vue +498 -0
- package/src/components/search/internal/SearchPanel.vue +431 -0
- package/src/components/search/types.ts +25 -0
- package/src/i18n/en.ts +13 -1
- package/src/i18n/zh.ts +14 -3
- package/src/index.ts +5 -3
- package/vite.config.ts +4 -0
- package/dist/components/OBanner.vue.d.ts +0 -11
- package/src/components/OBanner.vue +0 -398
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed } from 'vue';
|
|
3
|
+
import { useLocale, useScreen } from '@opendesign-plus/composables';
|
|
4
|
+
import { OIcon, ODropdown, ODropdownItem } from '@opensig/opendesign';
|
|
5
|
+
|
|
6
|
+
import IconLocale from '~icons/components/icon-locale.svg';
|
|
7
|
+
|
|
8
|
+
export interface LanguageOptionT {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
simple: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
options: {
|
|
16
|
+
type: Array as () => LanguageOptionT[],
|
|
17
|
+
default() {
|
|
18
|
+
return [
|
|
19
|
+
{ id: 'zh', label: '简体中文', simple: '中' },
|
|
20
|
+
{ id: 'en', label: 'English', simple: 'EN' },
|
|
21
|
+
];
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
type: {
|
|
25
|
+
type: String as () => 'auto' | 'common' | 'mobile',
|
|
26
|
+
default: 'auto',
|
|
27
|
+
},
|
|
28
|
+
auto: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: true,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const { changeLocale, locale } = useLocale();
|
|
35
|
+
|
|
36
|
+
const { lePadV } = useScreen();
|
|
37
|
+
const lang = computed(() => {
|
|
38
|
+
return locale.value;
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
// 选择语言
|
|
43
|
+
const emits = defineEmits(['change']);
|
|
44
|
+
const changeLanguage = (newlang: LanguageOptionT) => {
|
|
45
|
+
if (props.auto) {
|
|
46
|
+
changeLocale();
|
|
47
|
+
}
|
|
48
|
+
emits('change', newlang);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const getLang = (lang: String, simple?: boolean) => {
|
|
52
|
+
const item = props.options.find((el: LanguageOptionT) => el.id === lang);
|
|
53
|
+
if (item) {
|
|
54
|
+
return simple ? item.simple : item.label;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const defaultLang = props.options[0];
|
|
58
|
+
return simple ? defaultLang.simple : defaultLang.label;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const isCommon = computed(() => {
|
|
62
|
+
return props.type === 'common' || (props.type === 'auto' && !lePadV.value);
|
|
63
|
+
});
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<template>
|
|
67
|
+
<div
|
|
68
|
+
v-if="isCommon"
|
|
69
|
+
:class="options.length <= 1 ? 'hide-lang' : 'header-lang'"
|
|
70
|
+
>
|
|
71
|
+
<ODropdown
|
|
72
|
+
trigger="hover"
|
|
73
|
+
optionPosition="bottom"
|
|
74
|
+
option-wrap-class="dropdown"
|
|
75
|
+
>
|
|
76
|
+
<div class="info-wrap">
|
|
77
|
+
<OIcon class="icon">
|
|
78
|
+
<IconLocale />
|
|
79
|
+
<div :class="['locale-tag', { 'is-en': lang === 'en' }]">{{ getLang(lang, true) }}</div>
|
|
80
|
+
</OIcon>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<template #dropdown>
|
|
84
|
+
<ODropdownItem
|
|
85
|
+
v-for="item in options"
|
|
86
|
+
@click="changeLanguage(item)"
|
|
87
|
+
:key="item.id"
|
|
88
|
+
:class="['list', { 'is-active': lang === item.id }]"
|
|
89
|
+
>
|
|
90
|
+
{{ getLang(item.id) }}
|
|
91
|
+
</ODropdownItem>
|
|
92
|
+
</template>
|
|
93
|
+
</ODropdown>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<div
|
|
97
|
+
v-else
|
|
98
|
+
:class="options.length <= 1 ? 'hide-lang' : 'mobile-change-language'"
|
|
99
|
+
>
|
|
100
|
+
<span
|
|
101
|
+
v-for="item in options"
|
|
102
|
+
:key="item.id"
|
|
103
|
+
:class="{ active: lang === item.id }"
|
|
104
|
+
@click.stop="changeLanguage(item)"
|
|
105
|
+
>{{ getLang(item.id, true) }}</span
|
|
106
|
+
>
|
|
107
|
+
</div>
|
|
108
|
+
</template>
|
|
109
|
+
|
|
110
|
+
<style lang="scss" scoped>
|
|
111
|
+
.hide-lang {
|
|
112
|
+
display: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.header-lang {
|
|
116
|
+
height: calc(100% + 10px);
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
|
|
120
|
+
.info-wrap {
|
|
121
|
+
height: 100%;
|
|
122
|
+
display: flex;
|
|
123
|
+
align-items: center;
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
|
|
126
|
+
.icon {
|
|
127
|
+
font-size: var(--o-icon_size_control-m);
|
|
128
|
+
position: relative;
|
|
129
|
+
color: var(--o-color-info1);
|
|
130
|
+
|
|
131
|
+
&:hover {
|
|
132
|
+
color: var(--o-color-primary1);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
.locale-tag {
|
|
136
|
+
position: absolute;
|
|
137
|
+
font-size: 10px;
|
|
138
|
+
height: 12px;
|
|
139
|
+
width: 12px;
|
|
140
|
+
background-color: var(--o-color-fill2);
|
|
141
|
+
|
|
142
|
+
display: flex;
|
|
143
|
+
justify-content: center;
|
|
144
|
+
align-items: center;
|
|
145
|
+
left: 12px;
|
|
146
|
+
top: 11px;
|
|
147
|
+
|
|
148
|
+
&.is-en {
|
|
149
|
+
width: 16px;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
.list {
|
|
154
|
+
background: var(--o-color-fill2);
|
|
155
|
+
cursor: pointer;
|
|
156
|
+
box-shadow: var(--o-shadow-1);
|
|
157
|
+
border-radius: var(--o-radius_control-xs);
|
|
158
|
+
padding: var(--o-gap-1);
|
|
159
|
+
width: 144px;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.o-dropdown {
|
|
164
|
+
height: 100%;
|
|
165
|
+
}
|
|
166
|
+
.o-dropdown-item {
|
|
167
|
+
background: var(--o-color-fill2);
|
|
168
|
+
cursor: pointer;
|
|
169
|
+
border-radius: var(--o-radius_control-xs);
|
|
170
|
+
padding: var(--o-gap-1);
|
|
171
|
+
min-width: 144px;
|
|
172
|
+
height: 40px;
|
|
173
|
+
color: var(--o-color-info1);
|
|
174
|
+
|
|
175
|
+
@include hover {
|
|
176
|
+
background: var(--o-color-control2-light);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&.is-active {
|
|
180
|
+
color: var(--o-color-primary1);
|
|
181
|
+
background: var(--o-color-control3-light);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
.dropdown {
|
|
185
|
+
--dropdown-list-radius: var(--o-radius-xs);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.mobile-change-language {
|
|
189
|
+
display: flex;
|
|
190
|
+
align-items: center;
|
|
191
|
+
height: 36px;
|
|
192
|
+
span {
|
|
193
|
+
color: var(--o-color-info1);
|
|
194
|
+
margin-right: var(--o-gap-1);
|
|
195
|
+
text-align: center;
|
|
196
|
+
@include text1;
|
|
197
|
+
cursor: pointer;
|
|
198
|
+
&.active {
|
|
199
|
+
color: var(--o-color-primary1);
|
|
200
|
+
font-weight: 500;
|
|
201
|
+
}
|
|
202
|
+
&:not(:last-child) {
|
|
203
|
+
&:after {
|
|
204
|
+
content: '|';
|
|
205
|
+
margin-left: var(--o-gap-1);
|
|
206
|
+
color: var(--o-color-info1);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
</style>
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { computed, provide, reactive } from 'vue';
|
|
3
3
|
|
|
4
4
|
import { OConfigProvider } from '@opensig/opendesign';
|
|
5
|
-
import zhCN from '@opensig/opendesign/es/locale/lang/zh-cn';
|
|
6
|
-
import enUS from '@opensig/opendesign/es/locale/lang/en-us';
|
|
5
|
+
import zhCN from '@opensig/opendesign/es/locale/lang/zh-cn.mjs';
|
|
6
|
+
import enUS from '@opensig/opendesign/es/locale/lang/en-us.mjs';
|
|
7
7
|
|
|
8
8
|
import { configProviderInjectKey } from '@/shared/provide';
|
|
9
9
|
|
|
@@ -297,13 +297,17 @@ const confirm = async (val: boolean) => {
|
|
|
297
297
|
}
|
|
298
298
|
loading.value = true;
|
|
299
299
|
form.value.is_publish = `${ val }`;
|
|
300
|
+
let flag = undefined;
|
|
300
301
|
if (isEdit.value && props.data?.status === 3) {
|
|
301
302
|
form.value.update_activity_id = props.data?.id;
|
|
302
|
-
await props.creatActivity?.(form.value);
|
|
303
|
+
flag = await props.creatActivity?.(form.value);
|
|
303
304
|
} else if (isEdit.value) {
|
|
304
|
-
await props.editActivity?.(props.data?.id, form.value);
|
|
305
|
+
flag = await props.editActivity?.(props.data?.id, form.value);
|
|
305
306
|
} else {
|
|
306
|
-
await props.creatActivity?.(form.value);
|
|
307
|
+
flag = await props.creatActivity?.(form.value);
|
|
308
|
+
}
|
|
309
|
+
if (typeof flag === 'boolean' && !flag) {
|
|
310
|
+
return;
|
|
307
311
|
}
|
|
308
312
|
message.success({
|
|
309
313
|
content: t('meeting.activityActionSuccess', [form.value.title, type.toLowerCase()]),
|
|
@@ -329,7 +329,10 @@ const confirm = () => {
|
|
|
329
329
|
}
|
|
330
330
|
dialogLoading.value = true;
|
|
331
331
|
props.revokeActivityRequest(currentRow.value?.id)
|
|
332
|
-
.then(() => {
|
|
332
|
+
.then((flag: any) => {
|
|
333
|
+
if (typeof flag === 'boolean' && !flag) {
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
333
336
|
message.success({
|
|
334
337
|
content: t('meeting.revokeActivitySuccess', [currentRow.value?.title]),
|
|
335
338
|
});
|
|
@@ -384,7 +387,10 @@ const handleSubmitReviewItem = (val: ActivityItemT) => {
|
|
|
384
387
|
is_publish: 'true',
|
|
385
388
|
} as ParamsItemT;
|
|
386
389
|
props.editActivityRequest(val.id, params)
|
|
387
|
-
.then(() => {
|
|
390
|
+
.then((flag: any) => {
|
|
391
|
+
if (typeof flag === 'boolean' && !flag) {
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
388
394
|
message.success({
|
|
389
395
|
content: t('meeting.submitReviewSuccess', [val.title]),
|
|
390
396
|
});
|
|
@@ -404,7 +410,10 @@ const confirmDelete = () => {
|
|
|
404
410
|
}
|
|
405
411
|
dialogLoading.value = true;
|
|
406
412
|
props.deleteActivityRequest(currentRow.value?.id)
|
|
407
|
-
.then(() => {
|
|
413
|
+
.then((flag) => {
|
|
414
|
+
if (typeof flag === 'boolean' && !flag) {
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
408
417
|
message.success({
|
|
409
418
|
content: t('meeting.deleteActivitySuccess', [currentRow.value?.title]),
|
|
410
419
|
});
|
|
@@ -939,14 +948,13 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
939
948
|
|
|
940
949
|
.date-cell {
|
|
941
950
|
height: 56px;
|
|
942
|
-
width:
|
|
943
|
-
padding: var(--o-gap-1);
|
|
951
|
+
width: 34px;
|
|
944
952
|
position: relative;
|
|
945
953
|
cursor: default !important;
|
|
946
954
|
|
|
947
955
|
.date-cell-text {
|
|
948
956
|
font-size: 14px;
|
|
949
|
-
line-height:
|
|
957
|
+
line-height: 34px;
|
|
950
958
|
border-radius: var(--activity-cell-radius);
|
|
951
959
|
background-color: var(--o-color-control2-light);
|
|
952
960
|
border: 1px solid transparent;
|
|
@@ -971,7 +979,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
971
979
|
&::after {
|
|
972
980
|
content: '';
|
|
973
981
|
position: absolute;
|
|
974
|
-
bottom:
|
|
982
|
+
bottom: 5px;
|
|
975
983
|
left: 50%;
|
|
976
984
|
transform: translateX(-50%);
|
|
977
985
|
width: 8px;
|
|
@@ -1034,6 +1042,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
1034
1042
|
display: flex;
|
|
1035
1043
|
align-items: center;
|
|
1036
1044
|
justify-content: center;
|
|
1045
|
+
min-height: 600px;
|
|
1037
1046
|
}
|
|
1038
1047
|
|
|
1039
1048
|
.o-scroller {
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { OCarousel, OCarouselItem, OFigure } from '@opensig/opendesign';
|
|
3
|
+
import { computed } from 'vue';
|
|
4
|
+
|
|
5
|
+
import { useScreen, useTheme } from '@opendesign-plus/composables';
|
|
6
|
+
import ContentWrapper from '../common/ContentWrapper.vue';
|
|
7
|
+
import BannerContent from './OBannerContent.vue';
|
|
8
|
+
import type { BannerItem } from './types';
|
|
9
|
+
|
|
10
|
+
const props = defineProps<{
|
|
11
|
+
options?: BannerItem | BannerItem[];
|
|
12
|
+
size?: 'large' | 'medium' | 'small' | 'tiny';
|
|
13
|
+
contentJustifyCenter?: boolean;
|
|
14
|
+
autoPlay?: boolean;
|
|
15
|
+
}>();
|
|
16
|
+
|
|
17
|
+
const emit = defineEmits<{
|
|
18
|
+
(e: 'click', href: string | undefined): void;
|
|
19
|
+
}>();
|
|
20
|
+
|
|
21
|
+
const { isLight } = useTheme();
|
|
22
|
+
const { isPhone } = useScreen();
|
|
23
|
+
|
|
24
|
+
// 单个 Banner(非数组,或仅含一项的数组)
|
|
25
|
+
const singleBanner = computed((): BannerItem | undefined => {
|
|
26
|
+
if (!props.options) return undefined;
|
|
27
|
+
if (Array.isArray(props.options)) {
|
|
28
|
+
return props.options.length === 1 ? props.options[0] : undefined;
|
|
29
|
+
}
|
|
30
|
+
return props.options;
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// 多个 Banner(数组且超过一项)
|
|
34
|
+
const multiBanner = computed((): BannerItem[] | undefined => {
|
|
35
|
+
if (!Array.isArray(props.options) || props.options.length <= 1) return undefined;
|
|
36
|
+
return props.options;
|
|
37
|
+
});
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<div :class="['home-banner', size]">
|
|
42
|
+
<!-- 单个 Banner 的情况 -->
|
|
43
|
+
<div v-if="singleBanner" class="content-height">
|
|
44
|
+
<div v-if="size === 'tiny'">
|
|
45
|
+
{{ singleBanner.title }}
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<BannerContent
|
|
49
|
+
v-else-if="!isPhone"
|
|
50
|
+
:info="singleBanner"
|
|
51
|
+
:size="size"
|
|
52
|
+
:content-justify-center="contentJustifyCenter"
|
|
53
|
+
:is-phone="isPhone"
|
|
54
|
+
:is-light="isLight"
|
|
55
|
+
@click="emit('click', $event)"
|
|
56
|
+
/>
|
|
57
|
+
|
|
58
|
+
<ContentWrapper v-else class="banner-wrapper">
|
|
59
|
+
<OFigure
|
|
60
|
+
class="banner-bg"
|
|
61
|
+
:src="singleBanner.bg"
|
|
62
|
+
fit="cover"
|
|
63
|
+
/>
|
|
64
|
+
</ContentWrapper>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<!-- 多个 Banner 轮播的情况 -->
|
|
68
|
+
<div v-else-if="multiBanner" class="content-height">
|
|
69
|
+
<OCarousel
|
|
70
|
+
v-if="!isPhone"
|
|
71
|
+
class="banner-carousel"
|
|
72
|
+
effect="toggle"
|
|
73
|
+
active-class="current-slide"
|
|
74
|
+
indicator-click
|
|
75
|
+
:auto-play="autoPlay"
|
|
76
|
+
>
|
|
77
|
+
<OCarouselItem
|
|
78
|
+
v-for="(info, index) in multiBanner"
|
|
79
|
+
:key="index"
|
|
80
|
+
class="banner-item"
|
|
81
|
+
:class="`banner-item${index}`"
|
|
82
|
+
>
|
|
83
|
+
<BannerContent
|
|
84
|
+
:info="info"
|
|
85
|
+
:size="size"
|
|
86
|
+
:content-justify-center="contentJustifyCenter"
|
|
87
|
+
:is-phone="isPhone"
|
|
88
|
+
:is-light="isLight"
|
|
89
|
+
@click="emit('click', $event)"
|
|
90
|
+
/>
|
|
91
|
+
</OCarouselItem>
|
|
92
|
+
</OCarousel>
|
|
93
|
+
|
|
94
|
+
<OCarousel
|
|
95
|
+
v-else
|
|
96
|
+
class="banner-carousel"
|
|
97
|
+
effect="gallery"
|
|
98
|
+
indicator-click
|
|
99
|
+
arrow="never"
|
|
100
|
+
:auto-play="autoPlay"
|
|
101
|
+
>
|
|
102
|
+
<OCarouselItem
|
|
103
|
+
v-for="(info, index) in multiBanner"
|
|
104
|
+
:key="index"
|
|
105
|
+
class="banner-item"
|
|
106
|
+
:class="`banner-item${index}`"
|
|
107
|
+
>
|
|
108
|
+
<ContentWrapper class="banner-wrapper">
|
|
109
|
+
<OFigure
|
|
110
|
+
class="banner-bg"
|
|
111
|
+
:src="info.bg"
|
|
112
|
+
@click="emit('click', info.href)"
|
|
113
|
+
/>
|
|
114
|
+
</ContentWrapper>
|
|
115
|
+
</OCarouselItem>
|
|
116
|
+
</OCarousel>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
<!-- 没有 Banner 数据的情况 -->
|
|
120
|
+
<div v-else class="content-height">
|
|
121
|
+
<p>No data.</p>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</template>
|
|
125
|
+
|
|
126
|
+
<style lang="scss" scoped>
|
|
127
|
+
.home-banner {
|
|
128
|
+
overflow: hidden;
|
|
129
|
+
position: relative;
|
|
130
|
+
|
|
131
|
+
&.tiny {
|
|
132
|
+
@include display2;
|
|
133
|
+
font-weight: 500;
|
|
134
|
+
margin: var(--o-gap-8) 0;
|
|
135
|
+
color: var(--o-color-info1);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.content-height {
|
|
139
|
+
height: 100%;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&.large {
|
|
143
|
+
--banner-height: 460px;
|
|
144
|
+
height: var(--banner-height);
|
|
145
|
+
|
|
146
|
+
@include respond-to('laptop-pc_s') {
|
|
147
|
+
--banner-height: 400px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
@include respond-to('pad_h') {
|
|
151
|
+
--banner-height: 360px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@include respond-to('<=pad_v') {
|
|
155
|
+
--banner-height: 184px;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&.medium {
|
|
160
|
+
--banner-height: 360px;
|
|
161
|
+
height: var(--banner-height);
|
|
162
|
+
|
|
163
|
+
@include respond-to('laptop-pc_s') {
|
|
164
|
+
--banner-height: 280px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@include respond-to('pad_h') {
|
|
168
|
+
--banner-height: 220px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@include respond-to('<=pad_v') {
|
|
172
|
+
--banner-height: 120px;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
&.small {
|
|
177
|
+
--banner-height: 280px;
|
|
178
|
+
height: var(--banner-height);
|
|
179
|
+
|
|
180
|
+
@include respond-to('laptop-pc_s') {
|
|
181
|
+
--banner-height: 220px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@include respond-to('pad_h') {
|
|
185
|
+
--banner-height: 180px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
@include respond-to('<=pad_v') {
|
|
189
|
+
display: none;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
:deep(.o-btn) {
|
|
194
|
+
border-radius: var(--btn-height);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.banner-carousel {
|
|
199
|
+
width: 100%;
|
|
200
|
+
height: 100%;
|
|
201
|
+
@include respond-to('>pad_v') {
|
|
202
|
+
--carousel-indicator-offset: 53px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
@include respond-to('<=pad_v') {
|
|
206
|
+
--carousel-indicator-offset: 1px;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
:deep(.o-carousel-indicator-bar) {
|
|
210
|
+
height: 24px;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.banner-item {
|
|
215
|
+
width: 100%;
|
|
216
|
+
height: 100%;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@keyframes fade-up {
|
|
220
|
+
from {
|
|
221
|
+
transform: translateY(var(--d));
|
|
222
|
+
opacity: 0;
|
|
223
|
+
}
|
|
224
|
+
to {
|
|
225
|
+
transform: translateY(0);
|
|
226
|
+
opacity: 1;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.current-slide {
|
|
231
|
+
.banner-title {
|
|
232
|
+
animation: fade-up 400ms ease-in;
|
|
233
|
+
}
|
|
234
|
+
.banner-subtitle {
|
|
235
|
+
animation: fade-up 400ms ease-in;
|
|
236
|
+
}
|
|
237
|
+
.banner-text {
|
|
238
|
+
animation: fade-up 400ms ease-in;
|
|
239
|
+
}
|
|
240
|
+
.banner-opts {
|
|
241
|
+
animation: fade-up 400ms ease-in;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
</style>
|
|
245
|
+
|
|
246
|
+
<style lang="scss" scoped>
|
|
247
|
+
// 定制修改item1
|
|
248
|
+
.banner-item0 {
|
|
249
|
+
.banner-attach {
|
|
250
|
+
height: 120px;
|
|
251
|
+
|
|
252
|
+
@include respond-to('pad') {
|
|
253
|
+
height: 80px;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.banner-item1 {
|
|
259
|
+
.banner-attach {
|
|
260
|
+
height: 156px;
|
|
261
|
+
|
|
262
|
+
@include respond-to('pad') {
|
|
263
|
+
height: 120px;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// 定制修改item2
|
|
269
|
+
.banner-item2 {
|
|
270
|
+
.banner-content {
|
|
271
|
+
width: 100%;
|
|
272
|
+
justify-content: center;
|
|
273
|
+
}
|
|
274
|
+
.banner-attach {
|
|
275
|
+
height: 38%;
|
|
276
|
+
margin-top: -60px;
|
|
277
|
+
object-fit: contain;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.banner-wrapper {
|
|
282
|
+
height: 100%;
|
|
283
|
+
|
|
284
|
+
.banner-bg {
|
|
285
|
+
height: 100%;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
</style>
|