vuepress-theme-uniapp-official 1.4.16 → 1.4.17
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/README.md +4 -4
- package/helper/index.js +15 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
### uni-app official website theme for vuepress
|
|
2
2
|
|
|
3
|
-
# vuepress-theme-
|
|
3
|
+
# vuepress-theme-uniapp-official
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/vuepress-theme-uniapp-official) [](https://npmjs.com/package/vuepress-theme-uniapp-official)
|
|
6
6
|
|
|
7
7
|
## Sites
|
|
8
8
|
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
yarn add vuepress-theme-
|
|
16
|
-
# OR npm install vuepress-theme-
|
|
15
|
+
yarn add vuepress-theme-uniapp-official -D
|
|
16
|
+
# OR npm install vuepress-theme-uniapp-official -D
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
|
package/helper/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function once(fn, ctx = null) {
|
|
2
|
+
let res
|
|
3
|
+
return (...args) => {
|
|
4
|
+
if (fn) {
|
|
5
|
+
res = fn.apply(ctx, args)
|
|
6
|
+
fn = null
|
|
7
|
+
}
|
|
8
|
+
return res
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const getNavbarHeight = () => {
|
|
13
|
+
const { height, top } = document.querySelector('.navbar').getBoundingClientRect()
|
|
14
|
+
return height + top
|
|
15
|
+
}
|
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.17",
|
|
4
4
|
"description": "uni-app official website theme for vuepress",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"mixin",
|
|
25
25
|
"styles",
|
|
26
26
|
"util",
|
|
27
|
+
"helper",
|
|
27
28
|
"enhanceApp.js",
|
|
28
29
|
"index.js"
|
|
29
30
|
],
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
"publish:patch": "npm version patch && npm publish",
|
|
32
33
|
"publish:minor": "npm version minor && npm publish",
|
|
33
34
|
"publish:major": "npm version major && npm publish",
|
|
34
|
-
"postpublish": "cnpm sync vuepress-theme-
|
|
35
|
+
"postpublish": "cnpm sync vuepress-theme-uniapp-official"
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
37
38
|
"@docsearch/css": "^3.6.0",
|