mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-01-11 17:44:45 +08:00
parent
7889b5ad69
commit
4ef9fcde59
3 changed files with 8 additions and 2 deletions
|
|
@ -753,7 +753,7 @@ const initEditor = () => {
|
|||
lineNumbersMinChars: 6,
|
||||
});
|
||||
if (editor.getModel().getValue() === '') {
|
||||
let defaultContent = '\n\n\n\n';
|
||||
let defaultContent = '';
|
||||
editor.getModel().setValue(defaultContent);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -603,7 +603,7 @@ let selects = ref<any>([]);
|
|||
const initData = () => ({
|
||||
path: '/',
|
||||
expand: true,
|
||||
showHidden: false,
|
||||
showHidden: true,
|
||||
page: 1,
|
||||
pageSize: 100,
|
||||
search: '',
|
||||
|
|
@ -718,6 +718,7 @@ const handleSearchResult = (res: ResultData<File.File>) => {
|
|||
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue