chore:新建文件夹支持添加空格,登录页鼠标悬浮样式 (#6058)

This commit is contained in:
trom 2024-08-08 10:27:06 +08:00 committed by GitHub
parent d639e46bc7
commit 3d0018c0bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 7 deletions

View File

@ -23,7 +23,7 @@
@submit.enter.prevent
>
<el-form-item :label="$t('commons.table.name')" prop="name">
<el-input v-model.trim="addForm.name" />
<el-input v-model="addForm.name" />
</el-form-item>
<el-form-item v-if="!addForm.isDir">
<el-checkbox v-model="addForm.isLink" :label="$t('file.link')"></el-checkbox>
@ -105,9 +105,9 @@ const getMode = (val: number) => {
let getPath = computed(() => {
if (addForm.path.endsWith('/')) {
return addForm.path + addForm.name;
return addForm.path + addForm.name.trim();
} else {
return addForm.path + '/' + addForm.name;
return addForm.path + '/' + addForm.name.trim();
}
});
@ -133,6 +133,7 @@ const submit = async (formEl: FormInstance | undefined) => {
if (!setRole.value) {
addItem['mode'] = undefined;
}
addItem['name'] = addForm.name.trim();
CreateFile(addItem as File.FileCreate)
.then(() => {
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));

View File

@ -146,7 +146,6 @@ const handleDrop = async (event: DragEvent) => {
initTempFiles();
event.preventDefault();
const items = event.dataTransfer?.items;
if (items) {
const entries = Array.from(items).map((item) => item.webkitGetAsEntry());
await Promise.all(entries.map((entry) => traverseFileTree(entry)));
@ -183,7 +182,9 @@ const convertFileToUploadFile = (file: File, path: string): UploadFile => {
const traverseFileTree = async (item: any, path = '') => {
path = path || '';
if (!item) {
return;
}
if (item.isFile) {
if (tmpFiles.value.length > 1000) {
breakFlag.value = true;

View File

@ -41,8 +41,8 @@
<div class="login-form">
<el-form ref="loginFormRef" :model="loginForm" size="default" :rules="loginRules">
<div class="login-form-header">
<div class="title">{{ $t('commons.button.login') }}</div>
<div>
<div class="title cursor-pointer">{{ $t('commons.button.login') }}</div>
<div class="cursor-pointer">
<el-dropdown @command="handleCommand">
<span>
{{ dropdownText }}