完善提示信息
Former-commit-id: 46c43f8f24aff6ee6a924a850d737cfff1000a13 [formerly 46c43f8f24aff6ee6a924a850d737cfff1000a13 [formerly 46c43f8f24aff6ee6a924a850d737cfff1000a13 [formerly 46c43f8f24aff6ee6a924a850d737cfff1000a13 [formerly 2c607eb03b1d594ef8daff9e1222c08cc6e1320e [formerly 8ae7765744f33b8c33edd6d7f834d766cbae6344]]]]] Former-commit-id: 4df2f72598ac24b32dd3748e7aed16e86add67e5 Former-commit-id: 8a5de9475c71a8e331247b7efd3863a73a978e1b Former-commit-id: 8636966821cb13e888cc2c9297425574538d4f32 [formerly a05b9ddff6ec8e15e7c009291d0eac0e981e04ec] Former-commit-id: 74292749947634416e7978276fb733a2c8cf42a3 Former-commit-id: 36fa8c13af6242ff174c50e9fdf940986572da36 Former-commit-id: 33ed48b5383d90baa20a05a74e9451b8add4da1f Former-commit-id: 88fa0fd04c1c0155a1c4a131a51aeebb0829bc36 Former-commit-id: 484950dbcb878fefd04e9b336ba452de7f54ef34
This commit is contained in:
@@ -9,13 +9,14 @@
|
||||
<el-button @click="menuHeaderReset">恢复</el-button>
|
||||
</el-button-group>
|
||||
<div style="height: 400px; overflow: auto;">
|
||||
<tree-view
|
||||
<d2-highlight :code="JSON.stringify(menuHeader, null, 2)"/>
|
||||
<!-- <tree-view
|
||||
class="tree-view-small"
|
||||
:data="menuHeader"
|
||||
:options="{
|
||||
rootObjectKey: 'menuHeader',
|
||||
maxDepth: 1
|
||||
}"/>
|
||||
}"/> -->
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
@@ -27,13 +28,14 @@
|
||||
<el-button @click="menuAsideReset">恢复</el-button>
|
||||
</el-button-group>
|
||||
<div style="height: 400px; overflow: auto;">
|
||||
<tree-view
|
||||
<d2-highlight :code="JSON.stringify(menuAside, null, 2)"/>
|
||||
<!-- <tree-view
|
||||
class="tree-view-small"
|
||||
:data="menuAside"
|
||||
:options="{
|
||||
rootObjectKey: 'menuAside',
|
||||
maxDepth: 1
|
||||
}"/>
|
||||
}"/> -->
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
@@ -82,8 +84,8 @@ export default {
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.menuHeaderChanged && this.menuAsideChanged) {
|
||||
this.menuHeaderReset()
|
||||
this.menuAsideReset()
|
||||
this.d2adminMenuHeaderSet(this.menuHeaderBak)
|
||||
this.d2adminMenuAsideSet(this.menuAsideBak)
|
||||
this.$notify({
|
||||
title: '菜单恢复',
|
||||
message: '对侧边栏和顶栏菜单的修改已经复原',
|
||||
@@ -92,7 +94,7 @@ export default {
|
||||
return
|
||||
}
|
||||
if (this.menuHeaderChanged) {
|
||||
this.menuHeaderReset()
|
||||
this.d2adminMenuHeaderSet(this.menuHeaderBak)
|
||||
this.$notify({
|
||||
title: '菜单恢复',
|
||||
message: '对顶栏菜单的修改已经复原',
|
||||
@@ -101,7 +103,7 @@ export default {
|
||||
return
|
||||
}
|
||||
if (this.menuAsideChanged) {
|
||||
this.menuAsideReset()
|
||||
this.d2adminMenuAsideSet(this.menuAsideBak)
|
||||
this.$notify({
|
||||
title: '菜单恢复',
|
||||
message: '对侧边栏菜单的修改已经复原',
|
||||
@@ -120,6 +122,11 @@ export default {
|
||||
handleMenuHeaderSet () {
|
||||
this.menuHeaderChanged = true
|
||||
this.d2adminMenuHeaderSet(this.menuEmpty)
|
||||
this.$notify({
|
||||
title: '菜单修改',
|
||||
message: '对顶栏菜单的修改已经生效',
|
||||
type: 'success'
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 修改侧边栏菜单
|
||||
@@ -127,18 +134,33 @@ export default {
|
||||
handleMenuAsideSet () {
|
||||
this.menuAsideChanged = true
|
||||
this.d2adminMenuAsideSet(this.menuEmpty)
|
||||
this.$notify({
|
||||
title: '菜单修改',
|
||||
message: '对侧边栏菜单的修改已经生效',
|
||||
type: 'success'
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 恢复顶栏菜单
|
||||
*/
|
||||
menuHeaderReset () {
|
||||
this.d2adminMenuHeaderSet(this.menuHeaderBak)
|
||||
this.$notify({
|
||||
title: '菜单恢复',
|
||||
message: '对顶栏菜单的修改已经复原',
|
||||
type: 'success'
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 恢复侧边栏菜单
|
||||
*/
|
||||
menuAsideReset () {
|
||||
this.d2adminMenuAsideSet(this.menuAsideBak)
|
||||
this.$notify({
|
||||
title: '菜单恢复',
|
||||
message: '对侧边栏菜单的修改已经复原',
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user