@opendesign-plus/components 0.0.1-rc.87 → 0.0.1-rc.88
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/components/article/OArticle.vue.d.ts +12 -12
- package/dist/components/article/OArticleList.vue.d.ts +54 -0
- package/dist/components/article/index.d.ts +95 -18
- package/dist/components/article/types.d.ts +26 -0
- package/dist/components/{markdown/OMarkdownPagination.vue.d.ts → article-pagination/OArticlePagination.vue.d.ts} +9 -7
- package/dist/components/article-pagination/index.d.ts +76 -0
- package/dist/components/article-pagination/types.d.ts +4 -0
- package/dist/components/header/components/HeaderNav.vue.d.ts +3 -0
- package/dist/components/header-user/OHeaderUser.vue.d.ts +88 -1
- package/dist/components/header-user/index.d.ts +88 -1
- package/dist/components/markdown/index.d.ts +1 -68
- package/dist/components/markdown/types.d.ts +0 -4
- package/dist/components.cjs.js +40 -40
- package/dist/components.css +1 -1
- package/dist/components.es.js +11884 -11657
- package/dist/index.d.ts +1 -0
- package/dist/treeshaking/components/article/OArticle.css +45 -98
- package/dist/treeshaking/components/article/OArticle.vue.d.ts +12 -12
- package/dist/treeshaking/components/article/OArticle.vue.mjs +1 -1
- package/dist/treeshaking/components/article/OArticle.vue2.mjs +3 -3
- package/dist/treeshaking/components/article/OArticleList.css +232 -0
- package/dist/treeshaking/components/article/OArticleList.vue.d.ts +54 -0
- package/dist/treeshaking/components/article/OArticleList.vue.mjs +205 -0
- package/dist/treeshaking/components/article/OArticleList.vue3.mjs +5 -0
- package/dist/treeshaking/components/article/index.d.ts +95 -18
- package/dist/treeshaking/components/article/index.mjs +9 -1
- package/dist/treeshaking/components/article/types.d.ts +26 -0
- package/dist/treeshaking/components/{markdown/OMarkdownPagination.css → article-pagination/OArticlePagination.css} +45 -45
- package/dist/treeshaking/components/{markdown/OMarkdownPagination.vue.d.ts → article-pagination/OArticlePagination.vue.d.ts} +9 -7
- package/dist/treeshaking/components/article-pagination/OArticlePagination.vue.mjs +7 -0
- package/dist/treeshaking/components/{markdown/OMarkdownPagination.vue2.mjs → article-pagination/OArticlePagination.vue2.mjs} +25 -21
- package/dist/treeshaking/components/article-pagination/index.d.ts +76 -0
- package/dist/treeshaking/components/article-pagination/index.mjs +9 -0
- package/dist/treeshaking/components/article-pagination/types.d.ts +4 -0
- package/dist/treeshaking/components/header/OHeader.css +17 -17
- package/dist/treeshaking/components/header/OHeader.vue.mjs +1 -1
- package/dist/treeshaking/components/header/OHeader.vue2.mjs +25 -1
- package/dist/treeshaking/components/header/components/HeaderNav.css +66 -73
- package/dist/treeshaking/components/header/components/HeaderNav.vue.d.ts +3 -0
- package/dist/treeshaking/components/header/components/HeaderNav.vue.mjs +1 -1
- package/dist/treeshaking/components/header/components/HeaderNav.vue2.mjs +72 -44
- package/dist/treeshaking/components/header-search/OHeaderSearch.css +42 -48
- package/dist/treeshaking/components/header-search/OHeaderSearch.vue.mjs +1 -1
- package/dist/treeshaking/components/header-search/OHeaderSearch.vue2.mjs +6 -4
- package/dist/treeshaking/components/header-user/OHeaderUser.css +40 -40
- package/dist/treeshaking/components/header-user/OHeaderUser.vue.d.ts +88 -1
- package/dist/treeshaking/components/header-user/OHeaderUser.vue.mjs +1 -1
- package/dist/treeshaking/components/header-user/OHeaderUser.vue2.mjs +49 -24
- package/dist/treeshaking/components/header-user/index.d.ts +88 -1
- package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.css +87 -114
- package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.vue.mjs +1 -1
- package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.vue2.mjs +1 -1
- package/dist/treeshaking/components/markdown/components/MarkdownTableData.css +30 -77
- package/dist/treeshaking/components/markdown/components/MarkdownTableData.vue.mjs +1 -1
- package/dist/treeshaking/components/markdown/components/MarkdownTitle.css +32 -82
- package/dist/treeshaking/components/markdown/components/MarkdownTitle.vue.mjs +1 -1
- package/dist/treeshaking/components/markdown/index.d.ts +1 -68
- package/dist/treeshaking/components/markdown/index.mjs +1 -8
- package/dist/treeshaking/components/markdown/replacer/code.mjs +1 -1
- package/dist/treeshaking/components/markdown/types.d.ts +0 -4
- package/dist/treeshaking/index.d.ts +1 -0
- package/dist/treeshaking/index.mjs +5 -3
- package/package.json +1 -1
- package/dist/treeshaking/components/markdown/OMarkdownPagination.vue.mjs +0 -7
|
@@ -1,124 +1,111 @@
|
|
|
1
|
-
.hover-icon-rotate .o-icon[data-v-
|
|
1
|
+
.hover-icon-rotate .o-icon[data-v-01bf1a8c] {
|
|
2
2
|
transition: all var(--o-duration-m1) var(--o-easing-standard-in);
|
|
3
3
|
}
|
|
4
4
|
@media (hover: hover) {
|
|
5
|
-
.hover-icon-rotate:hover .o-icon[data-v-
|
|
5
|
+
.hover-icon-rotate:hover .o-icon[data-v-01bf1a8c] {
|
|
6
6
|
transform: rotate(-180deg);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
.header-nav-wrap[data-v-
|
|
9
|
+
.header-nav-wrap[data-v-01bf1a8c] {
|
|
10
10
|
height: 100%;
|
|
11
11
|
--nav-right: 64px;
|
|
12
12
|
}
|
|
13
13
|
@media (min-width: 1201px) and (max-width: 1680px) {
|
|
14
|
-
.header-nav-wrap[data-v-
|
|
14
|
+
.header-nav-wrap[data-v-01bf1a8c] {
|
|
15
15
|
--nav-right: 48px;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
@media (max-width: 1200px) {
|
|
19
|
-
.header-nav-wrap[data-v-
|
|
19
|
+
.header-nav-wrap[data-v-01bf1a8c] {
|
|
20
20
|
--nav-right: 32px;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
.header-nav-wrap .header-nav[data-v-
|
|
23
|
+
.header-nav-wrap .header-nav[data-v-01bf1a8c] {
|
|
24
|
+
position: relative;
|
|
24
25
|
height: 100%;
|
|
25
26
|
display: flex;
|
|
26
27
|
justify-content: space-between;
|
|
27
28
|
width: calc(100% - var(--nav-right));
|
|
28
29
|
align-items: center;
|
|
29
30
|
}
|
|
30
|
-
.
|
|
31
|
-
width: calc(100% - var(--nav-right) - 24px);
|
|
32
|
-
}
|
|
33
|
-
.o-nav[data-v-0cdd8570] {
|
|
31
|
+
.o-nav[data-v-01bf1a8c] {
|
|
34
32
|
height: 100%;
|
|
35
33
|
position: relative;
|
|
36
34
|
overflow-y: hidden;
|
|
37
35
|
overflow-x: auto;
|
|
38
36
|
z-index: 8;
|
|
39
37
|
}
|
|
40
|
-
.o-nav[data-v-
|
|
38
|
+
.o-nav[data-v-01bf1a8c]::-webkit-scrollbar {
|
|
41
39
|
display: none;
|
|
42
40
|
}
|
|
43
|
-
.left-icon[data-v-
|
|
44
|
-
.right-icon[data-v-
|
|
41
|
+
.left-icon[data-v-01bf1a8c],
|
|
42
|
+
.right-icon[data-v-01bf1a8c] {
|
|
45
43
|
display: flex;
|
|
44
|
+
background-color: var(--o-color-fill2);
|
|
46
45
|
align-items: center;
|
|
47
46
|
cursor: pointer;
|
|
48
|
-
position:
|
|
47
|
+
position: absolute;
|
|
48
|
+
top: 50%;
|
|
49
|
+
transform: translateY(-50%);
|
|
50
|
+
z-index: 10;
|
|
49
51
|
width: 16px;
|
|
50
|
-
height:
|
|
51
|
-
border-radius: var(--o-radius-xs);
|
|
52
|
+
height: 100%;
|
|
52
53
|
}
|
|
53
|
-
.left-icon .o-icon[data-v-
|
|
54
|
-
.right-icon .o-icon[data-v-
|
|
54
|
+
.left-icon .o-icon[data-v-01bf1a8c],
|
|
55
|
+
.right-icon .o-icon[data-v-01bf1a8c] {
|
|
55
56
|
--icon-size: 16px;
|
|
56
57
|
position: relative;
|
|
57
58
|
z-index: 11;
|
|
58
59
|
}
|
|
59
60
|
@media (hover: hover) {
|
|
60
|
-
.left-icon[data-v-
|
|
61
|
-
.right-icon[data-v-
|
|
61
|
+
.left-icon[data-v-01bf1a8c]:hover,
|
|
62
|
+
.right-icon[data-v-01bf1a8c]:hover {
|
|
62
63
|
background-color: var(--o-color-control2-light);
|
|
63
64
|
color: var(--o-color-link2);
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
|
-
.left-icon[data-v-
|
|
67
|
-
.right-icon[data-v-
|
|
67
|
+
.left-icon[data-v-01bf1a8c]:active,
|
|
68
|
+
.right-icon[data-v-01bf1a8c]:active {
|
|
68
69
|
color: var(--o-color-link3);
|
|
69
70
|
}
|
|
70
|
-
.left-icon[data-v-
|
|
71
|
+
.left-icon[data-v-01bf1a8c] {
|
|
72
|
+
left: 0;
|
|
73
|
+
}
|
|
74
|
+
.left-icon[data-v-01bf1a8c]::before {
|
|
71
75
|
content: "";
|
|
72
76
|
position: absolute;
|
|
73
77
|
width: 50px;
|
|
74
|
-
height:
|
|
75
|
-
top:
|
|
78
|
+
height: 100%;
|
|
79
|
+
top: 0;
|
|
76
80
|
left: 16px;
|
|
77
81
|
z-index: 9;
|
|
78
82
|
background-image: linear-gradient(90deg, rgba(var(--o-grey-1), 1) 0%, rgba(var(--o-grey-1), 0) 100%);
|
|
79
83
|
cursor: default;
|
|
80
84
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
top: -24px;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
@media (max-width: 1200px) {
|
|
87
|
-
.left-icon[data-v-0cdd8570]::before {
|
|
88
|
-
top: -20px;
|
|
85
|
+
.right-icon[data-v-01bf1a8c] {
|
|
86
|
+
right: 0;
|
|
89
87
|
}
|
|
90
|
-
|
|
91
|
-
.right-icon[data-v-0cdd8570]::before {
|
|
88
|
+
.right-icon[data-v-01bf1a8c]::before {
|
|
92
89
|
content: "";
|
|
93
90
|
position: absolute;
|
|
94
91
|
width: 50px;
|
|
95
|
-
height:
|
|
96
|
-
top:
|
|
92
|
+
height: 100%;
|
|
93
|
+
top: 0;
|
|
97
94
|
right: 16px;
|
|
98
95
|
z-index: 9;
|
|
99
96
|
background-image: linear-gradient(90deg, rgba(var(--o-grey-1), 0) 0%, rgba(var(--o-grey-1), 1) 100%);
|
|
100
97
|
cursor: default;
|
|
101
98
|
}
|
|
102
|
-
|
|
103
|
-
.right-icon[data-v-0cdd8570]::before {
|
|
104
|
-
top: -24px;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
@media (max-width: 1200px) {
|
|
108
|
-
.right-icon[data-v-0cdd8570]::before {
|
|
109
|
-
top: -20px;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
[data-o-theme*=dark] .left-icon[data-v-0cdd8570]::before {
|
|
99
|
+
[data-o-theme*=dark] .left-icon[data-v-01bf1a8c]::before {
|
|
113
100
|
background-image: linear-gradient(90deg, rgba(var(--o-grey-4), 1) 0%, rgba(var(--o-grey-4), 0) 100%);
|
|
114
101
|
}
|
|
115
|
-
[data-o-theme*=dark] .right-icon[data-v-
|
|
102
|
+
[data-o-theme*=dark] .right-icon[data-v-01bf1a8c]::before {
|
|
116
103
|
background-image: linear-gradient(90deg, rgba(var(--o-grey-4), 0) 0%, rgba(var(--o-grey-4), 1) 100%);
|
|
117
104
|
}
|
|
118
|
-
.o-nav-scroll[data-v-
|
|
105
|
+
.o-nav-scroll[data-v-01bf1a8c]::after {
|
|
119
106
|
display: none;
|
|
120
107
|
}
|
|
121
|
-
.o-nav-list[data-v-
|
|
108
|
+
.o-nav-list[data-v-01bf1a8c] {
|
|
122
109
|
display: flex;
|
|
123
110
|
height: 100%;
|
|
124
111
|
width: fit-content;
|
|
@@ -127,7 +114,13 @@
|
|
|
127
114
|
padding: 0;
|
|
128
115
|
margin: 0;
|
|
129
116
|
}
|
|
130
|
-
.o-nav-list
|
|
117
|
+
.o-nav-list .nav-sentinel[data-v-01bf1a8c] {
|
|
118
|
+
flex: 0 0 2px;
|
|
119
|
+
width: 2px;
|
|
120
|
+
padding: 0;
|
|
121
|
+
pointer-events: none;
|
|
122
|
+
}
|
|
123
|
+
.o-nav-list li[data-v-01bf1a8c] {
|
|
131
124
|
position: relative;
|
|
132
125
|
display: flex;
|
|
133
126
|
align-items: center;
|
|
@@ -135,10 +128,10 @@
|
|
|
135
128
|
color: var(--o-color-info1);
|
|
136
129
|
transition: all var(--o-duration-s) var(--o-easing-standard);
|
|
137
130
|
}
|
|
138
|
-
.o-nav-list li .nav-text[data-v-
|
|
131
|
+
.o-nav-list li .nav-text[data-v-01bf1a8c] {
|
|
139
132
|
position: relative;
|
|
140
133
|
}
|
|
141
|
-
.o-nav-list li .nav-text[data-v-
|
|
134
|
+
.o-nav-list li .nav-text[data-v-01bf1a8c]::after {
|
|
142
135
|
content: "";
|
|
143
136
|
position: absolute;
|
|
144
137
|
left: 0;
|
|
@@ -151,32 +144,32 @@
|
|
|
151
144
|
transition: all var(--o-duration-s) var(--o-easing-standard);
|
|
152
145
|
}
|
|
153
146
|
@media (max-width: 1440px) {
|
|
154
|
-
.o-nav-list li .nav-text[data-v-
|
|
147
|
+
.o-nav-list li .nav-text[data-v-01bf1a8c]::after {
|
|
155
148
|
bottom: -21px;
|
|
156
149
|
}
|
|
157
150
|
}
|
|
158
151
|
@media (max-width: 1200px) {
|
|
159
|
-
.o-nav-list li .nav-text[data-v-
|
|
152
|
+
.o-nav-list li .nav-text[data-v-01bf1a8c]::after {
|
|
160
153
|
bottom: -17px;
|
|
161
154
|
}
|
|
162
155
|
}
|
|
163
|
-
.o-nav-list li.is-selected .nav-text[data-v-
|
|
156
|
+
.o-nav-list li.is-selected .nav-text[data-v-01bf1a8c] {
|
|
164
157
|
color: var(--o-color-primary2);
|
|
165
158
|
}
|
|
166
|
-
.o-nav-list li.is-active .nav-text[data-v-
|
|
159
|
+
.o-nav-list li.is-active .nav-text[data-v-01bf1a8c] {
|
|
167
160
|
color: var(--o-color-primary1);
|
|
168
161
|
z-index: 99;
|
|
169
162
|
font-weight: 600;
|
|
170
163
|
}
|
|
171
|
-
.o-nav-list li.is-active .nav-text[data-v-
|
|
164
|
+
.o-nav-list li.is-active .nav-text[data-v-01bf1a8c]::after {
|
|
172
165
|
content: "";
|
|
173
166
|
opacity: 1;
|
|
174
167
|
}
|
|
175
|
-
.o-nav-list li.is-disabled[data-v-
|
|
168
|
+
.o-nav-list li.is-disabled[data-v-01bf1a8c] {
|
|
176
169
|
color: var(--o-color-info4);
|
|
177
170
|
pointer-events: none;
|
|
178
171
|
}
|
|
179
|
-
.o-nav-list .nav-item[data-v-
|
|
172
|
+
.o-nav-list .nav-item[data-v-01bf1a8c] {
|
|
180
173
|
cursor: default;
|
|
181
174
|
display: flex;
|
|
182
175
|
align-items: center;
|
|
@@ -185,60 +178,60 @@
|
|
|
185
178
|
line-height: 24px;
|
|
186
179
|
}
|
|
187
180
|
@media (min-width: 1201px) and (max-width: 1680px) {
|
|
188
|
-
.o-nav-list .nav-item[data-v-
|
|
181
|
+
.o-nav-list .nav-item[data-v-01bf1a8c] {
|
|
189
182
|
font-size: 14px;
|
|
190
183
|
line-height: 22px;
|
|
191
184
|
}
|
|
192
185
|
}
|
|
193
186
|
@media (min-width: 841px) and (max-width: 1200px) {
|
|
194
|
-
.o-nav-list .nav-item[data-v-
|
|
187
|
+
.o-nav-list .nav-item[data-v-01bf1a8c] {
|
|
195
188
|
font-size: 14px;
|
|
196
189
|
line-height: 22px;
|
|
197
190
|
}
|
|
198
191
|
}
|
|
199
192
|
@media (min-width: 601px) and (max-width: 840px) {
|
|
200
|
-
.o-nav-list .nav-item[data-v-
|
|
193
|
+
.o-nav-list .nav-item[data-v-01bf1a8c] {
|
|
201
194
|
font-size: 14px;
|
|
202
195
|
line-height: 22px;
|
|
203
196
|
}
|
|
204
197
|
}
|
|
205
198
|
@media (max-width: 600px) {
|
|
206
|
-
.o-nav-list .nav-item[data-v-
|
|
199
|
+
.o-nav-list .nav-item[data-v-01bf1a8c] {
|
|
207
200
|
font-size: 12px;
|
|
208
201
|
line-height: 18px;
|
|
209
202
|
}
|
|
210
203
|
}
|
|
211
204
|
@media (max-width: 1440px) {
|
|
212
|
-
.o-nav-list .nav-item[data-v-
|
|
205
|
+
.o-nav-list .nav-item[data-v-01bf1a8c] {
|
|
213
206
|
padding: 18px 12px;
|
|
214
207
|
}
|
|
215
208
|
}
|
|
216
209
|
@media (min-width: 841px) and (max-width: 1200px) {
|
|
217
|
-
.o-nav-list .nav-item[data-v-
|
|
210
|
+
.o-nav-list .nav-item[data-v-01bf1a8c] {
|
|
218
211
|
padding: 14px 8px;
|
|
219
212
|
}
|
|
220
213
|
}
|
|
221
214
|
@media (min-width: 841px) and (max-width: 1000px) {
|
|
222
|
-
.o-nav-list .nav-item.en[data-v-
|
|
215
|
+
.o-nav-list .nav-item.en[data-v-01bf1a8c] {
|
|
223
216
|
padding: var(--o-gap-2);
|
|
224
217
|
}
|
|
225
218
|
}
|
|
226
|
-
.o-nav-list .item-other[data-v-
|
|
219
|
+
.o-nav-list .item-other[data-v-01bf1a8c] {
|
|
227
220
|
cursor: pointer;
|
|
228
221
|
}
|
|
229
|
-
.o-nav-list .item-other .content-tag[data-v-
|
|
222
|
+
.o-nav-list .item-other .content-tag[data-v-01bf1a8c] {
|
|
230
223
|
margin-left: var(--o-gap-2);
|
|
231
224
|
--layout-pkg-radius: var(--o-radius-xs);
|
|
232
225
|
}
|
|
233
|
-
.o-nav-list .item-other:active .nav-text[data-v-
|
|
226
|
+
.o-nav-list .item-other:active .nav-text[data-v-01bf1a8c] {
|
|
234
227
|
color: var(--o-color-primary1);
|
|
235
228
|
z-index: 99;
|
|
236
229
|
font-weight: 600;
|
|
237
230
|
}
|
|
238
|
-
.o-nav-list .item-other:active .nav-text[data-v-
|
|
231
|
+
.o-nav-list .item-other:active .nav-text[data-v-01bf1a8c]::after {
|
|
239
232
|
content: "";
|
|
240
233
|
opacity: 1;
|
|
241
234
|
}
|
|
242
|
-
.mindspore .item-other .content-tag[data-v-
|
|
235
|
+
.mindspore .item-other .content-tag[data-v-01bf1a8c] {
|
|
243
236
|
--layout-pkg-radius: 100vh;
|
|
244
237
|
}
|
|
@@ -16,7 +16,10 @@ declare const _default: import('vue').DefineComponent<NavLiT, {}, {}, {}, {}, im
|
|
|
16
16
|
"onHandle-click"?: ((val: any) => any) | undefined;
|
|
17
17
|
"onNav-layout"?: ((val: any) => any) | undefined;
|
|
18
18
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
19
|
+
headerNavRef: HTMLDivElement;
|
|
19
20
|
navRef: HTMLDivElement;
|
|
20
21
|
navListRef: HTMLUListElement;
|
|
22
|
+
navStartRef: HTMLLIElement;
|
|
23
|
+
navEndRef: HTMLLIElement;
|
|
21
24
|
}, HTMLDivElement>;
|
|
22
25
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./HeaderNav.vue2.mjs";
|
|
2
2
|
import './HeaderNav.css';
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const HeaderNav = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const HeaderNav = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-01bf1a8c"]]);
|
|
5
5
|
export {
|
|
6
6
|
HeaderNav as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent, ref, inject,
|
|
1
|
+
import { defineComponent, ref, inject, resolveDirective, openBlock, createElementBlock, createElementVNode, createVNode, unref, withCtx, createCommentVNode, normalizeClass, Fragment, renderList, withDirectives, toDisplayString, createBlock, createTextVNode } from "vue";
|
|
2
2
|
import { OIcon, OTag } from "@opensig/opendesign";
|
|
3
3
|
import IconCaretLeft from "../../../_virtual/icon-caret-left.mjs";
|
|
4
4
|
import IconCaretRight from "../../../_virtual/icon-caret-right.mjs";
|
|
5
5
|
import { isTagExpired } from "../utils.mjs";
|
|
6
|
-
import { useDebounceFn } from "@vueuse/core";
|
|
6
|
+
import { useDebounceFn, useElementSize, watchDebounced, useIntersectionObserver } from "@vueuse/core";
|
|
7
7
|
const _hoisted_1 = { class: "header-nav-wrap" };
|
|
8
8
|
const _hoisted_2 = {
|
|
9
9
|
key: 0,
|
|
@@ -31,8 +31,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
31
|
const emit = __emit;
|
|
32
32
|
const props = __props;
|
|
33
33
|
const navRef = ref();
|
|
34
|
-
const navListRef = ref();
|
|
35
|
-
const resizeTimer = ref();
|
|
36
34
|
const navVisibleRight = ref(false);
|
|
37
35
|
const navVisibleLeft = ref(false);
|
|
38
36
|
const hoverIndex = ref();
|
|
@@ -49,13 +47,38 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
47
|
const handleClick = (item) => {
|
|
50
48
|
emit("handle-click", item);
|
|
51
49
|
};
|
|
50
|
+
const headerNavRef = ref();
|
|
51
|
+
const navListRef = ref();
|
|
52
|
+
const { width: headerNavWidth } = useElementSize(headerNavRef);
|
|
53
|
+
const { width: navListWidth } = useElementSize(navListRef);
|
|
54
|
+
const headerUserFullWidth = inject("headerUserFullWidth");
|
|
55
|
+
const isSearchHidden = inject("isSearchHidden");
|
|
56
|
+
const shrinkUserOrSearch = inject("shrinkUserOrSearch");
|
|
57
|
+
const expandUser = inject("expandUser");
|
|
58
|
+
const expandSearch = inject("expandSearch");
|
|
59
|
+
watchDebounced(
|
|
60
|
+
() => Math.floor(headerNavWidth.value - navListWidth.value),
|
|
61
|
+
(diffWidth) => {
|
|
62
|
+
if (diffWidth <= 0) {
|
|
63
|
+
shrinkUserOrSearch == null ? void 0 : shrinkUserOrSearch();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (diffWidth > 161 && (isSearchHidden == null ? void 0 : isSearchHidden.value)) {
|
|
67
|
+
expandSearch == null ? void 0 : expandSearch();
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if ((headerUserFullWidth == null ? void 0 : headerUserFullWidth.value) && diffWidth > headerUserFullWidth.value) {
|
|
71
|
+
expandUser == null ? void 0 : expandUser();
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{ debounce: 100, immediate: true }
|
|
75
|
+
);
|
|
76
|
+
const navStartRef = ref();
|
|
77
|
+
const navEndRef = ref();
|
|
52
78
|
const scrollNavRight = () => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
left: navRef.value.clientWidth,
|
|
57
|
-
behavior: "smooth"
|
|
58
|
-
});
|
|
79
|
+
navRef.value.scrollTo({
|
|
80
|
+
left: navRef.value.clientWidth,
|
|
81
|
+
behavior: "smooth"
|
|
59
82
|
});
|
|
60
83
|
};
|
|
61
84
|
const scrollNavLeft = () => {
|
|
@@ -63,26 +86,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
63
86
|
left: 0,
|
|
64
87
|
behavior: "smooth"
|
|
65
88
|
});
|
|
66
|
-
navVisibleLeft.value = false;
|
|
67
89
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
90
|
+
let hasEmittedOverflow = false;
|
|
91
|
+
useIntersectionObserver(
|
|
92
|
+
[navStartRef, navEndRef],
|
|
93
|
+
(entries) => {
|
|
94
|
+
entries.forEach((entry) => {
|
|
95
|
+
if (entry.target === navStartRef.value) {
|
|
96
|
+
navVisibleLeft.value = !entry.isIntersecting;
|
|
97
|
+
}
|
|
98
|
+
if (entry.target === navEndRef.value) {
|
|
99
|
+
navVisibleRight.value = !entry.isIntersecting;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
const hasOverflow = navVisibleLeft.value || navVisibleRight.value;
|
|
103
|
+
if (hasOverflow !== hasEmittedOverflow) {
|
|
104
|
+
hasEmittedOverflow = hasOverflow;
|
|
105
|
+
emit("nav-layout", hasOverflow);
|
|
80
106
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
root: navRef,
|
|
110
|
+
threshold: 0
|
|
84
111
|
}
|
|
85
|
-
|
|
112
|
+
);
|
|
86
113
|
const navFirstHoverTime = inject("navFirstHoverTime");
|
|
87
114
|
const navStepCount = inject("navStepCount");
|
|
88
115
|
const increNavStepCount = inject("increNavStepCount");
|
|
@@ -114,25 +141,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
114
141
|
};
|
|
115
142
|
return res;
|
|
116
143
|
};
|
|
117
|
-
onMounted(() => {
|
|
118
|
-
window.addEventListener("resize", calculateLayout);
|
|
119
|
-
nextTick(() => {
|
|
120
|
-
calculateLayout();
|
|
121
|
-
resizeTimer.value = setTimeout(() => {
|
|
122
|
-
calculateLayout();
|
|
123
|
-
}, 1e3);
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
onUnmounted(() => {
|
|
127
|
-
window.removeEventListener("resize", calculateLayout);
|
|
128
|
-
clearTimeout(resizeTimer.value);
|
|
129
|
-
});
|
|
130
144
|
return (_ctx, _cache) => {
|
|
131
145
|
var _a;
|
|
132
146
|
const _directive_analytics = resolveDirective("analytics");
|
|
133
147
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
134
148
|
createElementVNode("div", {
|
|
135
|
-
|
|
149
|
+
ref_key: "headerNavRef",
|
|
150
|
+
ref: headerNavRef,
|
|
151
|
+
class: "header-nav"
|
|
136
152
|
}, [
|
|
137
153
|
navVisibleLeft.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
138
154
|
createVNode(unref(OIcon), { onClick: scrollNavLeft }, {
|
|
@@ -153,6 +169,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
153
169
|
class: normalizeClass(["o-nav-list", [(_a = props.community) == null ? void 0 : _a.toLowerCase()]]),
|
|
154
170
|
onMouseenter: onHoverHeader
|
|
155
171
|
}, [
|
|
172
|
+
createElementVNode("li", {
|
|
173
|
+
ref_key: "navStartRef",
|
|
174
|
+
ref: navStartRef,
|
|
175
|
+
class: "nav-sentinel",
|
|
176
|
+
"aria-hidden": "true"
|
|
177
|
+
}, null, 512),
|
|
156
178
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.navData, (item, idx) => {
|
|
157
179
|
var _a2, _b;
|
|
158
180
|
return withDirectives((openBlock(), createElementBlock("li", {
|
|
@@ -195,10 +217,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
195
217
|
[_directive_analytics, () => onHoverNav(item.label), "mouseenter"],
|
|
196
218
|
[_directive_analytics, () => onClickNavItem(item)]
|
|
197
219
|
]);
|
|
198
|
-
}), 128))
|
|
220
|
+
}), 128)),
|
|
221
|
+
createElementVNode("li", {
|
|
222
|
+
ref_key: "navEndRef",
|
|
223
|
+
ref: navEndRef,
|
|
224
|
+
class: "nav-sentinel",
|
|
225
|
+
"aria-hidden": "true"
|
|
226
|
+
}, null, 512)
|
|
199
227
|
], 34)
|
|
200
228
|
], 2),
|
|
201
|
-
navVisibleRight.value
|
|
229
|
+
navVisibleRight.value ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
202
230
|
createVNode(unref(OIcon), { onClick: scrollNavRight }, {
|
|
203
231
|
default: withCtx(() => [
|
|
204
232
|
createVNode(unref(IconCaretRight))
|
|
@@ -206,7 +234,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
206
234
|
_: 1
|
|
207
235
|
})
|
|
208
236
|
])) : createCommentVNode("", true)
|
|
209
|
-
],
|
|
237
|
+
], 512)
|
|
210
238
|
]);
|
|
211
239
|
};
|
|
212
240
|
}
|