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