|
|
@@ -27,11 +27,6 @@ export default {
|
|
|
type: 'h1',
|
|
|
placeholder: '未命名文档标题',
|
|
|
content: ''
|
|
|
- }, {
|
|
|
- id: uuid.v4(),
|
|
|
- type: 'div',
|
|
|
- placeholder: '未命名小标题',
|
|
|
- content: ''
|
|
|
}]
|
|
|
}]
|
|
|
},
|
|
|
@@ -49,7 +44,7 @@ export default {
|
|
|
items: [{
|
|
|
id: uuid.v4(),
|
|
|
type: 'h3',
|
|
|
- placeholder: '未命名副标题',
|
|
|
+ placeholder: '未命名小标题',
|
|
|
content: ''
|
|
|
}, ...state.pages.slice(index + 1)]
|
|
|
}
|
|
|
@@ -69,7 +64,8 @@ export default {
|
|
|
...page.items.slice(0, index + 1), {
|
|
|
id: uuid.v4(),
|
|
|
type: 'div',
|
|
|
- content: ''
|
|
|
+ content: '',
|
|
|
+ placeholder: '未编辑正文项'
|
|
|
},
|
|
|
...page.items.slice(index + 1)
|
|
|
]
|
|
|
@@ -106,7 +102,7 @@ export default {
|
|
|
if (page.id === payload.pageId) {
|
|
|
return {
|
|
|
...page,
|
|
|
- items: page.items.filter(item => item.id !== payload.itemId)
|
|
|
+ items: page.items.filter((item, index) => index === 0 || item.id !== payload.itemId)
|
|
|
}
|
|
|
} else {
|
|
|
return page
|