mirror of
https://github.com/marktext/marktext.git
synced 2025-05-21 19:30:47 +08:00
optimization: in paragraph menu
This commit is contained in:
parent
c90bf90e66
commit
968891d334
@ -83,9 +83,6 @@ const paragraphCtrl = ContentState => {
|
||||
start: { key, offset },
|
||||
end: { key, offset }
|
||||
}
|
||||
this.render()
|
||||
const selectionChanges = this.selectionChange()
|
||||
this.eventCenter.dispatch('selectionChange', selectionChanges)
|
||||
}
|
||||
|
||||
ContentState.prototype.handleListMenu = function (paraType) {
|
||||
@ -325,7 +322,8 @@ const paragraphCtrl = ContentState => {
|
||||
|
||||
switch (paraType) {
|
||||
case 'front-matter': {
|
||||
return this.handleFrontMatter()
|
||||
this.handleFrontMatter()
|
||||
break
|
||||
}
|
||||
case 'ul-bullet':
|
||||
case 'ul-task':
|
||||
@ -444,8 +442,15 @@ const paragraphCtrl = ContentState => {
|
||||
break
|
||||
}
|
||||
}
|
||||
if (paraType === 'front-matter') {
|
||||
this.render()
|
||||
} else {
|
||||
this.partialRender()
|
||||
}
|
||||
// update menu status
|
||||
const selectionChanges = this.selectionChange()
|
||||
this.eventCenter.dispatch('selectionChange', selectionChanges)
|
||||
}
|
||||
}
|
||||
|
||||
export default paragraphCtrl
|
||||
|
Loading…
Reference in New Issue
Block a user