mirror of
https://github.com/1Panel-dev/1Panel
synced 2024-11-23 08:28:34 +00:00
fix: 限制文件和文件夹名称为空
This commit is contained in:
parent
2904ed0edc
commit
ddd59cd5f4
@ -122,7 +122,6 @@ export function loadZero(i: number) {
|
||||
|
||||
export function computeSize(size: number): string {
|
||||
const num = 1024.0;
|
||||
|
||||
if (size < num) return size + ' B';
|
||||
if (size < Math.pow(num, 2)) return (size / num).toFixed(2) + ' KB';
|
||||
if (size < Math.pow(num, 3)) return (size / Math.pow(num, 2)).toFixed(2) + ' MB';
|
||||
|
@ -22,7 +22,7 @@
|
||||
@submit.enter.prevent
|
||||
>
|
||||
<el-form-item :label="$t('file.name')" prop="name">
|
||||
<el-input v-model="addForm.name" />
|
||||
<el-input v-model.trim="addForm.name" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="!addForm.isDir">
|
||||
<el-checkbox v-model="addForm.isLink" :label="$t('file.link')"></el-checkbox>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<el-input v-model="addForm.path" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('file.name')" prop="newName">
|
||||
<el-input v-model="addForm.newName" />
|
||||
<el-input v-model.trim="addForm.newName" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
|
Loading…
Reference in New Issue
Block a user