修改了数据导入的描述

This commit is contained in:
jinchao 2025-05-07 14:35:52 +08:00
parent a9a4b1832e
commit c70eca3b13
2 changed files with 66 additions and 9 deletions

Binary file not shown.

View File

@ -5,6 +5,55 @@ class InterfaceToolbar extends HTMLElement {
this.showAdvancedSearch = false; this.showAdvancedSearch = false;
} }
static get idlImportGuide() {
return `
1. 支持从IDL文件(.idl)导入接口数据
2. IDL文件格式规范
module XNSim {
// 构型名称
module C909 {
// ATA章节名称
module ATAxx {
// 输入结构体名称
struct InputStrName {
@optional 变量类型 变量名称;
...
}
// 输出结构体名称
struct OutputStrName {
@optional 变量类型 变量名称;
...
}
...
}
}
}
3. 导入过程中请勿关闭页面`;
}
static get icdImportGuide() {
return `
1. 支持从Excel文件(.xlsx/.xls)导入接口数据
2. 请确保Excel文件具有Inputs和Outputs两个工作表
3. Inputs工作表必须包含以下几列
Input Variable Name
Variable Type
Description
Variable Dimensions
4. Outputs工作表必须包含以下几列
Output Variable Name
Variable Type
Description
Variable Dimensions
5. 导入过程中请勿关闭页面`;
}
connectedCallback() { connectedCallback() {
this.render(); this.render();
this.addEventListeners(); this.addEventListeners();
@ -277,8 +326,8 @@ class InterfaceToolbar extends HTMLElement {
background-color: white; background-color: white;
padding: 20px; padding: 20px;
border-radius: 8px; border-radius: 8px;
width: 800px; width: 1000px;
max-width: 90%; max-width: 95%;
} }
.modal-header { .modal-header {
@ -295,7 +344,7 @@ class InterfaceToolbar extends HTMLElement {
.modal-body { .modal-body {
display: flex; display: flex;
gap: 20px; gap: 30px;
} }
.import-section { .import-section {
@ -303,6 +352,7 @@ class InterfaceToolbar extends HTMLElement {
padding: 20px; padding: 20px;
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: 4px; border-radius: 4px;
min-width: 450px;
} }
.import-section h3 { .import-section h3 {
@ -320,6 +370,17 @@ class InterfaceToolbar extends HTMLElement {
line-height: 1.5; line-height: 1.5;
} }
.import-description pre {
font-family: 'Courier New', Courier, monospace;
background-color: #f8f9fa;
padding: 20px;
border-radius: 4px;
white-space: pre-wrap;
line-height: 1.6;
color: #333;
margin: 0;
}
.modal-footer { .modal-footer {
margin-top: 20px; margin-top: 20px;
text-align: right; text-align: right;
@ -394,9 +455,7 @@ class InterfaceToolbar extends HTMLElement {
</button> </button>
</div> </div>
<div class="import-description"> <div class="import-description">
支持从Excel文件(.xlsx/.xls)导入接口数据<br> <pre>${InterfaceToolbar.icdImportGuide}</pre>
请确保Excel文件格式正确包含所有必要的字段<br>
导入过程中请勿关闭页面
</div> </div>
</div> </div>
<div class="import-section"> <div class="import-section">
@ -408,9 +467,7 @@ class InterfaceToolbar extends HTMLElement {
</button> </button>
</div> </div>
<div class="import-description"> <div class="import-description">
支持从IDL文件(.idl)导入接口数据<br> <pre>${InterfaceToolbar.idlImportGuide}</pre>
请确保IDL文件格式正确包含所有必要的接口定义<br>
导入过程中请勿关闭页面
</div> </div>
</div> </div>
</div> </div>