新增文件夹时添加限制
This commit is contained in:
parent
e68eb4c8d6
commit
fc6b23432c
|
@ -899,7 +899,8 @@ export default defineComponent({
|
||||||
message: $t.t("input folder name") + ":",
|
message: $t.t("input folder name") + ":",
|
||||||
prompt: {
|
prompt: {
|
||||||
model: "",
|
model: "",
|
||||||
isValid: (val: string) => !!val && val.trim().length > 0,
|
isValid: (val: string) =>
|
||||||
|
!!val && val.trim().length > 0&& val.indexOf(".") != 0 ,
|
||||||
type: "text",
|
type: "text",
|
||||||
},
|
},
|
||||||
ok: {
|
ok: {
|
||||||
|
@ -917,6 +918,7 @@ export default defineComponent({
|
||||||
const response = await GlobalData.getInstance()
|
const response = await GlobalData.getInstance()
|
||||||
.getCurrentClient()
|
.getCurrentClient()
|
||||||
?.CreateDirectoryFileManager(path.value, data);
|
?.CreateDirectoryFileManager(path.value, data);
|
||||||
|
console.log(response);
|
||||||
if (response && response.success) {
|
if (response && response.success) {
|
||||||
refresh_file_list();
|
refresh_file_list();
|
||||||
$q.notify({
|
$q.notify({
|
||||||
|
@ -926,16 +928,34 @@ export default defineComponent({
|
||||||
timeout: 1500,
|
timeout: 1500,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$q.notify({
|
// if (
|
||||||
type: "warning",
|
// response?.error_message ==
|
||||||
message:
|
// "the folder name cannot start with a '.'"
|
||||||
$t.t("create folder") +
|
// ) {
|
||||||
$t.t("fail") +
|
// $q.notify({
|
||||||
"!" +
|
// type: "warning",
|
||||||
(response ? response.error_message : ""),
|
// message:
|
||||||
position: "top",
|
// $t.t("create folder") +
|
||||||
timeout: 1500,
|
// $t.t("fail") +
|
||||||
});
|
// "!" +
|
||||||
|
// $t.t("the folder name cannot start with a '.'"),
|
||||||
|
// position: "top",
|
||||||
|
// timeout: 1500,
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
if (response) {
|
||||||
|
$q.notify({
|
||||||
|
type: "warning",
|
||||||
|
message:
|
||||||
|
$t.t("create folder") +
|
||||||
|
$t.t("fail") +
|
||||||
|
"! " +
|
||||||
|
$t.t(response.error_message),
|
||||||
|
position: "top",
|
||||||
|
timeout: 1500,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1071,7 +1091,7 @@ export default defineComponent({
|
||||||
timeout: 1500,
|
timeout: 1500,
|
||||||
});
|
});
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
uploading.value=false;
|
uploading.value = false;
|
||||||
}
|
}
|
||||||
}, 500);
|
}, 500);
|
||||||
},
|
},
|
||||||
|
|
|
@ -445,4 +445,6 @@ export default {
|
||||||
resize: "Resize",
|
resize: "Resize",
|
||||||
"export magic": "Export",
|
"export magic": "Export",
|
||||||
"raster graph": "Raster Graph",
|
"raster graph": "Raster Graph",
|
||||||
|
"the folder name cannot start with a '.'":"The Folder Name Cannot Start With a '.'",
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -713,4 +713,5 @@ export default {
|
||||||
resize: "缩放",
|
resize: "缩放",
|
||||||
"export magic": "导出",
|
"export magic": "导出",
|
||||||
"raster graph": "栅格图",
|
"raster graph": "栅格图",
|
||||||
|
"the folder name cannot start with a '.'":"文件夹名称不能以“.” 开头",
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue