diff --git a/frontend/src/views/host/file-management/code-editor/index.vue b/frontend/src/views/host/file-management/code-editor/index.vue index f6c74ac24..6de741e9c 100644 --- a/frontend/src/views/host/file-management/code-editor/index.vue +++ b/frontend/src/views/host/file-management/code-editor/index.vue @@ -753,7 +753,7 @@ const initEditor = () => { lineNumbersMinChars: 6, }); if (editor.getModel().getValue() === '') { - let defaultContent = '\n\n\n\n'; + let defaultContent = ''; editor.getModel().setValue(defaultContent); } diff --git a/frontend/src/views/host/file-management/index.vue b/frontend/src/views/host/file-management/index.vue index 984096d96..63233a0b8 100644 --- a/frontend/src/views/host/file-management/index.vue +++ b/frontend/src/views/host/file-management/index.vue @@ -603,7 +603,7 @@ let selects = ref([]); const initData = () => ({ path: '/', expand: true, - showHidden: false, + showHidden: true, page: 1, pageSize: 100, search: '', @@ -718,6 +718,7 @@ const handleSearchResult = (res: ResultData) => { const viewHideFile = async () => { req.showHidden = !req.showHidden; + localStorage.setItem('show-hidden', req.showHidden ? 'true' : 'false'); let searchResult = await searchFile(); handleSearchResult(searchResult); }; @@ -1411,6 +1412,10 @@ const getHostMount = async () => { }; onMounted(() => { + if (localStorage.getItem('show-hidden') === null) { + localStorage.setItem('show-hidden', 'true'); + } + req.showHidden = localStorage.getItem('show-hidden') === 'true'; getHostMount(); if (router.currentRoute.value.query.path) { req.path = String(router.currentRoute.value.query.path); diff --git a/frontend/src/views/host/file-management/move/index.vue b/frontend/src/views/host/file-management/move/index.vue index 207552c4c..798791ce2 100644 --- a/frontend/src/views/host/file-management/move/index.vue +++ b/frontend/src/views/host/file-management/move/index.vue @@ -246,6 +246,7 @@ const acceptParams = async (props: MoveProps) => { addForm.name = ''; addForm.allNames = props.allNames; type.value = props.type; + existFiles.value = []; if (props.name && props.name != '') { oldName.value = props.name; const res = await checkFile(props.path + '/' + props.name, false);