Просмотр исходного кода

[vscode]Fix stdf-vscode-extension

dufu1991 3 лет назад
Родитель
Сommit
177ee254f0

+ 1 - 1
packages/vscode-extension/package.json

@@ -2,7 +2,7 @@
     "name": "stdf-vscode-extension",
     "displayName": "stdf-vscode-extension",
     "description": "A VS Code extension to facilitate STDF development",
-    "version": "0.0.3",
+    "version": "0.0.4",
     "publisher": "STDF",
     "icon": "./src/assets/stdf-vscode-extension.png",
     "main": "./src/extension.js",

+ 2 - 1
packages/vscode-extension/src/extension.js

@@ -36,7 +36,8 @@ function activate(context) {
                 if (componentList.includes(word)) {
                     // 获取对应组件的 api.md 文件的路径
                     // Get the path of the api.md file of the corresponding component
-                    const apiPath = path.join(__dirname, `../../doc/components/${wordLower}/api${isZh ? '' : '_en'}.md`);
+                    const apiPath = path.join(__dirname, `../../../doc/components/${wordLower}/api${isZh ? '' : '_en'}.md`);
+
                     // 读取 api.md 文件的内容
                     // Read the contents of the api.md file
                     const apiContent = require('fs').readFileSync(apiPath, 'utf-8');