From c70eca3b13c2b2431af925a47ecb2e36dec469e1 Mon Sep 17 00:00:00 2001 From: jinchao <383321154@qq.com> Date: Wed, 7 May 2025 14:35:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E7=9A=84=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Release/database/XNSim.db | Bin 163840 -> 163840 bytes .../components/interface-config/toolbar.js | 75 +++++++++++++++--- 2 files changed, 66 insertions(+), 9 deletions(-) diff --git a/Release/database/XNSim.db b/Release/database/XNSim.db index b28d5004fd8f74a5f6a0caa3606e9e0443109615..a1da5efa3c59939babb7e9a736526c3ff24fb60b 100644 GIT binary patch delta 313 zcmZo@;A&{#njp<+I#I@%)s#W6tb1e10(%KAu51S03%qswN&KsM_VO|ExO1=MHs;FS z*yzty-{{K4A+9Lv+$1S(sAr&OX=Gqzs%rp5=7uI#1_o9JhEMjddp2d~lU;4k`j$TJ zU;MJQ_xav+&!_ghoV&lO4OBP2KRUciq!nlb=oQeX@7X z`#rO{jG($eQl3D$))g}> Yvp6Hzmt4)u&<%bMVh^hfy$%5kM+>P7 zGqHgg3$rsz(F7I=52pYR_Ydt4;}6*n&kw~9yAQDsr?U|tjSrKZUkHP*Ux%+>0k^MT G0#P95k071^ diff --git a/XNSimHtml/components/interface-config/toolbar.js b/XNSimHtml/components/interface-config/toolbar.js index ab03186..1b5912b 100644 --- a/XNSimHtml/components/interface-config/toolbar.js +++ b/XNSimHtml/components/interface-config/toolbar.js @@ -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 {
- 支持从Excel文件(.xlsx/.xls)导入接口数据。
- 请确保Excel文件格式正确,包含所有必要的字段。
- 导入过程中请勿关闭页面。 +
${InterfaceToolbar.icdImportGuide}
@@ -408,9 +467,7 @@ class InterfaceToolbar extends HTMLElement {
- 支持从IDL文件(.idl)导入接口数据。
- 请确保IDL文件格式正确,包含所有必要的接口定义。
- 导入过程中请勿关闭页面。 +
${InterfaceToolbar.idlImportGuide}