侧边栏缺少右键编辑功能
This commit is contained in:
parent
3a07dae8b3
commit
6dc7b86370
|
@ -207,10 +207,16 @@ export default defineComponent(() => {
|
|||
alert
|
||||
onClick={() => {
|
||||
// 删除链接
|
||||
const idx = layout.currentPage.list.findIndex((el) => el.id === block.id)
|
||||
if (idx < 0) return
|
||||
layout.currentPage.list.splice(idx, 1)
|
||||
console.log(menu.selectPage);
|
||||
|
||||
const idx = layout.state.content[layout.state.current].pages.findIndex(el => el.id === menu.selectPage?.id)
|
||||
menu.dismiss()
|
||||
|
||||
if (idx < 0) return
|
||||
if (idx === layout.state.currentPage) {
|
||||
return
|
||||
}
|
||||
layout.state.content[layout.state.current].pages.splice(idx, 1)
|
||||
}}
|
||||
>
|
||||
删除
|
||||
|
|
|
@ -230,7 +230,14 @@ export default defineComponent(() => {
|
|||
if (menu.selectPage) {
|
||||
menu.selectPage.name = selected.value.name
|
||||
menu.selectPage.label = label.value
|
||||
if (!menu.selectPage?.id) return
|
||||
const idx = layout.state.content[layout.state.current].pages.findIndex(val => val.id === menu.selectPage?.id)
|
||||
if (idx !== -1) {
|
||||
layout.state.content[layout.state.current].pages[idx].label = label.value
|
||||
layout.state.content[layout.state.current].pages[idx].name = selected.value.name
|
||||
|
||||
}
|
||||
menu.selectPage = undefined
|
||||
} else {
|
||||
layout.currentMode.pages.push({
|
||||
list: [],
|
||||
|
|
Loading…
Reference in New Issue