style: 优化移动复制重命名
This commit is contained in:
parent
9698aa2bc0
commit
8665996a80
@ -346,7 +346,7 @@
|
||||
size="small"
|
||||
@focus="renameInputFocus($event.currentTarget, item.suffix)"
|
||||
@blur="setInputBlur()"
|
||||
@keyup.enter.native="rowRename(renameFileName, item)">
|
||||
@keyup.enter.prevent.native="rowRename(renameFileName, item)">
|
||||
</el-input>
|
||||
<div v-else>
|
||||
<div class="grid-item-text"><span>{{ gridFilename(item) }}</span></div>
|
||||
@ -2464,16 +2464,14 @@ export default {
|
||||
username: this.$store.state.user.name,
|
||||
id: row.id
|
||||
}).then(res => {
|
||||
if (res.data) {
|
||||
this.renameLoading = false
|
||||
row.name = newFileName
|
||||
row.suffix = newFileName.replace(/.+\./, "")
|
||||
this.fileList[row.index] = row
|
||||
this.editingIndex = -1
|
||||
}
|
||||
this.renameLoading = false
|
||||
row.name = newFileName
|
||||
row.suffix = newFileName.replace(/.+\./, "")
|
||||
this.fileList[row.index] = row
|
||||
this.editingIndex = -1
|
||||
this.$message.success("重命名中...")
|
||||
}).then(() => {
|
||||
this.$refs.fileListTable.clearSelection()
|
||||
this.$message.success("重命名成功")
|
||||
}).catch(() => {
|
||||
this.renameLoading = false
|
||||
this.editingIndex = -1
|
||||
|
||||
@ -587,13 +587,11 @@ export default {
|
||||
newFileName: encodeURI(newFileName),
|
||||
username: this.$store.state.user.name,
|
||||
id: row.id
|
||||
}).then(res => {
|
||||
if (res.data) {
|
||||
this.renameLoading = false
|
||||
row.name = newFileName
|
||||
this.fileList[row.index] = row
|
||||
this.editingIndex = -1
|
||||
}
|
||||
}).then(() => {
|
||||
this.renameLoading = false
|
||||
row.name = newFileName
|
||||
this.fileList[row.index] = row
|
||||
this.editingIndex = -1
|
||||
})
|
||||
} else {
|
||||
this.editingIndex = -1
|
||||
|
||||
@ -38,18 +38,26 @@ function connect(username,token){
|
||||
Bus.$emit('msg/synced', msg)
|
||||
} else {
|
||||
Bus.$emit('msg/file/change', msg)
|
||||
if ('copyFile' === url) {
|
||||
if ('operationFile' === url) {
|
||||
let doc = JSON.parse(msg.body)
|
||||
if (doc.code === 0) {
|
||||
Bus.$notify({
|
||||
title: '操作成功',
|
||||
title: `${doc.operation}成功`,
|
||||
dangerouslyUseHTMLString: true,
|
||||
message: `<div><p>form:</p><span>${doc.from}</span></div><div><p>to:</p><span>${doc.to}</span></div>`,
|
||||
type: 'success'
|
||||
message: `
|
||||
<div>
|
||||
<p>form:</p>
|
||||
<pre style="word-break: break-all;white-space: pre-wrap;">${doc.from}</pre>
|
||||
</div>
|
||||
<div>
|
||||
<p>to:</p>
|
||||
<pre style="word-break: break-all;white-space: pre-wrap;">${doc.to}</pre>
|
||||
</div>`,
|
||||
type: 'success',
|
||||
});
|
||||
} else {
|
||||
Bus.$notify({
|
||||
title: '操作失败',
|
||||
title: `${doc.operation}失败`,
|
||||
dangerouslyUseHTMLString: true,
|
||||
message: `<span>${doc.msg}</span>`,
|
||||
type: 'error'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user