NEZ-938 feat:列表页面增加 duplicate按钮

This commit is contained in:
zhangyu
2021-08-26 14:51:38 +08:00
parent 952c563870
commit 7afc73effc
17 changed files with 80 additions and 9 deletions

View File

@@ -147,7 +147,12 @@ export default {
})
},
copy (u) {
this.object = { ...u, name: 'Copy from ' + u.name, id: '' }
this.object = { ...u, name: u.name + '-copy', id: '' }
if (this.object.name.length > 64) {
const length = this.object.name.length - 64
console.log(length, this.object.name.length, u.name.length)
this.object.name = u.name.substring(0, u.name.length - length) + '-copy'
}
this.rightBox.show = true
},
esc () {