This commit is contained in:
pushuo 2022-07-13 17:05:41 +08:00
parent 174b8f3438
commit a28ce5a15f
1 changed files with 2 additions and 0 deletions

View File

@ -263,6 +263,7 @@
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /^.+$/,
closeOnClickModal: false,
inputValue: data ? data.name : '',
inputErrorMessage: '不能为空'
}).then(({ value }) => {
@ -277,6 +278,7 @@
$http.post(`file_manager/rename`, {origin_name: this.folderCurrent, new_name: value}).then((res) => {
layer.msg(res.message)
data.name = value;
data.path = data.path.replace(/\/[^\/]*$/, '/' + value);
this.folderCurrent = this.folderCurrent.replace(/\/[^\/]*$/, '/' + value);
})
}