diff --git a/public/iconfont.css b/public/iconfont.css
index 159bf3b..d84582b 100644
--- a/public/iconfont.css
+++ b/public/iconfont.css
@@ -1,6 +1,6 @@
@font-face {
font-family: "iconfont"; /* Project id 4440655 */
- src: url('iconfont.woff2?t=1725251353876') format('woff2');
+ src: url('iconfont.woff2?t=1729428865198') format('woff2');
}
.iconfont {
@@ -11,6 +11,10 @@
-moz-osx-font-smoothing: grayscale;
}
+.icon-menu:before {
+ content: "\e607";
+}
+
.icon-clear:before {
content: "\e619";
}
diff --git a/public/iconfont.woff2 b/public/iconfont.woff2
index 3ff238e..d1c8980 100644
Binary files a/public/iconfont.woff2 and b/public/iconfont.woff2 differ
diff --git a/public/test.vcd.view b/public/test.vcd.view
index aa67e3b..0f7e00c 100644
Binary files a/public/test.vcd.view and b/public/test.vcd.view differ
diff --git a/public/vcd.css b/public/vcd.css
index ada7fd3..d578851 100644
--- a/public/vcd.css
+++ b/public/vcd.css
@@ -10,6 +10,7 @@
--sidebar-padding: 10px;
--sidebar-item-margin: 5px;
--toolbar-height: 50px;
+ --toolbar-item-height: 32px;
--vcd-render-padding: 30px;
--vcd-value-font-family: "Cascadia code", monospace;
/* 需要满足如下公式 --time-scale-height + --sidebar-padding = --vcd-render-padding + canvas预留 高度 */
diff --git a/src/components/pivot/index.vue b/src/components/pivot/index.vue
index 4a0bf23..9d76442 100644
--- a/src/components/pivot/index.vue
+++ b/src/components/pivot/index.vue
@@ -41,6 +41,8 @@ import { globalLookup } from '@/hook/global';
import MovingPivotVue from './moving-pivot.vue';
import { UserPivotCtxShows } from './pivot-view';
import RelativeAxis from './relative-axis.vue';
+import { contextmenu, groupcontextmenu } from '../sidebar/handle-contextmenu';
+import { fileMenuContext } from '../toolbar/file-menu/control';
defineComponent({ name: 'main-render' });
@@ -56,6 +58,11 @@ function onMousedown() {
for (const id of UserPivotCtxShows.keys()) {
UserPivotCtxShows.set(id, false);
}
+
+ // 关闭所有的子菜单
+ contextmenu.show = false;
+ groupcontextmenu.show = false;
+ fileMenuContext.show = false;
}
function onMouseup() {
diff --git a/src/components/toolbar/current-status.vue b/src/components/toolbar/current-status.vue
index 441595f..b33beb3 100644
--- a/src/components/toolbar/current-status.vue
+++ b/src/components/toolbar/current-status.vue
@@ -30,8 +30,8 @@ const selectedColors = computed(() => {
color: var(--sidebar);
border-radius: .5em;
cursor: pointer;
- height: 32px;
- width: 32px;
+ height: var(--toolbar-item-height);
+ width: var(--toolbar-item-height);
background-color: var(--main-color);
display: flex;
align-items: center;
diff --git a/src/components/toolbar/cursor-location.vue b/src/components/toolbar/cursor-location.vue
index 4eaf4af..1977d55 100644
--- a/src/components/toolbar/cursor-location.vue
+++ b/src/components/toolbar/cursor-location.vue
@@ -130,7 +130,7 @@ function confirmClearLocation() {
.location {
display: flex;
align-items: center;
- height: 32px;
+ height: var(--toolbar-item-height);
padding: 1px 5px;
background-color: var(--sidebar);
border-radius: .5em;
@@ -142,9 +142,9 @@ function confirmClearLocation() {
align-items: center;
justify-content: center;
margin-left: 3px;
- height: 32px;
+ height: var(--toolbar-item-height);
font-weight: 800;
- width: 32px;
+ width: var(--toolbar-item-height);
cursor: pointer;
transition: var(--animation-3s);
}
diff --git a/src/components/toolbar/file-menu/control.js b/src/components/toolbar/file-menu/control.js
new file mode 100644
index 0000000..8408a3c
--- /dev/null
+++ b/src/components/toolbar/file-menu/control.js
@@ -0,0 +1,5 @@
+import { reactive } from "vue";
+
+export const fileMenuContext = reactive({
+ show: false,
+});
\ No newline at end of file
diff --git a/src/components/toolbar/file-menu/index.vue b/src/components/toolbar/file-menu/index.vue
new file mode 100644
index 0000000..bda815c
--- /dev/null
+++ b/src/components/toolbar/file-menu/index.vue
@@ -0,0 +1,50 @@
+
+