@opendesign-plus/components 0.0.1-rc.90 → 0.0.1-rc.92
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 +41 -25
- package/dist/components/logo-swiper/types.d.ts +1 -0
- package/dist/components/search-doc-result/OSearchDocResult.vue.d.ts +56 -0
- package/dist/components/search-doc-result/index.d.ts +113 -0
- package/dist/components/search-result/OSearchResult.vue.d.ts +11 -0
- package/dist/components/search-result/OSearchResultHeader.vue.d.ts +9 -1
- package/dist/components/search-result/components/OSearchResultRelative.vue.d.ts +5 -1
- package/dist/components/search-result/index.d.ts +56 -3
- package/dist/components.cjs.js +40 -40
- package/dist/components.css +1 -1
- package/dist/components.es.js +10888 -10660
- package/dist/index.d.ts +1 -0
- package/dist/treeshaking/_virtual/icon-email.mjs +8 -9
- package/dist/treeshaking/_virtual/icon-email2.mjs +9 -8
- package/dist/treeshaking/components/header/components/HeaderContent.css +184 -184
- package/dist/treeshaking/components/header/components/HeaderContent.vue.mjs +1 -1
- package/dist/treeshaking/components/header/components/HeaderContent.vue2.mjs +2 -1
- package/dist/treeshaking/components/logo-swiper/OLogoSwiperItems.css +19 -19
- package/dist/treeshaking/components/logo-swiper/OLogoSwiperItems.vue.mjs +1 -1
- package/dist/treeshaking/components/logo-swiper/OLogoSwiperItems.vue2.mjs +4 -2
- package/dist/treeshaking/components/logo-swiper/types.d.ts +1 -0
- package/dist/treeshaking/components/markdown/OMarkdown.css +7 -0
- package/dist/treeshaking/components/org/OOrgMembers.vue2.mjs +1 -1
- package/dist/treeshaking/components/search/OSearchInput.css +37 -34
- package/dist/treeshaking/components/search/OSearchInput.vue.mjs +1 -1
- package/dist/treeshaking/components/search/internal/SearchImageInput.css +49 -47
- package/dist/treeshaking/components/search/internal/SearchImageInput.vue.mjs +1 -1
- package/dist/treeshaking/components/search/internal/SearchPanel.css +117 -117
- package/dist/treeshaking/components/search/internal/SearchPanel.vue.mjs +1 -1
- package/dist/treeshaking/components/search-doc-result/OSearchDocResult.css +156 -0
- package/dist/treeshaking/components/search-doc-result/OSearchDocResult.vue.d.ts +56 -0
- package/dist/treeshaking/components/search-doc-result/OSearchDocResult.vue.mjs +7 -0
- package/dist/treeshaking/components/search-doc-result/OSearchDocResult.vue2.mjs +214 -0
- package/dist/treeshaking/components/search-doc-result/index.d.ts +113 -0
- package/dist/treeshaking/components/search-doc-result/index.mjs +9 -0
- package/dist/treeshaking/components/search-result/OSearchResult.css +97 -33
- package/dist/treeshaking/components/search-result/OSearchResult.vue.d.ts +11 -0
- package/dist/treeshaking/components/search-result/OSearchResult.vue.mjs +1 -1
- package/dist/treeshaking/components/search-result/OSearchResult.vue2.mjs +90 -21
- package/dist/treeshaking/components/search-result/OSearchResultHeader.css +78 -41
- package/dist/treeshaking/components/search-result/OSearchResultHeader.vue.d.ts +9 -1
- package/dist/treeshaking/components/search-result/OSearchResultHeader.vue.mjs +1 -1
- package/dist/treeshaking/components/search-result/OSearchResultHeader.vue2.mjs +26 -18
- package/dist/treeshaking/components/search-result/OSearchResultItem.css +42 -54
- package/dist/treeshaking/components/search-result/OSearchResultItem.vue.mjs +1 -1
- package/dist/treeshaking/components/search-result/OSearchResultItem.vue2.mjs +2 -1
- package/dist/treeshaking/components/search-result/components/OSearchResultFeedback.css +34 -36
- package/dist/treeshaking/components/search-result/components/OSearchResultFeedback.vue.mjs +1 -1
- package/dist/treeshaking/components/search-result/components/OSearchResultFeedbackBanner.css +41 -37
- package/dist/treeshaking/components/search-result/components/OSearchResultFeedbackBanner.vue.mjs +1 -1
- package/dist/treeshaking/components/search-result/components/OSearchResultRelative.css +19 -19
- package/dist/treeshaking/components/search-result/components/OSearchResultRelative.vue.d.ts +5 -1
- package/dist/treeshaking/components/search-result/components/OSearchResultRelative.vue.mjs +1 -1
- package/dist/treeshaking/components/search-result/components/OSearchResultRelative.vue2.mjs +6 -3
- package/dist/treeshaking/components/search-result/index.d.ts +56 -3
- package/dist/treeshaking/components/user-center/OAccountSecurity.css +51 -51
- package/dist/treeshaking/components/user-center/OAccountSecurity.vue.mjs +1 -1
- package/dist/treeshaking/components/user-center/OAccountSecurity.vue2.mjs +24 -9
- package/dist/treeshaking/components/user-center/OAccountSetting.css +63 -61
- package/dist/treeshaking/components/user-center/OAccountSetting.vue.mjs +1 -1
- package/dist/treeshaking/components/user-center/OAccountSetting.vue2.mjs +1 -1
- package/dist/treeshaking/i18n/en.mjs +9 -1
- package/dist/treeshaking/i18n/zh.mjs +8 -0
- package/dist/treeshaking/index.d.ts +1 -0
- package/dist/treeshaking/index.mjs +2 -0
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./SearchPanel.vue2.mjs";
|
|
2
2
|
import './SearchPanel.css';
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const SearchPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const SearchPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a5767f01"]]);
|
|
5
5
|
export {
|
|
6
6
|
SearchPanel as default
|
|
7
7
|
};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
.hover-icon-rotate .o-icon[data-v-25235996] {
|
|
2
|
+
transition: all var(--o-duration-m1) var(--o-easing-standard-in);
|
|
3
|
+
}
|
|
4
|
+
@media (hover: hover) {
|
|
5
|
+
.hover-icon-rotate:hover .o-icon[data-v-25235996] {
|
|
6
|
+
transform: rotate(-180deg);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
.o-search-doc-result[data-v-25235996] {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
max-width: 100%;
|
|
13
|
+
min-height: var(--o-search-doc-result-content-min-height);
|
|
14
|
+
background-color: var(--o-color-fill2);
|
|
15
|
+
}
|
|
16
|
+
.o-search-doc-result .o-search-doc-result-back[data-v-25235996] {
|
|
17
|
+
margin-bottom: 24px;
|
|
18
|
+
color: var(--o-color-info2);
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
line-height: 22px;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
@media (hover: hover) {
|
|
24
|
+
.o-search-doc-result .o-search-doc-result-back[data-v-25235996]:hover {
|
|
25
|
+
color: var(--o-color-info1);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
@media (max-width: 1680px) {
|
|
29
|
+
.o-search-doc-result .o-search-doc-result-back[data-v-25235996] {
|
|
30
|
+
margin-bottom: 16px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
@media (max-width: 1200px) {
|
|
34
|
+
.o-search-doc-result .o-search-doc-result-back[data-v-25235996] {
|
|
35
|
+
margin-bottom: 12px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
.o-search-doc-result .o-search-doc-result-back .o-svg-icon[data-v-25235996] {
|
|
39
|
+
margin-right: 4px;
|
|
40
|
+
font-size: 16px;
|
|
41
|
+
}
|
|
42
|
+
.o-search-doc-result .o-search-doc-result-header-title[data-v-25235996] {
|
|
43
|
+
margin-bottom: 24px;
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
font-size: 32px;
|
|
46
|
+
line-height: 44px;
|
|
47
|
+
}
|
|
48
|
+
@media (min-width: 1201px) and (max-width: 1680px) {
|
|
49
|
+
.o-search-doc-result .o-search-doc-result-header-title[data-v-25235996] {
|
|
50
|
+
font-size: 20px;
|
|
51
|
+
line-height: 28px;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
@media (min-width: 841px) and (max-width: 1200px) {
|
|
55
|
+
.o-search-doc-result .o-search-doc-result-header-title[data-v-25235996] {
|
|
56
|
+
font-size: 20px;
|
|
57
|
+
line-height: 28px;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
@media (min-width: 601px) and (max-width: 840px) {
|
|
61
|
+
.o-search-doc-result .o-search-doc-result-header-title[data-v-25235996] {
|
|
62
|
+
font-size: 18px;
|
|
63
|
+
line-height: 26px;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
@media (max-width: 600px) {
|
|
67
|
+
.o-search-doc-result .o-search-doc-result-header-title[data-v-25235996] {
|
|
68
|
+
font-size: 16px;
|
|
69
|
+
line-height: 24px;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
@media (max-width: 1680px) {
|
|
73
|
+
.o-search-doc-result .o-search-doc-result-header-title[data-v-25235996] {
|
|
74
|
+
margin-bottom: 16px;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
@media (max-width: 1200px) {
|
|
78
|
+
.o-search-doc-result .o-search-doc-result-header-title[data-v-25235996] {
|
|
79
|
+
margin-bottom: 12px;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
.o-search-doc-result .o-search-doc-result-header-content[data-v-25235996] {
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: space-between;
|
|
86
|
+
margin-bottom: 8px;
|
|
87
|
+
}
|
|
88
|
+
@media (max-width: 1680px) {
|
|
89
|
+
.o-search-doc-result .o-search-doc-result-header-content[data-v-25235996] {
|
|
90
|
+
margin-bottom: 4px;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
.o-search-doc-result .o-search-doc-result-header-content-desc[data-v-25235996] {
|
|
94
|
+
color: var(--o-color-info3);
|
|
95
|
+
font-size: 14px;
|
|
96
|
+
line-height: 22px;
|
|
97
|
+
}
|
|
98
|
+
.o-search-doc-result .o-search-doc-result-content-skeleton-loading[data-v-25235996] {
|
|
99
|
+
margin-top: 24px;
|
|
100
|
+
margin-bottom: 32px;
|
|
101
|
+
}
|
|
102
|
+
.o-search-doc-result .o-search-doc-result-content-skeleton-loading[data-v-25235996] .o-skeleton-item .o-skeleton-line:nth-child(1) {
|
|
103
|
+
width: 52%;
|
|
104
|
+
height: 28px;
|
|
105
|
+
}
|
|
106
|
+
.o-search-doc-result .o-search-doc-result-content-skeleton-loading[data-v-25235996] .o-skeleton-item .o-skeleton-line:nth-child(2) {
|
|
107
|
+
height: 48px;
|
|
108
|
+
}
|
|
109
|
+
.o-search-doc-result .o-search-doc-result-content-skeleton-loading[data-v-25235996] .o-skeleton-item .o-skeleton-line:nth-child(3) {
|
|
110
|
+
width: 38%;
|
|
111
|
+
height: 18px;
|
|
112
|
+
}
|
|
113
|
+
.o-search-doc-result .o-search-doc-result-content-skeleton-divider[data-v-25235996] {
|
|
114
|
+
margin: 16px 0;
|
|
115
|
+
}
|
|
116
|
+
.o-search-doc-result .o-search-doc-result-content.is-empty[data-v-25235996] {
|
|
117
|
+
display: flex;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
align-items: center;
|
|
120
|
+
}
|
|
121
|
+
.o-search-doc-result .o-search-doc-result-content[data-v-25235996]:not(.is-empty) > * {
|
|
122
|
+
padding: 16px 0;
|
|
123
|
+
border-bottom: 1px solid var(--o-color-control4);
|
|
124
|
+
}
|
|
125
|
+
@media (max-width: 1680px) {
|
|
126
|
+
.o-search-doc-result .o-search-doc-result-content[data-v-25235996]:not(.is-empty) > * {
|
|
127
|
+
padding: 12px 0;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
@media (max-width: 1200px) {
|
|
131
|
+
.o-search-doc-result .o-search-doc-result-content[data-v-25235996]:not(.is-empty) > * {
|
|
132
|
+
padding: 8px 0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
.o-search-doc-result .o-search-doc-result-pagination[data-v-25235996] {
|
|
136
|
+
display: flex;
|
|
137
|
+
justify-content: flex-end;
|
|
138
|
+
margin-top: 16px;
|
|
139
|
+
}
|
|
140
|
+
@media (max-width: 1680px) {
|
|
141
|
+
.o-search-doc-result .o-search-doc-result-pagination[data-v-25235996] {
|
|
142
|
+
margin-top: 12px;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
@media (max-width: 1200px) {
|
|
146
|
+
.o-search-doc-result .o-search-doc-result-pagination[data-v-25235996] {
|
|
147
|
+
margin-top: 8px;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
.o-search-doc-result .o-search-doc-result-mb-bottom-text[data-v-25235996] {
|
|
151
|
+
margin-top: 16px;
|
|
152
|
+
color: var(--o-color-info3);
|
|
153
|
+
text-align: center;
|
|
154
|
+
font-size: 14px;
|
|
155
|
+
line-height: 22px;
|
|
156
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
items: any[];
|
|
3
|
+
loading: boolean;
|
|
4
|
+
total?: number;
|
|
5
|
+
pageSizes?: number[];
|
|
6
|
+
noMore: boolean;
|
|
7
|
+
scrollContainer?: string | HTMLElement;
|
|
8
|
+
bottomOffset?: number;
|
|
9
|
+
hideSort?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_PublicProps = {
|
|
12
|
+
'page'?: number;
|
|
13
|
+
'pageSize'?: number;
|
|
14
|
+
'sortValue'?: string;
|
|
15
|
+
} & __VLS_Props;
|
|
16
|
+
declare function __VLS_template(): {
|
|
17
|
+
attrs: Partial<{}>;
|
|
18
|
+
slots: {
|
|
19
|
+
'header-title'?(_: {}): any;
|
|
20
|
+
'header-desc'?(_: {}): any;
|
|
21
|
+
'header-sort-options'?(_: {}): any;
|
|
22
|
+
empty?(_: {}): any;
|
|
23
|
+
list?(_: {
|
|
24
|
+
items: any[];
|
|
25
|
+
}): any;
|
|
26
|
+
};
|
|
27
|
+
refs: {};
|
|
28
|
+
rootEl: HTMLDivElement;
|
|
29
|
+
};
|
|
30
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
31
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
32
|
+
"update:pageSize": (value: number) => any;
|
|
33
|
+
"update:page": (value: number) => any;
|
|
34
|
+
"update:sortValue": (value: string) => any;
|
|
35
|
+
} & {
|
|
36
|
+
"reach-bottom": () => any;
|
|
37
|
+
back: () => any;
|
|
38
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
39
|
+
"onUpdate:pageSize"?: ((value: number) => any) | undefined;
|
|
40
|
+
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
41
|
+
"onReach-bottom"?: (() => any) | undefined;
|
|
42
|
+
onBack?: (() => any) | undefined;
|
|
43
|
+
"onUpdate:sortValue"?: ((value: string) => any) | undefined;
|
|
44
|
+
}>, {
|
|
45
|
+
total: number;
|
|
46
|
+
pageSizes: number[];
|
|
47
|
+
bottomOffset: number;
|
|
48
|
+
hideSort: boolean;
|
|
49
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
50
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
51
|
+
export default _default;
|
|
52
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
53
|
+
new (): {
|
|
54
|
+
$slots: S;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from "./OSearchDocResult.vue2.mjs";
|
|
2
|
+
import './OSearchDocResult.css';
|
|
3
|
+
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const _OSearchDocResult = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-25235996"]]);
|
|
5
|
+
export {
|
|
6
|
+
_OSearchDocResult as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { defineComponent, useModel, watch, onMounted, onUnmounted, computed, openBlock, createElementBlock, createElementVNode, unref, createVNode, toDisplayString, createCommentVNode, renderSlot, createTextVNode, withDirectives, withCtx, Fragment, renderList, createBlock, vShow, normalizeClass, mergeModels } from "vue";
|
|
2
|
+
import { useThrottleFn } from "@vueuse/core";
|
|
3
|
+
import { OIconArrowLeft, ODropdown, OButton, OIconChevronDown, ODropdownItem, OSkeleton, isArray, OSkeletonText, ODivider, OPagination } from "@opensig/opendesign";
|
|
4
|
+
import { useScreen } from "@opendesign-plus/composables";
|
|
5
|
+
import { useI18n } from "../../i18n/index.mjs";
|
|
6
|
+
import OSearchResultEmpty from "../search-result/components/OSearchResultEmpty.vue.mjs";
|
|
7
|
+
const _hoisted_1 = { class: "o-search-doc-result" };
|
|
8
|
+
const _hoisted_2 = { class: "o-search-doc-result-header" };
|
|
9
|
+
const _hoisted_3 = { class: "o-search-doc-result-header-title" };
|
|
10
|
+
const _hoisted_4 = { class: "o-search-doc-result-header-content" };
|
|
11
|
+
const _hoisted_5 = { class: "o-search-doc-result-header-content-desc" };
|
|
12
|
+
const _hoisted_6 = { class: "o-search-doc-result-content-skeleton-loading" };
|
|
13
|
+
const _hoisted_7 = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "o-search-doc-result-mb-bottom-text"
|
|
16
|
+
};
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
|
+
__name: "OSearchDocResult",
|
|
19
|
+
props: /* @__PURE__ */ mergeModels({
|
|
20
|
+
items: {},
|
|
21
|
+
loading: { type: Boolean },
|
|
22
|
+
total: { default: 0 },
|
|
23
|
+
pageSizes: { default: () => [10, 20, 50] },
|
|
24
|
+
noMore: { type: Boolean },
|
|
25
|
+
scrollContainer: {},
|
|
26
|
+
bottomOffset: { default: 30 },
|
|
27
|
+
hideSort: { type: Boolean, default: false }
|
|
28
|
+
}, {
|
|
29
|
+
"page": { default: 1 },
|
|
30
|
+
"pageModifiers": {},
|
|
31
|
+
"pageSize": { default: 10 },
|
|
32
|
+
"pageSizeModifiers": {},
|
|
33
|
+
"sortValue": { default: "sortByRelevance" },
|
|
34
|
+
"sortValueModifiers": {}
|
|
35
|
+
}),
|
|
36
|
+
emits: /* @__PURE__ */ mergeModels(["reach-bottom", "back"], ["update:page", "update:pageSize", "update:sortValue"]),
|
|
37
|
+
setup(__props, { emit: __emit }) {
|
|
38
|
+
const props = __props;
|
|
39
|
+
const page = useModel(__props, "page");
|
|
40
|
+
const pageSize = useModel(__props, "pageSize");
|
|
41
|
+
const sortValue = useModel(__props, "sortValue");
|
|
42
|
+
const emit = __emit;
|
|
43
|
+
const { lePadV } = useScreen();
|
|
44
|
+
const { t } = useI18n();
|
|
45
|
+
let scrollEl = null;
|
|
46
|
+
const getScrollEl = () => {
|
|
47
|
+
if (!props.scrollContainer) {
|
|
48
|
+
return window;
|
|
49
|
+
}
|
|
50
|
+
if (typeof props.scrollContainer === "string") {
|
|
51
|
+
return document.querySelector(props.scrollContainer) ?? window;
|
|
52
|
+
}
|
|
53
|
+
return props.scrollContainer;
|
|
54
|
+
};
|
|
55
|
+
const onScroll = useThrottleFn(() => {
|
|
56
|
+
if (!lePadV.value || props.loading || props.noMore) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const el = scrollEl;
|
|
60
|
+
if (!el) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const isWin = el === window;
|
|
64
|
+
const scrollTop = isWin ? window.scrollY : el.scrollTop;
|
|
65
|
+
const clientHeight = isWin ? window.innerHeight : el.clientHeight;
|
|
66
|
+
const scrollHeight = isWin ? document.documentElement.scrollHeight : el.scrollHeight;
|
|
67
|
+
if (scrollTop + clientHeight >= scrollHeight - props.bottomOffset) {
|
|
68
|
+
emit("reach-bottom");
|
|
69
|
+
}
|
|
70
|
+
}, 200);
|
|
71
|
+
const bindScroll = () => {
|
|
72
|
+
unbindScroll();
|
|
73
|
+
if (!props.scrollContainer) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
scrollEl = getScrollEl();
|
|
77
|
+
scrollEl.addEventListener("scroll", onScroll, { passive: true });
|
|
78
|
+
};
|
|
79
|
+
const unbindScroll = () => {
|
|
80
|
+
scrollEl == null ? void 0 : scrollEl.removeEventListener("scroll", onScroll);
|
|
81
|
+
scrollEl = null;
|
|
82
|
+
};
|
|
83
|
+
watch(() => props.scrollContainer, bindScroll);
|
|
84
|
+
onMounted(bindScroll);
|
|
85
|
+
onUnmounted(unbindScroll);
|
|
86
|
+
const options = computed(() => [
|
|
87
|
+
{
|
|
88
|
+
label: t("search.sortByRelevance"),
|
|
89
|
+
value: "sortByRelevance"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
label: t("search.sortByLatest"),
|
|
93
|
+
value: "sortByLatest"
|
|
94
|
+
}
|
|
95
|
+
]);
|
|
96
|
+
return (_ctx, _cache) => {
|
|
97
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
98
|
+
createElementVNode("div", _hoisted_2, [
|
|
99
|
+
!unref(lePadV) ? (openBlock(), createElementBlock("div", {
|
|
100
|
+
key: 0,
|
|
101
|
+
class: "o-search-doc-result-back",
|
|
102
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("back"))
|
|
103
|
+
}, [
|
|
104
|
+
createVNode(unref(OIconArrowLeft)),
|
|
105
|
+
createElementVNode("span", null, toDisplayString(unref(t)("search.backToPreviousPage")), 1)
|
|
106
|
+
])) : createCommentVNode("", true),
|
|
107
|
+
createElementVNode("div", _hoisted_3, [
|
|
108
|
+
renderSlot(_ctx.$slots, "header-title", {}, () => [
|
|
109
|
+
createTextVNode(toDisplayString(unref(t)("search.result")), 1)
|
|
110
|
+
], true)
|
|
111
|
+
]),
|
|
112
|
+
withDirectives(createElementVNode("div", _hoisted_4, [
|
|
113
|
+
renderSlot(_ctx.$slots, "header-desc", {}, () => [
|
|
114
|
+
createElementVNode("div", _hoisted_5, toDisplayString(unref(t)("search.findCount", [__props.total])), 1)
|
|
115
|
+
], true),
|
|
116
|
+
!__props.hideSort ? renderSlot(_ctx.$slots, "header-sort-options", { key: 0 }, () => [
|
|
117
|
+
createVNode(unref(ODropdown), { trigger: "hover" }, {
|
|
118
|
+
dropdown: withCtx(() => [
|
|
119
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(options.value, (item) => {
|
|
120
|
+
return openBlock(), createBlock(unref(ODropdownItem), {
|
|
121
|
+
key: item.value,
|
|
122
|
+
label: item.label,
|
|
123
|
+
value: item.value,
|
|
124
|
+
onClick: ($event) => sortValue.value = item.value
|
|
125
|
+
}, {
|
|
126
|
+
default: withCtx(() => [
|
|
127
|
+
createTextVNode(toDisplayString(item.label), 1)
|
|
128
|
+
]),
|
|
129
|
+
_: 2
|
|
130
|
+
}, 1032, ["label", "value", "onClick"]);
|
|
131
|
+
}), 128))
|
|
132
|
+
]),
|
|
133
|
+
default: withCtx(() => [
|
|
134
|
+
createVNode(unref(OButton), {
|
|
135
|
+
variant: "text",
|
|
136
|
+
color: "primary"
|
|
137
|
+
}, {
|
|
138
|
+
suffix: withCtx(() => [
|
|
139
|
+
createVNode(unref(OIconChevronDown), { class: "icon" })
|
|
140
|
+
]),
|
|
141
|
+
default: withCtx(() => {
|
|
142
|
+
var _a;
|
|
143
|
+
return [
|
|
144
|
+
createTextVNode(toDisplayString(((_a = options.value.find((item) => item.value === sortValue.value)) == null ? void 0 : _a.label) || "") + " ", 1)
|
|
145
|
+
];
|
|
146
|
+
}),
|
|
147
|
+
_: 1
|
|
148
|
+
})
|
|
149
|
+
]),
|
|
150
|
+
_: 1
|
|
151
|
+
})
|
|
152
|
+
], true) : createCommentVNode("", true)
|
|
153
|
+
], 512), [
|
|
154
|
+
[vShow, !__props.loading]
|
|
155
|
+
])
|
|
156
|
+
]),
|
|
157
|
+
createVNode(unref(OSkeleton), {
|
|
158
|
+
animation: "",
|
|
159
|
+
loading: __props.loading && (!unref(lePadV) || page.value === 1)
|
|
160
|
+
}, {
|
|
161
|
+
template: withCtx(() => [
|
|
162
|
+
createElementVNode("div", _hoisted_6, [
|
|
163
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(7, (_, i) => {
|
|
164
|
+
return openBlock(), createElementBlock(Fragment, { key: i }, [
|
|
165
|
+
createVNode(unref(OSkeletonText), { rows: 3 }),
|
|
166
|
+
i !== 6 ? (openBlock(), createBlock(unref(ODivider), {
|
|
167
|
+
key: 0,
|
|
168
|
+
class: "o-search-doc-result-content-skeleton-divider"
|
|
169
|
+
})) : createCommentVNode("", true)
|
|
170
|
+
], 64);
|
|
171
|
+
}), 64))
|
|
172
|
+
])
|
|
173
|
+
]),
|
|
174
|
+
default: withCtx(() => [
|
|
175
|
+
createElementVNode("div", {
|
|
176
|
+
class: normalizeClass(["o-search-doc-result-content", { "is-empty": !unref(isArray)(__props.items) || __props.items.length === 0 }])
|
|
177
|
+
}, [
|
|
178
|
+
!unref(isArray)(__props.items) || __props.items.length === 0 ? renderSlot(_ctx.$slots, "empty", { key: 0 }, () => [
|
|
179
|
+
createVNode(OSearchResultEmpty)
|
|
180
|
+
], true) : renderSlot(_ctx.$slots, "list", {
|
|
181
|
+
key: 1,
|
|
182
|
+
items: __props.items
|
|
183
|
+
}, void 0, true)
|
|
184
|
+
], 2)
|
|
185
|
+
]),
|
|
186
|
+
_: 3
|
|
187
|
+
}, 8, ["loading"]),
|
|
188
|
+
!__props.loading && __props.total > 0 && !unref(lePadV) ? (openBlock(), createBlock(unref(OPagination), {
|
|
189
|
+
key: 0,
|
|
190
|
+
page: page.value,
|
|
191
|
+
"onUpdate:page": _cache[1] || (_cache[1] = ($event) => page.value = $event),
|
|
192
|
+
"page-size": pageSize.value,
|
|
193
|
+
"onUpdate:pageSize": _cache[2] || (_cache[2] = ($event) => pageSize.value = $event),
|
|
194
|
+
total: __props.total,
|
|
195
|
+
"page-sizes": __props.pageSizes,
|
|
196
|
+
layout: ["total", "pagesize", "pager", "jumper"],
|
|
197
|
+
class: "o-search-doc-result-pagination"
|
|
198
|
+
}, null, 8, ["page", "page-size", "total", "page-sizes"])) : createCommentVNode("", true),
|
|
199
|
+
unref(lePadV) ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
200
|
+
__props.noMore ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
201
|
+
createTextVNode(toDisplayString(unref(t)("search.reachBottom")), 1)
|
|
202
|
+
], 64)) : !__props.loading && page.value >= 1 && __props.items.length ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
203
|
+
createTextVNode(toDisplayString(unref(t)("search.loadMore")), 1)
|
|
204
|
+
], 64)) : __props.loading && page.value > 1 && __props.items.length ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
205
|
+
createTextVNode(toDisplayString(unref(t)("search.loading")), 1)
|
|
206
|
+
], 64)) : createCommentVNode("", true)
|
|
207
|
+
])) : createCommentVNode("", true)
|
|
208
|
+
]);
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
export {
|
|
213
|
+
_sfc_main as default
|
|
214
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
declare const OSearchDocResult: {
|
|
3
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
4
|
+
page?: number;
|
|
5
|
+
pageSize?: number;
|
|
6
|
+
sortValue?: string;
|
|
7
|
+
} & {
|
|
8
|
+
items: any[];
|
|
9
|
+
loading: boolean;
|
|
10
|
+
total?: number;
|
|
11
|
+
pageSizes?: number[];
|
|
12
|
+
noMore: boolean;
|
|
13
|
+
scrollContainer?: string | HTMLElement;
|
|
14
|
+
bottomOffset?: number;
|
|
15
|
+
hideSort?: boolean;
|
|
16
|
+
}> & Readonly<{
|
|
17
|
+
"onUpdate:pageSize"?: ((value: number) => any) | undefined;
|
|
18
|
+
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
19
|
+
"onReach-bottom"?: (() => any) | undefined;
|
|
20
|
+
onBack?: (() => any) | undefined;
|
|
21
|
+
"onUpdate:sortValue"?: ((value: string) => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
|
+
"update:pageSize": (value: number) => any;
|
|
24
|
+
"update:page": (value: number) => any;
|
|
25
|
+
"update:sortValue": (value: string) => any;
|
|
26
|
+
} & {
|
|
27
|
+
"reach-bottom": () => any;
|
|
28
|
+
back: () => any;
|
|
29
|
+
}, import('vue').PublicProps, {
|
|
30
|
+
total: number;
|
|
31
|
+
pageSizes: number[];
|
|
32
|
+
bottomOffset: number;
|
|
33
|
+
hideSort: boolean;
|
|
34
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
35
|
+
P: {};
|
|
36
|
+
B: {};
|
|
37
|
+
D: {};
|
|
38
|
+
C: {};
|
|
39
|
+
M: {};
|
|
40
|
+
Defaults: {};
|
|
41
|
+
}, Readonly<{
|
|
42
|
+
page?: number;
|
|
43
|
+
pageSize?: number;
|
|
44
|
+
sortValue?: string;
|
|
45
|
+
} & {
|
|
46
|
+
items: any[];
|
|
47
|
+
loading: boolean;
|
|
48
|
+
total?: number;
|
|
49
|
+
pageSizes?: number[];
|
|
50
|
+
noMore: boolean;
|
|
51
|
+
scrollContainer?: string | HTMLElement;
|
|
52
|
+
bottomOffset?: number;
|
|
53
|
+
hideSort?: boolean;
|
|
54
|
+
}> & Readonly<{
|
|
55
|
+
"onUpdate:pageSize"?: ((value: number) => any) | undefined;
|
|
56
|
+
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
57
|
+
"onReach-bottom"?: (() => any) | undefined;
|
|
58
|
+
onBack?: (() => any) | undefined;
|
|
59
|
+
"onUpdate:sortValue"?: ((value: string) => any) | undefined;
|
|
60
|
+
}>, {}, {}, {}, {}, {
|
|
61
|
+
total: number;
|
|
62
|
+
pageSizes: number[];
|
|
63
|
+
bottomOffset: number;
|
|
64
|
+
hideSort: boolean;
|
|
65
|
+
}>;
|
|
66
|
+
__isFragment?: never;
|
|
67
|
+
__isTeleport?: never;
|
|
68
|
+
__isSuspense?: never;
|
|
69
|
+
} & import('vue').ComponentOptionsBase<Readonly<{
|
|
70
|
+
page?: number;
|
|
71
|
+
pageSize?: number;
|
|
72
|
+
sortValue?: string;
|
|
73
|
+
} & {
|
|
74
|
+
items: any[];
|
|
75
|
+
loading: boolean;
|
|
76
|
+
total?: number;
|
|
77
|
+
pageSizes?: number[];
|
|
78
|
+
noMore: boolean;
|
|
79
|
+
scrollContainer?: string | HTMLElement;
|
|
80
|
+
bottomOffset?: number;
|
|
81
|
+
hideSort?: boolean;
|
|
82
|
+
}> & Readonly<{
|
|
83
|
+
"onUpdate:pageSize"?: ((value: number) => any) | undefined;
|
|
84
|
+
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
85
|
+
"onReach-bottom"?: (() => any) | undefined;
|
|
86
|
+
onBack?: (() => any) | undefined;
|
|
87
|
+
"onUpdate:sortValue"?: ((value: string) => any) | undefined;
|
|
88
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
89
|
+
"update:pageSize": (value: number) => any;
|
|
90
|
+
"update:page": (value: number) => any;
|
|
91
|
+
"update:sortValue": (value: string) => any;
|
|
92
|
+
} & {
|
|
93
|
+
"reach-bottom": () => any;
|
|
94
|
+
back: () => any;
|
|
95
|
+
}, string, {
|
|
96
|
+
total: number;
|
|
97
|
+
pageSizes: number[];
|
|
98
|
+
bottomOffset: number;
|
|
99
|
+
hideSort: boolean;
|
|
100
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
101
|
+
$slots: {
|
|
102
|
+
'header-title'?(_: {}): any;
|
|
103
|
+
'header-desc'?(_: {}): any;
|
|
104
|
+
'header-sort-options'?(_: {}): any;
|
|
105
|
+
empty?(_: {}): any;
|
|
106
|
+
list?(_: {
|
|
107
|
+
items: any[];
|
|
108
|
+
}): any;
|
|
109
|
+
};
|
|
110
|
+
}) & {
|
|
111
|
+
install(app: App): void;
|
|
112
|
+
};
|
|
113
|
+
export { OSearchDocResult };
|