diff --git a/src/components/right-nav.js b/src/components/right-nav.js index 41f2f3e..36fd060 100644 --- a/src/components/right-nav.js +++ b/src/components/right-nav.js @@ -17,8 +17,29 @@ export const controlPanel = reactive({ if (this.currentIndex === index) { this.currentIndex = -1; } else { + if (horizontalResizer.width < 5) { + horizontalResizer.width = 200; + } this.currentIndex = index; } } -}); \ No newline at end of file +}); + +export const horizontalResizer = reactive({ + active: false, + hover: false, + width: 200, + mousedown() { + this.active = true; + document.addEventListener('mousemove', resize); + } +}); + +export function resize(event) { + // 50 是 --right-nav-width + const computedWidth = window.innerWidth - event.clientX - 50; + if (computedWidth >= 0 && computedWidth <= 2000) { + horizontalResizer.width = computedWidth; + } +} \ No newline at end of file diff --git a/src/components/right-nav.vue b/src/components/right-nav.vue index 3ea2fe3..eb27583 100644 --- a/src/components/right-nav.vue +++ b/src/components/right-nav.vue @@ -1,13 +1,22 @@ \ No newline at end of file diff --git a/src/components/treeview/info.vue b/src/components/treeview/info.vue new file mode 100644 index 0000000..2e2bf96 --- /dev/null +++ b/src/components/treeview/info.vue @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/src/components/treeview/modules.vue b/src/components/treeview/modules.vue index a75f1f3..f93a749 100644 --- a/src/components/treeview/modules.vue +++ b/src/components/treeview/modules.vue @@ -9,7 +9,11 @@ -
+
@@ -33,6 +37,7 @@