修改了数据导入的描述

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;
}
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() {
this.render();
this.addEventListeners();
@ -277,8 +326,8 @@ class InterfaceToolbar extends HTMLElement {
background-color: white;
padding: 20px;
border-radius: 8px;
width: 800px;
max-width: 90%;
width: 1000px;
max-width: 95%;
}
.modal-header {
@ -295,7 +344,7 @@ class InterfaceToolbar extends HTMLElement {
.modal-body {
display: flex;
gap: 20px;
gap: 30px;
}
.import-section {
@ -303,6 +352,7 @@ class InterfaceToolbar extends HTMLElement {
padding: 20px;
border: 1px solid #ddd;
border-radius: 4px;
min-width: 450px;
}
.import-section h3 {
@ -320,6 +370,17 @@ class InterfaceToolbar extends HTMLElement {
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 {
margin-top: 20px;
text-align: right;
@ -394,9 +455,7 @@ class InterfaceToolbar extends HTMLElement {
</button>
</div>
<div class="import-description">
支持从Excel文件(.xlsx/.xls)导入接口数据<br>
请确保Excel文件格式正确包含所有必要的字段<br>
导入过程中请勿关闭页面
<pre>${InterfaceToolbar.icdImportGuide}</pre>
</div>
</div>
<div class="import-section">
@ -408,9 +467,7 @@ class InterfaceToolbar extends HTMLElement {
</button>
</div>
<div class="import-description">
支持从IDL文件(.idl)导入接口数据<br>
请确保IDL文件格式正确包含所有必要的接口定义<br>
导入过程中请勿关闭页面
<pre>${InterfaceToolbar.idlImportGuide}</pre>
</div>
</div>
</div>