@opendesign-plus-test/components 0.0.1-rc.43 → 0.0.1-rc.45
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 +67 -47
- package/dist/components/OHeaderSearch.vue.d.ts +822 -500
- package/dist/components/activity/OMyActivityCalendar.vue.d.ts +86 -24
- package/dist/components/activity/index.d.ts +43 -12
- package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +86 -24
- package/dist/components/meeting/index.d.ts +43 -12
- package/dist/components/search/OSearchInput.vue.d.ts +1003 -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 +11228 -10253
- package/dist/index.d.ts +1 -0
- package/package.json +3 -3
- 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/OBanner.vue +18 -18
- package/src/components/OCookieNotice.vue +21 -21
- package/src/components/OFooter.vue +18 -17
- package/src/components/OHeaderSearch.vue +402 -420
- package/src/components/OHeaderUser.vue +3 -2
- package/src/components/OSection.vue +4 -4
- package/src/components/activity/OActivityApproval.vue +4 -4
- package/src/components/activity/OActivityForm.vue +2 -2
- package/src/components/activity/OMyActivityCalendar.vue +26 -26
- package/src/components/activity/config.ts +1 -1
- package/src/components/common/ContentWrapper.vue +3 -3
- package/src/components/element-plus/OElCookieNotice.vue +26 -26
- package/src/components/events/OEventsApply.vue +44 -44
- package/src/components/events/OEventsCalendar.vue +14 -14
- package/src/components/events/OEventsList.vue +16 -16
- package/src/components/header/OHeader.vue +2 -2
- package/src/components/header/components/HeaderContent.vue +60 -60
- package/src/components/header/components/HeaderNav.vue +4 -4
- package/src/components/header/components/HeaderNavMobile.vue +3 -3
- package/src/components/meeting/OMeetingCalendar.vue +27 -27
- package/src/components/meeting/OMeetingForm.vue +16 -16
- package/src/components/meeting/OMeetingPlayback.vue +4 -4
- package/src/components/meeting/OMyMeetingCalendar.vue +25 -25
- package/src/components/meeting/OSigMeetingCalendar.vue +3 -3
- package/src/components/meeting/components/OMeetingCalendarList.vue +9 -9
- package/src/components/meeting/components/OMeetingDetail.vue +2 -2
- package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +1 -1
- package/src/components/meeting/components/OMeetingPlaybackVideo.vue +5 -5
- package/src/components/meeting/components/OSigMeetingAside.vue +6 -6
- package/src/components/search/OSearchInput.vue +463 -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 +488 -0
- package/src/components/search/internal/SearchPanel.vue +430 -0
- package/src/components/search/types.ts +25 -0
- package/src/draft/Banner.vue +6 -6
- package/src/draft/ButtonCards.vue +1 -1
- package/src/draft/Feature.vue +6 -6
- package/src/draft/Footer.vue +29 -22
- package/src/draft/HorizontalAnchor.vue +4 -4
- package/src/draft/ItemSwiper.vue +2 -2
- package/src/draft/Logo.vue +3 -3
- package/src/draft/LogoCard.vue +2 -2
- package/src/draft/MultiCard.vue +1 -1
- package/src/draft/MultiIconCard.vue +1 -1
- package/src/draft/OInfoCard.vue +4 -4
- package/src/draft/Section.vue +4 -4
- package/src/draft/SingleTabCard.vue +1 -1
- package/src/draft/SliderCard.vue +4 -3
- package/src/i18n/en.ts +10 -0
- package/src/i18n/zh.ts +10 -0
- package/src/index.ts +1 -0
- package/vite.config.ts +1 -1
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue';
|
|
3
|
+
import { OIcon } from '@opensig/opendesign';
|
|
4
|
+
import IconDelete from '~icons/components/icon-delete-hover.svg';
|
|
5
|
+
import IconDeleteAll from '~icons/components/icon-delete.svg';
|
|
6
|
+
import IconRefresh from '~icons/components/icon-refresh.svg';
|
|
7
|
+
import HighlightText from './HighlightText.vue';
|
|
8
|
+
import { useI18n } from '@/i18n';
|
|
9
|
+
import type { OSearchRecommendItem } from '../types';
|
|
10
|
+
|
|
11
|
+
export interface SearchPanelPropsT {
|
|
12
|
+
keyword?: string;
|
|
13
|
+
onestepItems?: OSearchRecommendItem[];
|
|
14
|
+
onestepTitle?: string;
|
|
15
|
+
suggestItems?: OSearchRecommendItem[];
|
|
16
|
+
suggestTitle?: string;
|
|
17
|
+
recommendItems?: string[];
|
|
18
|
+
historyItems?: string[];
|
|
19
|
+
historyTitle?: string;
|
|
20
|
+
hotItems?: string[];
|
|
21
|
+
hotTitle?: string;
|
|
22
|
+
noDataText?: string;
|
|
23
|
+
highlightKeyword?: boolean;
|
|
24
|
+
/** When true, show history+hot sections only if keyword is empty */
|
|
25
|
+
hideOnKeyword?: boolean;
|
|
26
|
+
/** When true, show suggest empty state ("no data") even when list is empty */
|
|
27
|
+
showSuggestEmpty?: boolean;
|
|
28
|
+
isDark?: boolean;
|
|
29
|
+
/** 'chips' = tag-cloud (header dropdown), 'list' = full-width rows (page search) */
|
|
30
|
+
historyLayout?: 'chips' | 'list';
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const props = withDefaults(defineProps<SearchPanelPropsT>(), {
|
|
34
|
+
keyword: '',
|
|
35
|
+
onestepItems: () => [],
|
|
36
|
+
suggestItems: () => [],
|
|
37
|
+
recommendItems: () => [],
|
|
38
|
+
historyItems: () => [],
|
|
39
|
+
hotItems: () => [],
|
|
40
|
+
highlightKeyword: true,
|
|
41
|
+
hideOnKeyword: false,
|
|
42
|
+
showSuggestEmpty: false,
|
|
43
|
+
isDark: false,
|
|
44
|
+
historyLayout: 'chips',
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const emit = defineEmits<{
|
|
48
|
+
(e: 'onestep-click', item: OSearchRecommendItem): void;
|
|
49
|
+
(e: 'suggest-click', item: OSearchRecommendItem): void;
|
|
50
|
+
(e: 'recommend-click', val: string): void;
|
|
51
|
+
(e: 'history-click', val: string): void;
|
|
52
|
+
(e: 'hot-click', val: string): void;
|
|
53
|
+
(e: 'history-remove', val: string): void;
|
|
54
|
+
(e: 'history-clear'): void;
|
|
55
|
+
(e: 'hot-refresh'): void;
|
|
56
|
+
}>();
|
|
57
|
+
|
|
58
|
+
const { t } = useI18n();
|
|
59
|
+
|
|
60
|
+
const hasKeyword = computed(() => !!props.keyword?.trim());
|
|
61
|
+
|
|
62
|
+
const showOnestep = computed(() => hasKeyword.value && props.onestepItems.length > 0);
|
|
63
|
+
const showSuggest = computed(() => hasKeyword.value && (props.suggestItems.length > 0 || props.showSuggestEmpty));
|
|
64
|
+
const showRecommend = computed(
|
|
65
|
+
() => !hasKeyword.value && props.recommendItems.length > 0
|
|
66
|
+
);
|
|
67
|
+
const showHistory = computed(
|
|
68
|
+
() => (!props.hideOnKeyword || !hasKeyword.value) && props.historyItems.length > 0
|
|
69
|
+
);
|
|
70
|
+
const showHot = computed(
|
|
71
|
+
() => (!props.hideOnKeyword || !hasKeyword.value) && props.hotItems.length > 0
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
const showSuggestDivider = computed(() => showOnestep.value && showSuggest.value);
|
|
75
|
+
const showHistoryHotDivider = computed(() => showHistory.value && showHot.value);
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<template>
|
|
79
|
+
<div class="o-search-panel">
|
|
80
|
+
<!-- ONESTEP / 搜索直达 -->
|
|
81
|
+
<div v-if="showOnestep" class="o-search-panel-section o-search-panel-onestep">
|
|
82
|
+
<slot name="onestep-header" :items="onestepItems">
|
|
83
|
+
<div class="o-search-panel-section-title onestep">{{ onestepTitle ?? t('search.onestep') }}</div>
|
|
84
|
+
</slot>
|
|
85
|
+
<slot name="onestep-content" :items="onestepItems" :keyword="keyword">
|
|
86
|
+
<div
|
|
87
|
+
v-for="item in onestepItems"
|
|
88
|
+
:key="item.key + (item.path ?? '')"
|
|
89
|
+
class="o-search-panel-item o-search-panel-onestep-item"
|
|
90
|
+
@click="emit('onestep-click', item)"
|
|
91
|
+
>
|
|
92
|
+
<HighlightText :text="item.key" :keyword="keyword" :enabled="highlightKeyword" />
|
|
93
|
+
<span v-if="item.type" class="o-search-panel-onestep-tag">{{ item.type }}</span>
|
|
94
|
+
</div>
|
|
95
|
+
</slot>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<div v-if="showSuggestDivider" class="o-search-panel-divider"></div>
|
|
99
|
+
|
|
100
|
+
<!-- SUGGEST / 搜索建议 (rich items) -->
|
|
101
|
+
<div v-if="showSuggest" class="o-search-panel-section o-search-panel-suggest">
|
|
102
|
+
<slot name="suggest-header" :items="suggestItems">
|
|
103
|
+
<div class="o-search-panel-section-title suggest">{{ suggestTitle ?? t('search.suggest') }}</div>
|
|
104
|
+
</slot>
|
|
105
|
+
<slot name="suggest-content" :items="suggestItems" :keyword="keyword">
|
|
106
|
+
<template v-if="suggestItems.length">
|
|
107
|
+
<div
|
|
108
|
+
v-for="item in suggestItems"
|
|
109
|
+
:key="item.key"
|
|
110
|
+
class="o-search-panel-item"
|
|
111
|
+
@click="emit('suggest-click', item)"
|
|
112
|
+
>
|
|
113
|
+
<HighlightText :text="item.key" :keyword="keyword" :enabled="highlightKeyword" />
|
|
114
|
+
</div>
|
|
115
|
+
</template>
|
|
116
|
+
<div v-else class="o-search-panel-no-data">{{ noDataText ?? t('search.noData') }}</div>
|
|
117
|
+
</slot>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<!-- RECOMMEND (legacy plain string list, shown when no keyword) -->
|
|
121
|
+
<div v-if="showRecommend" class="o-search-panel-section o-search-panel-recommend">
|
|
122
|
+
<slot name="recommend-header" :items="recommendItems" />
|
|
123
|
+
<slot name="recommend-content" :items="recommendItems">
|
|
124
|
+
<div
|
|
125
|
+
v-for="item in recommendItems"
|
|
126
|
+
:key="item"
|
|
127
|
+
class="o-search-panel-recommend-item"
|
|
128
|
+
@click="emit('recommend-click', item)"
|
|
129
|
+
>
|
|
130
|
+
{{ item }}
|
|
131
|
+
</div>
|
|
132
|
+
</slot>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<!-- HISTORY / 历史记录 -->
|
|
136
|
+
<div v-if="showHistory" class="o-search-panel-section o-search-panel-history">
|
|
137
|
+
<slot name="history-header" :items="historyItems">
|
|
138
|
+
<div class="o-search-panel-common-header">
|
|
139
|
+
<span class="o-search-panel-section-title">{{ historyTitle ?? t('search.history') }}</span>
|
|
140
|
+
<OIcon v-if="historyLayout !== 'list'" class="o-search-panel-icon" @click.stop="emit('history-clear')">
|
|
141
|
+
<IconDeleteAll />
|
|
142
|
+
</OIcon>
|
|
143
|
+
</div>
|
|
144
|
+
</slot>
|
|
145
|
+
<slot name="history-content" :items="historyItems">
|
|
146
|
+
<!-- list layout: full-width rows, no delete icon -->
|
|
147
|
+
<template v-if="historyLayout === 'list'">
|
|
148
|
+
<div
|
|
149
|
+
v-for="item in historyItems"
|
|
150
|
+
:key="item"
|
|
151
|
+
class="o-search-panel-history-row"
|
|
152
|
+
@click="emit('history-click', item)"
|
|
153
|
+
>
|
|
154
|
+
<span class="o-search-panel-history-row-text">{{ item }}</span>
|
|
155
|
+
</div>
|
|
156
|
+
</template>
|
|
157
|
+
<!-- chips layout (default): tag-cloud -->
|
|
158
|
+
<template v-else>
|
|
159
|
+
<div class="o-search-panel-history-list">
|
|
160
|
+
<div
|
|
161
|
+
v-for="item in historyItems"
|
|
162
|
+
:key="item"
|
|
163
|
+
class="o-search-panel-history-item"
|
|
164
|
+
:class="{ 'is-dark': isDark }"
|
|
165
|
+
@click="emit('history-click', item)"
|
|
166
|
+
>
|
|
167
|
+
<span class="o-search-panel-history-text">{{ item }}</span>
|
|
168
|
+
<OIcon class="o-search-panel-history-remove" @click.stop="emit('history-remove', item)">
|
|
169
|
+
<IconDelete />
|
|
170
|
+
</OIcon>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</template>
|
|
174
|
+
</slot>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
<div v-if="showHistoryHotDivider" class="o-search-panel-divider"></div>
|
|
178
|
+
|
|
179
|
+
<!-- HOT / 热门搜索 -->
|
|
180
|
+
<div v-if="showHot" class="o-search-panel-section o-search-panel-hot">
|
|
181
|
+
<slot name="hot-header" :items="hotItems">
|
|
182
|
+
<div class="o-search-panel-common-header">
|
|
183
|
+
<div class="o-search-panel-section-title">{{ hotTitle ?? t('search.hot') }}</div>
|
|
184
|
+
<OIcon class="o-search-panel-icon" @click.stop="emit('hot-refresh')">
|
|
185
|
+
<IconRefresh />
|
|
186
|
+
</OIcon>
|
|
187
|
+
</div>
|
|
188
|
+
</slot>
|
|
189
|
+
<slot name="hot-content" :items="hotItems">
|
|
190
|
+
<div class="o-search-panel-hot-list">
|
|
191
|
+
<div
|
|
192
|
+
v-for="item in hotItems"
|
|
193
|
+
:key="item"
|
|
194
|
+
class="o-search-panel-hot-item"
|
|
195
|
+
@click="emit('hot-click', item)"
|
|
196
|
+
>
|
|
197
|
+
{{ item }}
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
</slot>
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
</template>
|
|
204
|
+
|
|
205
|
+
<style lang="scss" scoped>
|
|
206
|
+
.o-search-panel {
|
|
207
|
+
display: flex;
|
|
208
|
+
flex-direction: column;
|
|
209
|
+
gap: var(--o-gap-4);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.o-search-panel-section + .o-search-panel-section {
|
|
213
|
+
// sections rely on explicit dividers / gap from parent
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.o-search-panel-section-title {
|
|
217
|
+
|
|
218
|
+
&.suggest,
|
|
219
|
+
&.onestep {
|
|
220
|
+
margin-bottom: var(--o-gap-3);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@include tip1;
|
|
224
|
+
color: var(--o-color-info3);
|
|
225
|
+
font-weight: 400;
|
|
226
|
+
|
|
227
|
+
@include respond-to('<=pad_v') {
|
|
228
|
+
color: var(--o-color-info1);
|
|
229
|
+
@include text2;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.o-search-panel-item {
|
|
234
|
+
@include tip1;
|
|
235
|
+
padding: 5px 8px;
|
|
236
|
+
cursor: pointer;
|
|
237
|
+
color: var(--o-color-info1);
|
|
238
|
+
border-radius: var(--o-radius-xs);
|
|
239
|
+
|
|
240
|
+
&:hover {
|
|
241
|
+
background-color: var(--o-color-control2-light);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
&:active {
|
|
245
|
+
background-color: var(--o-color-control3-light);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
@include respond-to('<=pad_v') {
|
|
249
|
+
@include text1;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.o-search-panel-onestep-item {
|
|
254
|
+
display: flex;
|
|
255
|
+
align-items: center;
|
|
256
|
+
white-space: pre-wrap;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.o-search-panel-onestep-tag {
|
|
260
|
+
@include tip2;
|
|
261
|
+
height: 20px;
|
|
262
|
+
display: inline-flex;
|
|
263
|
+
align-items: center;
|
|
264
|
+
padding: 1px 8px;
|
|
265
|
+
border-radius: 4px;
|
|
266
|
+
font-weight: 400;
|
|
267
|
+
margin-left: 8px;
|
|
268
|
+
border: 1px solid var(--o-color-control4);
|
|
269
|
+
color: var(--o-color-info3);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.o-search-panel-no-data {
|
|
273
|
+
@include tip2;
|
|
274
|
+
color: var(--o-color-info3);
|
|
275
|
+
padding: 0 8px;
|
|
276
|
+
|
|
277
|
+
@include respond-to('<=pad_v') {
|
|
278
|
+
@include text1;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.o-search-panel-recommend-item {
|
|
283
|
+
@include tip1;
|
|
284
|
+
padding: 5px 8px;
|
|
285
|
+
cursor: pointer;
|
|
286
|
+
color: var(--o-color-info1);
|
|
287
|
+
border-radius: var(--o-radius-xs);
|
|
288
|
+
|
|
289
|
+
&:hover {
|
|
290
|
+
background-color: var(--o-color-control2-light);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.o-search-panel-divider {
|
|
295
|
+
background: var(--o-color-control4);
|
|
296
|
+
width: 100%;
|
|
297
|
+
height: 1px;
|
|
298
|
+
|
|
299
|
+
@include respond-to('<=pad_v') {
|
|
300
|
+
display: none;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.o-search-panel-common-header {
|
|
305
|
+
display: flex;
|
|
306
|
+
align-items: center;
|
|
307
|
+
justify-content: space-between;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.o-search-panel-icon {
|
|
311
|
+
cursor: pointer;
|
|
312
|
+
color: var(--o-color-info1);
|
|
313
|
+
font-size: 16px;
|
|
314
|
+
|
|
315
|
+
&:hover {
|
|
316
|
+
color: var(--o-color-primary1);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.o-search-panel-history-list {
|
|
321
|
+
display: flex;
|
|
322
|
+
gap: 8px;
|
|
323
|
+
flex-wrap: wrap;
|
|
324
|
+
margin-top: var(--o-gap-3);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// ---- chips layout ----
|
|
328
|
+
.o-search-panel-history-item {
|
|
329
|
+
position: relative;
|
|
330
|
+
display: flex;
|
|
331
|
+
align-items: center;
|
|
332
|
+
max-width: 224px;
|
|
333
|
+
height: 24px;
|
|
334
|
+
padding: 3px var(--o-gap-3);
|
|
335
|
+
background-color: var(--o-color-control2-light);
|
|
336
|
+
border-radius: var(--o-radius-xs);
|
|
337
|
+
color: var(--o-color-info1);
|
|
338
|
+
cursor: pointer;
|
|
339
|
+
|
|
340
|
+
@include hover {
|
|
341
|
+
background-color: var(--o-color-control3-light);
|
|
342
|
+
color: var(--o-color-primary1);
|
|
343
|
+
|
|
344
|
+
.o-search-panel-history-remove {
|
|
345
|
+
display: inline-flex;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
&.is-dark {
|
|
350
|
+
@include hover {
|
|
351
|
+
background-color: rgb(var(--o-mixedgray-7));
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
@include respond-to('<=pad_v') {
|
|
356
|
+
height: 28px;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.o-search-panel-history-text {
|
|
361
|
+
max-width: 200px;
|
|
362
|
+
overflow: hidden;
|
|
363
|
+
text-overflow: ellipsis;
|
|
364
|
+
white-space: nowrap;
|
|
365
|
+
@include tip2;
|
|
366
|
+
|
|
367
|
+
@include respond-to('<=pad_v') {
|
|
368
|
+
@include text1;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.o-search-panel-history-remove {
|
|
373
|
+
position: absolute;
|
|
374
|
+
right: -8px;
|
|
375
|
+
top: -8px;
|
|
376
|
+
display: none;
|
|
377
|
+
align-items: center;
|
|
378
|
+
justify-content: center;
|
|
379
|
+
width: 16px;
|
|
380
|
+
height: 16px;
|
|
381
|
+
|
|
382
|
+
:deep(svg) {
|
|
383
|
+
width: 16px;
|
|
384
|
+
height: 16px;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// ---- list layout ----
|
|
389
|
+
.o-search-panel-history-row {
|
|
390
|
+
padding: 4px 8px;
|
|
391
|
+
border-radius: var(--o-radius-xs);
|
|
392
|
+
cursor: pointer;
|
|
393
|
+
color: var(--o-color-info1);
|
|
394
|
+
overflow: hidden;
|
|
395
|
+
text-overflow: ellipsis;
|
|
396
|
+
white-space: nowrap;
|
|
397
|
+
@include tip1;
|
|
398
|
+
|
|
399
|
+
@include hover {
|
|
400
|
+
background-color: var(--o-color-control2-light);
|
|
401
|
+
color: var(--o-color-primary1);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.o-search-panel-hot-list {
|
|
406
|
+
display: flex;
|
|
407
|
+
flex-wrap: wrap;
|
|
408
|
+
gap: var(--o-gap-3) var(--o-gap-4);
|
|
409
|
+
margin-top: var(--o-gap-3);
|
|
410
|
+
@include tip2;
|
|
411
|
+
|
|
412
|
+
@include respond-to('<=pad_v') {
|
|
413
|
+
display: block;
|
|
414
|
+
@include text1;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.o-search-panel-hot-item {
|
|
419
|
+
color: var(--o-color-info1);
|
|
420
|
+
cursor: pointer;
|
|
421
|
+
|
|
422
|
+
@include respond-to('<=pad_v') {
|
|
423
|
+
margin-top: var(--o-gap-3);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
@include hover {
|
|
427
|
+
color: var(--o-color-primary1);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
</style>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface OSearchRecommendItem {
|
|
2
|
+
key: string;
|
|
3
|
+
path?: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
count?: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface OSearchPayload {
|
|
9
|
+
keyword: string;
|
|
10
|
+
imageUrl?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface OSearchImageUploadErrorPayload {
|
|
14
|
+
file: File;
|
|
15
|
+
error: unknown;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type OSearchUploadImageFn = (file: File) => Promise<string>;
|
|
19
|
+
|
|
20
|
+
export type OSearchItemClickType = 'history' | 'hot' | 'suggest' | 'onestep';
|
|
21
|
+
|
|
22
|
+
export interface OSearchHighlightPart {
|
|
23
|
+
text: string;
|
|
24
|
+
match: boolean;
|
|
25
|
+
}
|
package/src/draft/Banner.vue
CHANGED
|
@@ -128,7 +128,7 @@ onMounted(() => {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
@include respond
|
|
131
|
+
@include respond('pad_h') {
|
|
132
132
|
height: 180px;
|
|
133
133
|
|
|
134
134
|
.banner-title {
|
|
@@ -141,7 +141,7 @@ onMounted(() => {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
@include respond
|
|
144
|
+
@include respond('<=pad_v') {
|
|
145
145
|
display: none;
|
|
146
146
|
}
|
|
147
147
|
}
|
|
@@ -176,7 +176,7 @@ onMounted(() => {
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
@include respond
|
|
179
|
+
@include respond('pad_h') {
|
|
180
180
|
height: 220px;
|
|
181
181
|
|
|
182
182
|
.banner-title {
|
|
@@ -189,7 +189,7 @@ onMounted(() => {
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
@include respond
|
|
192
|
+
@include respond('<=pad_v') {
|
|
193
193
|
height: 120px;
|
|
194
194
|
|
|
195
195
|
.banner-title {
|
|
@@ -234,7 +234,7 @@ onMounted(() => {
|
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
@include respond
|
|
237
|
+
@include respond('pad_h') {
|
|
238
238
|
height: 320px;
|
|
239
239
|
|
|
240
240
|
.banner-title {
|
|
@@ -247,7 +247,7 @@ onMounted(() => {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
@include respond
|
|
250
|
+
@include respond('<=pad_v') {
|
|
251
251
|
height: 184px;
|
|
252
252
|
|
|
253
253
|
.banner-title {
|
|
@@ -96,7 +96,7 @@ const getAction = (action: OperationAction) => {
|
|
|
96
96
|
margin-left: var(--grid-column-gutter);
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
@include respond
|
|
99
|
+
@include respond("phone") {
|
|
100
100
|
--card-header-text-size: 16px;
|
|
101
101
|
--card-header-text-height: 24px;
|
|
102
102
|
--card-content-text-size: 14px;
|
package/src/draft/Feature.vue
CHANGED
|
@@ -37,7 +37,7 @@ const props = defineProps<{
|
|
|
37
37
|
row-gap: var(--o3-gap-7);
|
|
38
38
|
border-radius: var(--o3-radius-l);
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
@include respond('phone') {
|
|
41
41
|
gap: 0;
|
|
42
42
|
display: flex;
|
|
43
43
|
white-space: nowrap;
|
|
@@ -62,7 +62,7 @@ const props = defineProps<{
|
|
|
62
62
|
background-color: rgba(0, 0, 0, 0.1);
|
|
63
63
|
width: 1px;
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
@include respond('<=pad_v') {
|
|
66
66
|
top: 16px;
|
|
67
67
|
height: 36px;
|
|
68
68
|
}
|
|
@@ -79,13 +79,13 @@ const props = defineProps<{
|
|
|
79
79
|
.feature-content {
|
|
80
80
|
max-width: 288px;
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
@include respond('<=laptop') {
|
|
83
83
|
max-width: 252px;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
@include respond('phone') {
|
|
89
89
|
&::after {
|
|
90
90
|
display: none;
|
|
91
91
|
}
|
|
@@ -98,7 +98,7 @@ const props = defineProps<{
|
|
|
98
98
|
display: inline-block;
|
|
99
99
|
max-width: 320px;
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
@include respond('phone') {
|
|
102
102
|
flex: 0 0 auto;
|
|
103
103
|
width: 25vw;
|
|
104
104
|
padding: 0 24px;
|
|
@@ -117,7 +117,7 @@ const props = defineProps<{
|
|
|
117
117
|
margin-bottom: var(--o3-gap-2);
|
|
118
118
|
color: var(--o-color-info1);
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
@include respond('phone') {
|
|
121
121
|
white-space: pre-wrap;
|
|
122
122
|
|
|
123
123
|
@include tip2;
|