vuepress-theme-uniapp-official 1.4.34 → 1.4.37
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.
|
@@ -361,11 +361,6 @@
|
|
|
361
361
|
let categoryArr = [`category:${this.currentCategory.text}`];
|
|
362
362
|
categoryArr.push(...extraFacetFilters)
|
|
363
363
|
categoryArr = [categoryArr];
|
|
364
|
-
if (this.currentCategory.text === 'uni-app x') {
|
|
365
|
-
// category:uni-app OR tag:UTS OR tag:插件
|
|
366
|
-
categoryArr.push('tag:插件', 'tag:工程化')
|
|
367
|
-
categoryArr = [categoryArr];
|
|
368
|
-
}
|
|
369
364
|
return searchClient(
|
|
370
365
|
Object.assign({}, this.options, {
|
|
371
366
|
query: `'${this.searchValue}'`,
|
package/components/Navbar.vue
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
</div>
|
|
53
53
|
</div>
|
|
54
54
|
|
|
55
|
-
<div class="links" :style="
|
|
55
|
+
<div class="links" :style="{ top: `${this.SearchBoxTop}px` }">
|
|
56
56
|
<!-- <a class="switch-version" href="javascript:void(0)">回到旧版</a> -->
|
|
57
57
|
<DcloudSearchPage v-if="isAlgoliaSearch" ref="dcloudSearchPage" :options="algolia" />
|
|
58
58
|
<AlgoliaSearchBox v-if="isAlgoliaSearch" />
|
|
@@ -105,7 +105,6 @@ export default {
|
|
|
105
105
|
|
|
106
106
|
data () {
|
|
107
107
|
return {
|
|
108
|
-
linksWrapMaxWidth: null,
|
|
109
108
|
showMobilePanel: false,
|
|
110
109
|
fixedNavbar: false,
|
|
111
110
|
SearchBoxTop: 0,
|
|
@@ -120,35 +119,11 @@ export default {
|
|
|
120
119
|
|
|
121
120
|
isAlgoliaSearch () {
|
|
122
121
|
return this.algolia && this.algolia.apiKey && this.algolia.indexName
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
SearchBoxStyle () {
|
|
126
|
-
const initStyle = {
|
|
127
|
-
top: `${this.SearchBoxTop}px`,
|
|
128
|
-
zIndex: 100
|
|
129
|
-
};
|
|
130
|
-
return this.linksWrapMaxWidth
|
|
131
|
-
? Object.assign({}, initStyle, {
|
|
132
|
-
'max-width': this.linksWrapMaxWidth + 'px',
|
|
133
|
-
})
|
|
134
|
-
: initStyle;
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
languageBoxStyle () {
|
|
138
|
-
return {right:(this.linksWrapMaxWidth + 10) + 'px'}
|
|
139
122
|
}
|
|
140
123
|
},
|
|
141
124
|
|
|
142
125
|
mounted () {
|
|
143
|
-
const MOBILE_DESKTOP_BREAKPOINT = 719 // refer to config.styl
|
|
144
|
-
const NAVBAR_VERTICAL_PADDING = parseInt(css(this.$el, 'paddingLeft')) + parseInt(css(this.$el, 'paddingRight'))
|
|
145
126
|
const handleLinksWrapWidth = () => {
|
|
146
|
-
if (document.documentElement.clientWidth < MOBILE_DESKTOP_BREAKPOINT) {
|
|
147
|
-
this.linksWrapMaxWidth = null
|
|
148
|
-
} else {
|
|
149
|
-
this.linksWrapMaxWidth = this.$el.offsetWidth - NAVBAR_VERTICAL_PADDING
|
|
150
|
-
- (this.$refs.siteName && this.$refs.siteName.offsetWidth || 0)
|
|
151
|
-
}
|
|
152
127
|
this.$nextTick(this.initNavBar)
|
|
153
128
|
}
|
|
154
129
|
handleLinksWrapWidth()
|
|
@@ -184,9 +159,7 @@ export default {
|
|
|
184
159
|
}
|
|
185
160
|
},
|
|
186
161
|
addWindowScroll () {
|
|
187
|
-
|
|
188
|
-
window.addEventListener('scroll', this.onWindowScroll, false)
|
|
189
|
-
}
|
|
162
|
+
window.addEventListener('scroll', this.onWindowScroll, false)
|
|
190
163
|
},
|
|
191
164
|
removeWindowScroll () {
|
|
192
165
|
window.removeEventListener('scroll', this.onWindowScroll)
|
|
@@ -291,6 +264,7 @@ $navbar-horizontal-padding = 1.5rem
|
|
|
291
264
|
color $textColor
|
|
292
265
|
position relative
|
|
293
266
|
.links
|
|
267
|
+
z-index 100
|
|
294
268
|
height 100%
|
|
295
269
|
// padding-left 1.5rem
|
|
296
270
|
box-sizing border-box
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vuepress-theme-uniapp-official",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.37",
|
|
4
4
|
"description": "uni-app official website theme for vuepress",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
"enhanceApp.js",
|
|
28
28
|
"index.js"
|
|
29
29
|
],
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
},
|
|
30
33
|
"dependencies": {
|
|
31
34
|
"@docsearch/css": "^3.6.0",
|
|
32
35
|
"@vuepress/plugin-back-to-top": "^1.9.5",
|
package/styles/index.styl
CHANGED
|
@@ -180,12 +180,6 @@ h1, h2, h3, h4, h5, h6
|
|
|
180
180
|
div[class][class*='language-']::before
|
|
181
181
|
right 80px
|
|
182
182
|
|
|
183
|
-
@media (min-width $MQMobile)
|
|
184
|
-
.sidebar
|
|
185
|
-
overflow hidden
|
|
186
|
-
.sidebar:hover
|
|
187
|
-
overflow-y auto
|
|
188
|
-
|
|
189
183
|
div[class~=language-uts]:before
|
|
190
184
|
content: "uts";
|
|
191
185
|
|
package/styles/palette.styl
CHANGED