From 9ef64fdb750cc62cafbb61f1f9f5e1770ca8afcf Mon Sep 17 00:00:00 2001 From: nekosu Date: Sun, 6 Aug 2023 23:42:05 +0800 Subject: [PATCH] feat: alter root behavior --- src/App.vue | 2 +- src/components/TaskTreeRender.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index 74e46bc..e951b32 100644 --- a/src/App.vue +++ b/src/App.vue @@ -20,7 +20,7 @@ import { fs } from '@/data/fs' import TaskEdit from '@/components/TaskEdit.vue' import TaskTree from '@/components/TaskTree.vue' -const expands = ref(['root.']) +const expands = ref(['/']) onMounted(async () => { await loadFS() diff --git a/src/components/TaskTreeRender.tsx b/src/components/TaskTreeRender.tsx index 7564e80..622f2a2 100644 --- a/src/components/TaskTreeRender.tsx +++ b/src/components/TaskTreeRender.tsx @@ -37,7 +37,7 @@ export function renderLabel({ option }: { option: TreeOption }) { } } } else { - return {option.label} + return {option.key === '/' ? '[ROOT]' : option.label} } }