@umijs/plugin-docs 4.0.0-canary.20220506.2 → 4.0.0-canary.20220507.1
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/compiler.js
CHANGED
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.compile = void 0;
|
|
7
|
-
const plugin_utils_1 = require("umi/plugin-utils");
|
|
8
7
|
const rehype_pretty_code_1 = __importDefault(require("rehype-pretty-code"));
|
|
8
|
+
const plugin_utils_1 = require("umi/plugin-utils");
|
|
9
9
|
// @ts-ignore
|
|
10
10
|
const mdx_1 = require("../compiled/@mdx-js/mdx");
|
|
11
11
|
// @ts-ignore
|
|
@@ -48,8 +48,11 @@ function MDXContent(props = {}) {
|
|
|
48
48
|
|
|
49
49
|
useEffect(() => {
|
|
50
50
|
if (window.location.hash.length !== 0) {
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
// 为了右侧内容区能正常跳转
|
|
52
|
+
const hash = decodeURIComponent(window.location.hash);
|
|
53
|
+
setTimeout(() => {
|
|
54
|
+
document.getElementById(hash.slice(1))?.scrollIntoView();
|
|
55
|
+
}, 100);
|
|
53
56
|
} else {
|
|
54
57
|
window.scrollTo(0, 0);
|
|
55
58
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/plugin-docs",
|
|
3
|
-
"version": "4.0.0-canary.
|
|
3
|
+
"version": "4.0.0-canary.20220507.1",
|
|
4
4
|
"description": "@umijs/plugin-docs",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi-next/tree/master/packages/plugin-docs#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi-next/issues",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"keymaster": "1.6.2",
|
|
30
30
|
"react-helmet": "^6.1.0",
|
|
31
|
-
"rehype-pretty-code": "^0.3.
|
|
31
|
+
"rehype-pretty-code": "^0.3.1",
|
|
32
32
|
"shiki": "^0.10.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"classnames": "^2.3.1",
|
|
39
39
|
"rehype-slug": "5.0.1",
|
|
40
40
|
"remark-gfm": "^3.0.1",
|
|
41
|
-
"tailwindcss": "^3.0.
|
|
42
|
-
"umi": "4.0.0-canary.
|
|
41
|
+
"tailwindcss": "^3.0.24",
|
|
42
|
+
"umi": "4.0.0-canary.20220507.1"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|