diff --git a/public/CascadiaCode.woff2 b/public/CascadiaCode.woff2 new file mode 100644 index 0000000..ed0335c Binary files /dev/null and b/public/CascadiaCode.woff2 differ diff --git a/public/animation.css b/public/animation.css new file mode 100644 index 0000000..882cb60 --- /dev/null +++ b/public/animation.css @@ -0,0 +1,105 @@ +:root { + --main-during: 0.35s; + --fade-during: .5s; +} + +.fade-animation-effect { + transition: var(--animation-5s); + -webkit-transition: var(--animation-5s); + -ms-transition: var(--animation-5s); +} + +.easy-hidden { + visibility: hidden; +} + +.main-fade-enter-from, +.main-fade-leave-to { + opacity: 0; +} +.main-fade-enter-to, +.main-fade-leave-from { + opacity: 1; +} +.main-fade-enter-active, +.main-fade-leave-active { + transition: opacity var(--main-during); + -moz-transition: opacity var(--main-during); + -webkit-transition: opacity var(--main-during); +} + +.slide-enter-active, +.slide-leave-active { + transition: all .5s ease-out; + -moz-transition: all .5s ease-out; + -webkit-transition: all .5s ease-out; +} +.slide-enter-from { + position: relative; + transform: translateY(-100px); + opacity: 0%; +} +.slide-leave-to { + transform: translateY(100px); + opacity: 0%; +} + + +.slide-down-enter-active, +.slide-down-leave-active { + transition: all .5s ease-out; + -moz-transition: all .5s ease-out; + -webkit-transition: all .5s ease-out; +} +.slide-down-enter-from { + position: relative; + transform: translateY(100px); + opacity: 0%; +} +.slide-down-leave-to { + transform: translateY(100px); + opacity: 0%; +} + +.slide-up-enter-active, +.slide-up-leave-active { + transition: all .5s ease-out; + -moz-transition: all .5s ease-out; + -webkit-transition: all .5s ease-out; +} +.slide-up-enter-from { + position: relative; + transform: translateY(-100px); + opacity: 0%; +} +.slide-up-leave-to { + transform: translateY(-100px); + opacity: 0%; +} + +.collapse-from-top-enter-active, +.collapse-from-top-leave-active { + transition: var(--animation-3s); + -moz-transition: var(--animation-3s); + -webkit-transition: var(--animation-3s); +} + +.collapse-from-top-enter-from { + transform: scaleY(0); + transform-origin: center top; + opacity: 0%; +} +.collapse-from-top-leave-to { + transform: scaleY(0); + transform-origin: center top; + opacity: 0%; +} + +@keyframes loading-mask { + 0% { + background-position: 100% 50%; + } + 100% { + background-position: 0 50%; + } +} \ No newline at end of file diff --git a/public/iconfont.css b/public/iconfont.css index 518a708..3872182 100644 --- a/public/iconfont.css +++ b/public/iconfont.css @@ -1,15 +1,92 @@ @font-face { font-family: "iconfont"; /* Project id 4440655 */ - src: url('iconfont.woff2?t=1715948037690') format('woff2'); + src: url('iconfont.woff2?t=1723382481292') format('woff2'); } .iconfont { font-family: "iconfont" !important; + font-style: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } +.icon-add-line:before { + content: "\e7b0"; +} + +.icon-arrow-to-previous:before { + content: "\e616"; +} + +.icon-arrow-to-next:before { + content: "\e615"; +} + +.icon-beginning:before { + content: "\e60e"; +} + +.icon-ending:before { + content: "\e60f"; +} + +.icon-line-analog:before { + content: "\e662"; +} + +.icon-ladder-analog:before { + content: "\e87b"; +} + +.icon-common-digital:before { + content: "\e606"; +} + +.icon-delete:before { + content: "\e684"; +} + +.icon-empty:before { + content: "\e617"; +} + +.icon-expand:before { + content: "\e658"; +} + +.icon-collapse:before { + content: "\e676"; +} + +.icon-group:before { + content: "\e70c"; +} + +.icon-cancel-group:before { + content: "\e65f"; +} + +.icon-delete-group:before { + content: "\e675"; +} + +.icon-choose:before { + content: "\e63b"; +} + +.icon-thin-arrow-right:before { + content: "\e622"; +} + +.icon-change-color:before { + content: "\e6fb"; +} + +.icon-join-group:before { + content: "\e914"; +} + .icon-arrow-right:before { content: "\eb08"; } diff --git a/public/iconfont.woff2 b/public/iconfont.woff2 index d24300f..11a952b 100644 Binary files a/public/iconfont.woff2 and b/public/iconfont.woff2 differ diff --git a/public/index.html b/public/index.html index 507a9e4..4187343 100644 --- a/public/index.html +++ b/public/index.html @@ -11,6 +11,7 @@ + diff --git a/public/vcd.css b/public/vcd.css index 59ae30a..be950be 100644 --- a/public/vcd.css +++ b/public/vcd.css @@ -9,7 +9,9 @@ --time-scale-height: 50px; --sidebar-padding: 10px; --sidebar-item-margin: 5px; + --toolbar-height: 50px; --vcd-render-padding: 30px; + --vcd-value-font-family: "Cascadia code", monospace; /* 需要满足如下公式 --time-scale-height + --sidebar-padding = --vcd-render-padding + canvas预留 高度 */ --render-scale-x: 1; @@ -20,6 +22,11 @@ --gray-box-shadow-0: 0 0 8px 3px rgba(182, 181, 182, 0.9); } +@font-face { + font-family: "Cascadia code"; + src: url("./CascadiaCode.woff2"); +} + html, body { background-color: var(--background); color: var(--foreground); @@ -36,7 +43,7 @@ body::-webkit-scrollbar { height: 2px; width: 95%; } - +/* ::-webkit-scrollbar { width: 12px; } @@ -68,15 +75,17 @@ body::-webkit-scrollbar { ::-webkit-scrollbar-corner { background: none; display: none; -} +} */ .el-select__wrapper { - background-color: transparent !important; - width: 50% !important; - min-width: 200px !important; - padding: 13px !important; - font-size: 16px !important; - color: var(--sidebar-item-text) !important; + min-width: 100px; + padding: 13px; + font-size: 16px; + color: var(--sidebar-item-text); +} + +.el-select-group__title { + color: var(--main-color) !important; } .el-select__placeholder { @@ -84,19 +93,14 @@ body::-webkit-scrollbar { } .el-select-dropdown { - min-width: 300px !important; background-color: var(--sidebar); border: 1.0px solid var(--main-color); - outline: none; } .el-checkbox-button__inner { font-size: 16px !important; } -.el-select { - width: fit-content !important; -} a { color: var(--main-color); diff --git a/scripts/update_icon.py b/scripts/update_icon.py new file mode 100644 index 0000000..8eb9b31 --- /dev/null +++ b/scripts/update_icon.py @@ -0,0 +1,40 @@ +import requests as r +import os +import shutil +import zipfile + +# 下载 压缩包 +headers = { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36', + 'Cookie': 'cna=FeNcHjgPWA8CAXU/P9lD8IsF; EGG_SESS_ICONFONT=Hu68kBY7XO7C6Udp3T99M1asKmUZ0gxjps8xjTrjx4ZtNCIR_nFu9Li15nxoPAWLmGlcEMN2KEQyAvgBfASR3cSsmd2lhqg89lUmApzbWgBgCWjMwMzjawMqh2KNT8kCICxit3iWC7YLdUuCdUfXg_cGkRjPNvDohqyeHF27gTb5CloBSvLjqN45PcUvcUig; ctoken=Ku-GfnHTFQU6ObMjjX4rrwYn; u=10114852; u.sig=mv5vi-TPPlhvQJi2PMIC4VoPpD03Wc9UykMTMiG6ElA; xlly_s=1; tfstk=fSrIwBNqyBACtg2sZ2BZ5BUbpIn7PWsVNLM8n8KeeDnpwQex_JrEY887N5wxykyrvui717NU8DUUPYN4p7glKbl-N7y88OSV0J2nq0K5giSVfSIC9W9pv3B-6YMoT58eCJ2nqdvwwZzTKU6xnQBS27ntXvkj2HHKwO9tnfKKeHHJ6OMo6bn-9v39XxMD9e3Kpbdy1Y7IeJ69Kr6y7I-gLftJcKDKJZyez3-yav0nMVh62Arsd2GYpk3XwyMTblgq7L5ZX-4a9AifbenYCzFbk7b2SDw8J70_t1Ys_PE3eb3wenysPXaTvV9J2RmsN447O6Tn9yPsoA39FiDagfe3vP6k6JFqODHt7iBbB4UaxqqF6HiYoJoUy7b2SDw8JcszunlfpXTWCqxSCjW1CUYrE4jk1CVx8l3KIvIVCOO6r2HiCjW1CUYoJADLuO661Uf..; isg=BCwsfWsQZki1QXEWw0jCCc4h_Qpe5dCP-aVamIZsF1d6kc6br_ZyHmFnsVkpGQjn', + 'Pragma': 'no-cache', + 'sec-fetch-mode': 'navigate' +} + +url = 'https://www.iconfont.cn/api/project/download.zip?spm=a313x.manage_type_myprojects.i1.d7543c303.125e3a81q6VMOU&pid=4440655&ctoken=Ku-GfnHTFQU6ObMjjX4rrwYn' +res = r.get(url, headers=headers) + +if res.status_code: + with open('./scripts/tmp.zip', 'wb') as fp: + fp.write(res.content) + +# 解压文件 +with zipfile.ZipFile('./scripts/tmp.zip', 'r') as zipf: + zipf.extractall('./scripts/tmp') + +# 将文件搬运至工作区,我的 css 全放在 public 下面了,你的视情况而定 +for parent, _, files in os.walk('./scripts/tmp'): + for file in files: + filepath = os.path.join(parent, file) + if file.startswith('demo'): + continue + if file.endswith('.css'): + content = open(filepath, 'r', encoding='utf-8').read().replace('font-size: 16px;', '') + open(filepath, 'w', encoding='utf-8').write(content) + shutil.move(filepath, os.path.join('./public', file)) + elif file.endswith('.woff2'): + shutil.move(filepath, os.path.join('./public', file)) + +# 删除压缩包和解压区域 +os.remove('./scripts/tmp.zip') +shutil.rmtree('./scripts/tmp') \ No newline at end of file diff --git a/scripts/update_icon_from_server.py b/scripts/update_icon_from_server.py new file mode 100644 index 0000000..b33eda9 --- /dev/null +++ b/scripts/update_icon_from_server.py @@ -0,0 +1,27 @@ +import requests as r +import os +import shutil +import zipfile + +res = r.get('https://kirigaya.cn/files/links/tmp.zip') + +# 解压文件 +with zipfile.ZipFile('./scripts/tmp.zip', 'r') as zipf: + zipf.extractall('./scripts/tmp') + +# 将文件搬运至工作区,我的 css 全放在 public 下面了,你的视情况而定 +for parent, _, files in os.walk('./scripts/tmp'): + for file in files: + filepath = os.path.join(parent, file) + if file.startswith('demo'): + continue + if file.endswith('.css'): + content = open(filepath, 'r', encoding='utf-8').read().replace('font-size: 16px;', '') + open(filepath, 'w', encoding='utf-8').write(content) + shutil.move(filepath, os.path.join('./public', file)) + elif file.endswith('.woff2'): + shutil.move(filepath, os.path.join('./public', file)) + +# 删除压缩包和解压区域 +os.remove('./scripts/tmp.zip') +shutil.rmtree('./scripts/tmp') \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 3033b60..46a05c5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,14 +1,13 @@ @@ -70,6 +74,7 @@ function search() { const searchString = searchManage.content.trim(); if (searchString.length === 0) { searchManage.displayResult = false; + searchManage.searchResult = [] return; } @@ -111,7 +116,6 @@ const safeSearch = debounceWrapper(search, 500); \ No newline at end of file diff --git a/src/components/treeview/signals.vue b/src/components/treeview/signals.vue index 807e249..d152ac9 100644 --- a/src/components/treeview/signals.vue +++ b/src/components/treeview/signals.vue @@ -2,11 +2,12 @@
{{ t('signal') }}({{signals.content.length}})

-
+
+ :class="globalLookup.currentWires.has(signal) ? 'vcd-treeview-selected' : ''" + >
 {{ signal.name }}
@@ -14,7 +15,7 @@
-
+
@@ -62,6 +63,7 @@ export default {