-
-
Notifications
You must be signed in to change notification settings - Fork 45
Feature multiple splitpane #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feature multiple splitpane #179
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Now there are still some bugs and ts type that have not been repaired. I will fix them and then see if the code is optimized. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix TS errors as well.
.vscode/settings.json
Outdated
@@ -1,3 +1,6 @@ | |||
{ | |||
"editor.formatOnSave": true | |||
"editor.codeActionsOnSave": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert these changes.
app.vue
Outdated
@@ -1,4 +1,6 @@ | |||
<script setup lang="ts"> | |||
import { expLayout } from '~/state/ui.js' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { expLayout } from '~/state/ui.js' | |
import { expLayout } from '~/state/ui' |
components/InputContainer.vue
Outdated
import { currentParser } from '~/state/parser/parser' | ||
import { parsersOptions } from '~/state/parser/options' | ||
import { currentParsers } from '~/state/parser/parser' | ||
import { activeTab } from '~/state/ui.js' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { activeTab } from '~/state/ui.js' | |
import { activeTab } from '~/state/ui' |
icons/layout1.vue
Outdated
@@ -0,0 +1,18 @@ | |||
<template> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use UnoCSS icon.
public/.svg
Outdated
@@ -0,0 +1 @@ | |||
<svg t="1750689713539" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16875" width="200" height="200"><path d="M170.666667 896a42.666667 42.666667 0 0 1-42.666667-42.666667V170.666667a42.666667 42.666667 0 0 1 42.666667-42.666667h682.666666a42.666667 42.666667 0 0 1 42.666667 42.666667v682.666666a42.666667 42.666667 0 0 1-42.666667 42.666667H170.666667z m170.666666-469.333333H213.333333v384h128v-384z m469.333334 0h-384v384h384v-384z m0-213.333334H213.333333v128h597.333334V213.333333z" fill="#000000" p-id="16876"></path></svg> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this?
utils/index.ts
Outdated
@@ -0,0 +1,21 @@ | |||
export function getIntersection<T>(arr1: T[], arr2: T[]): T[] { | |||
// 优化:对较小数组建 Set,减少内存占用 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the Chinese comment.
state/url.ts
Outdated
@@ -1,11 +1,13 @@ | |||
// import { rawOptions, setDefaultOptions } from './parser/options' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comments
state/ui.ts
Outdated
@@ -18,6 +19,13 @@ export const outputView = useLocalStorage<'tree' | 'json'>( | |||
'tree', | |||
) | |||
|
|||
export const sideBarAvailable = computed( | |||
() => currentParser.value.options.configurable && !!currentParserGui.value, | |||
export const expLayout = ref<Layout>('layout1') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea about expLayout
. Use a more clear name, and value.
… in different modes
…nent with non-element root node
I also found some problems when I was using it, and I will also fix and optimize it together. |
I totally get the idea. I was talking that going to this mode with presumably empty localstorage & no tabs - creates 2 tabs for parser output (displaying the exact same info). Shouldn't it be a single tab for 1 parser? Why do we double it for this state? |
How to understand "a single tab for 1 parser". I don't quite understand this. You mean that when you switched to this kind of multi-tab for the first time, you parsed the same analysis twice, right? This is indeed a problem. |
Description
Main function: Add splitpane to support multi block display
Change point:
Linked Issues
issue 140
Additional context