mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-04-23 14:42:51 +08:00
parent
ef2f0de095
commit
81d9b0b3bb
@ -29,6 +29,7 @@
|
|||||||
<span class="btn">
|
<span class="btn">
|
||||||
<el-button-group size="small">
|
<el-button-group size="small">
|
||||||
<el-button @click.stop="add(node, data)" icon="el-icon-plus"></el-button>
|
<el-button @click.stop="add(node, data)" icon="el-icon-plus"></el-button>
|
||||||
|
<el-button @click.stop="copy(data)" icon="el-icon-copy-document"></el-button>
|
||||||
<el-popconfirm
|
<el-popconfirm
|
||||||
:title="this.$t('确定删除 {item} 吗?', { item: data.meta.title })"
|
:title="this.$t('确定删除 {item} 吗?', { item: data.meta.title })"
|
||||||
@confirm="del(node, data)"
|
@confirm="del(node, data)"
|
||||||
@ -88,6 +89,18 @@ export default {
|
|||||||
const targetText = data.meta.title
|
const targetText = data.meta.title
|
||||||
return targetText.indexOf(value) !== -1
|
return targetText.indexOf(value) !== -1
|
||||||
},
|
},
|
||||||
|
//复制
|
||||||
|
async copy(data) {
|
||||||
|
const newData = Object.assign({}, data, {
|
||||||
|
id: 0,
|
||||||
|
meta: Object.assign({}, data.meta, { title: data.meta.title + '-copy' }),
|
||||||
|
name: data.name + '-copy',
|
||||||
|
})
|
||||||
|
this.loading = true
|
||||||
|
const res = await this.$API.sys_menu.create.post(newData)
|
||||||
|
this.loading = false
|
||||||
|
this.reload()
|
||||||
|
},
|
||||||
//增加
|
//增加
|
||||||
async add(node, data) {
|
async add(node, data) {
|
||||||
const newData = {
|
const newData = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user