From 0aa38f51339671e5fb34a809bf8263b72d37cf9a Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Sat, 28 Dec 2024 01:37:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=9E=B6=E6=9E=84=EF=BC=8C?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E4=BE=9D=E8=B5=96=E6=B3=A8=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 3 +- public/netlist.css | 4 +- src/App.vue | 2 + src/components/right-nav.vue | 30 ++--- src/components/treeview/index.vue | 55 ++++++++- src/components/treeview/modules.vue | 166 ++++++++++++++++++++++++++++ src/components/treeview/tree.js | 13 +++ src/hook/css.js | 9 +- src/hook/global.js | 13 ++- src/hook/jsdoc.js | 4 +- src/hook/render/index.js | 54 ++++++++- src/hook/render/instantiation.js | 95 ++++++++++++++++ src/hook/render/layout.js | 20 ++-- src/hook/render/yosys.js | 36 ++++-- src/hook/utils.js | 5 + src/i18n/ar.json | 3 +- src/i18n/de.json | 3 +- src/i18n/en.json | 3 +- src/i18n/fr.json | 3 +- src/i18n/ja.json | 3 +- src/i18n/ko.json | 3 +- src/i18n/ru.json | 3 +- src/i18n/zh-cn.json | 3 +- src/i18n/zh-tw.json | 3 +- 24 files changed, 476 insertions(+), 60 deletions(-) create mode 100644 src/components/treeview/modules.vue create mode 100644 src/components/treeview/tree.js diff --git a/public/index.html b/public/index.html index 55d8718..12a18cc 100644 --- a/public/index.html +++ b/public/index.html @@ -23,7 +23,8 @@ const skinBinary = await r2.arrayBuffer(); return [ netJson, skinBinary ]; } - window.avoidWasm = 'avoid.wasm'; + window.moduleName = 'half_adder'; + // window.avoidWasm = 'avoid.wasm'; diff --git a/public/netlist.css b/public/netlist.css index ae10844..4fe8081 100644 --- a/public/netlist.css +++ b/public/netlist.css @@ -37,8 +37,8 @@ body::-webkit-scrollbar { * hr { border: none; - background-color: var(--vscode-focusBorder); - height: 2px; + background-color: var(--main-color); + height: 1.5px; width: 95%; } /* diff --git a/src/App.vue b/src/App.vue index e007dc7..4777813 100644 --- a/src/App.vue +++ b/src/App.vue @@ -35,6 +35,8 @@ onMounted(async () => { text: t('loading'), background: 'rgba(0, 0, 0, 0.7)' }); + + globalLookup.topModuleName = window.moduleName; // 初始化载入 netlist 的 json 文件 const [ netJson, skinBinary ] = await window.readNetFile(); diff --git a/src/components/right-nav.vue b/src/components/right-nav.vue index 63c3126..3ea2fe3 100644 --- a/src/components/right-nav.vue +++ b/src/components/right-nav.vue @@ -1,7 +1,7 @@