Skip to content

Commit b28fdb9

Browse files
committed
feat: improve transition effects and refine JsonNode selection behavior
1 parent ddb0c03 commit b28fdb9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/App.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,12 +412,16 @@ html, body {
412412
padding: 8px 16px;
413413
border-radius: 4px;
414414
border: 1px solid var(--border-color);
415-
transition: transform 0.3s ease-in-out;
415+
transition: all 0.3s ease-in-out;
416416
z-index: 1000;
417417
font-size: 13px;
418+
opacity: 0;
419+
visibility: hidden;
418420
419421
&.show {
420422
transform: translateX(-50%) translateY(0);
423+
opacity: 1;
424+
visibility: visible;
421425
}
422426
}
423427

src/components/JsonNode.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,8 @@ const toggleSelect = () => {
149149
const newPaths = []
150150
151151
if (!isSelected.value) {
152+
// Only add the current path, don't automatically select children
152153
newPaths.push(props.path)
153-
154-
// If this is an object/array, add all child paths
155-
if (isObject.value) {
156-
newPaths.push(...getAllChildPaths(props.value, props.path))
157-
}
158154
}
159155
160156
emit('select', newPaths)

0 commit comments

Comments
 (0)