feat: add textDecoration property to the rangeStyleChange event
This commit is contained in:
@@ -382,6 +382,7 @@ export class RangeManager {
|
||||
const level = curElement.level || null
|
||||
const listType = curElement.listType || null
|
||||
const listStyle = curElement.listStyle || null
|
||||
const textDecoration = underline ? curElement.textDecoration || null : null
|
||||
// 菜单
|
||||
const painter = !!this.draw.getPainterStyle()
|
||||
const undo = this.historyManager.isCanUndo()
|
||||
@@ -407,7 +408,8 @@ export class RangeManager {
|
||||
level,
|
||||
listType,
|
||||
listStyle,
|
||||
groupIds
|
||||
groupIds,
|
||||
textDecoration
|
||||
}
|
||||
if (rangeStyleChangeListener) {
|
||||
rangeStyleChangeListener(rangeStyle)
|
||||
@@ -447,7 +449,8 @@ export class RangeManager {
|
||||
level: null,
|
||||
listType: null,
|
||||
listStyle: null,
|
||||
groupIds: null
|
||||
groupIds: null,
|
||||
textDecoration: null
|
||||
}
|
||||
if (rangeStyleChangeListener) {
|
||||
rangeStyleChangeListener(rangeStyle)
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
import { RowFlex } from '../dataset/enum/Row'
|
||||
import { IControl } from './Control'
|
||||
import { IEditorResult } from './Editor'
|
||||
import { ITextDecoration } from './Text'
|
||||
|
||||
export interface IRangeStyle {
|
||||
type: ElementType | null
|
||||
@@ -30,6 +31,7 @@ export interface IRangeStyle {
|
||||
listType: ListType | null
|
||||
listStyle: ListStyle | null
|
||||
groupIds: string[] | null
|
||||
textDecoration: ITextDecoration | null
|
||||
}
|
||||
|
||||
export type IRangeStyleChange = (payload: IRangeStyle) => void
|
||||
|
||||
Reference in New Issue
Block a user