@@ -4290,7 +4290,7 @@ var require_document = __commonJS({
4290
4290
"out/frameworks/element-ui/document.js"(exports2) {
4291
4291
"use strict";
4292
4292
Object.defineProperty(exports2, "__esModule", { value: true });
4293
- var docUrl = "http://element-cn .eleme.io";
4293
+ var docUrl = "http://element.eleme.io";
4294
4294
exports2.default = () => {
4295
4295
return {
4296
4296
"el-row": `[element\uFF1A${docUrl}/#/zh-CN/component/layout](${docUrl}/#/zh-CN/component/layout)
@@ -22719,25 +22719,40 @@ var require_framework = __commonJS({
22719
22719
definitionOutFile(document, file) {
22720
22720
return __awaiter(this, void 0, void 0, function* () {
22721
22721
let filePath = file.path;
22722
+ let isAbsolute = false;
22723
+ if (filePath.includes(this.frameworkProvider.explorer.prefix.alias)) {
22724
+ isAbsolute = true;
22725
+ }
22722
22726
filePath = filePath.replace(this.frameworkProvider.explorer.prefix.alias, this.frameworkProvider.explorer.prefix.path);
22723
22727
if (/(.*\/.*|[^.]+)\..*$/gi.test(filePath)) {
22724
- let tempFile = path.resolve(document.uri.fsPath || "", "../", filePath);
22728
+ let tempFile = "";
22729
+ if (isAbsolute) {
22730
+ tempFile = path.join(this.frameworkProvider.explorer.projectRootPath, filePath);
22731
+ } else {
22732
+ tempFile = path.join(document.uri.path || "", "../", filePath);
22733
+ }
22725
22734
if (fs.existsSync(tempFile)) {
22726
22735
return Promise.resolve(new vscode_12.Location(vscode_12.Uri.file(tempFile), new vscode_12.Position(0, 0)));
22727
22736
}
22728
22737
} else {
22729
22738
const postfix = ["vue", "js", "css", "scss", "less"];
22730
22739
for (let i = 0; i < postfix.length; i++) {
22731
22740
const post = postfix[i];
22732
- let tempFile = path.resolve(document.uri.fsPath || "", "../", filePath);
22733
- if (tempFile.endsWith("/")) {
22741
+ let tempFile = "";
22742
+ if (isAbsolute) {
22743
+ tempFile = path.join(this.frameworkProvider.explorer.projectRootPath, filePath);
22744
+ } else {
22745
+ tempFile = path.join(document.uri.path || "", "../", filePath);
22746
+ }
22747
+ if (tempFile.endsWith(path.sep)) {
22734
22748
tempFile = tempFile + "index." + post;
22735
22749
if (fs.existsSync(tempFile)) {
22736
22750
return Promise.resolve(new vscode_12.Location(vscode_12.Uri.file(tempFile), new vscode_12.Position(0, 0)));
22737
22751
}
22738
22752
} else {
22739
22753
let indexFile = tempFile + path.sep + "index." + post;
22740
22754
tempFile += "." + post;
22755
+ tempFile = (0, util_1.winRootPathHandle)(tempFile);
22741
22756
if (fs.existsSync(tempFile)) {
22742
22757
return Promise.resolve(new vscode_12.Location(vscode_12.Uri.file(tempFile), new vscode_12.Position(0, 0)));
22743
22758
}
0 commit comments