mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-23 18:49:21 +08:00
chore:新建文件夹支持添加空格,登录页鼠标悬浮样式 (#6058)
This commit is contained in:
parent
d639e46bc7
commit
3d0018c0bd
@ -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'));
|
||||
|
@ -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;
|
||||
|
@ -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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user