vuepress-theme-uniapp-official 1.4.35 → 1.4.38

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.
@@ -52,7 +52,7 @@
52
52
  </div>
53
53
  </div>
54
54
 
55
- <div class="links" :style="SearchBoxStyle">
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
- if (os.pc) {
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
@@ -186,6 +186,7 @@ export default {
186
186
  src: this.src,
187
187
  frameborder: '0',
188
188
  allow: 'geolocation https://hellouniappx.dcloud.net.cn',
189
+ loading: 'lazy'
189
190
  },
190
191
  ref: 'codeIframe',
191
192
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vuepress-theme-uniapp-official",
3
- "version": "1.4.35",
3
+ "version": "1.4.38",
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",
@@ -40,8 +43,8 @@
40
43
  "vuepress-plugin-mermaidjs": "1.9.1",
41
44
  "vuepress-plugin-named-chunks": "^1.1.4",
42
45
  "vuepress-plugin-zooming": "^1.1.8",
43
- "vuepress-plugin-check-md2": "^1.0.5",
44
- "vuepress-plugin-expandable-row": "^1.0.10"
46
+ "vuepress-plugin-expandable-row": "^1.0.10",
47
+ "vuepress-plugin-check-md2": "^1.0.5"
45
48
  },
46
49
  "scripts": {
47
50
  "publish:patch": "npm version patch && npm publish",
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
 
@@ -6,4 +6,5 @@ $navbar-sub-navbar-height = 5rem
6
6
  $navbar-background-color = #f7f7f7
7
7
  $search-container-color = #f5f6f7
8
8
  $vuepress-toc-width = 14rem
9
- $vuepress-display-min-width = 1500px
9
+ $vuepress-display-min-width = 1500px
10
+ $MQMobile = 768px