feat:add checkbox menu
This commit is contained in:
@@ -223,7 +223,7 @@ export class CanvasEvent {
|
||||
const isDirectHitImage = !!(isDirectHit && isImage)
|
||||
const isDirectHitCheckbox = !!(isDirectHit && isCheckbox)
|
||||
if (~index) {
|
||||
this.range.setRange(index, index)
|
||||
this.range.setRange(curIndex, curIndex)
|
||||
// 复选框
|
||||
const isSetCheckbox = isDirectHitCheckbox && !isReadonly
|
||||
if (isSetCheckbox) {
|
||||
|
||||
@@ -94,9 +94,11 @@ export class Position {
|
||||
})
|
||||
if (~tablePosition.index) {
|
||||
const { index: tdValueIndex } = tablePosition
|
||||
const tdValueElement = td.value[tdValueIndex]
|
||||
return {
|
||||
index,
|
||||
isControl: td.value[tdValueIndex].type === ElementType.CONTROL,
|
||||
isCheckbox: tdValueElement.type === ElementType.CHECKBOX,
|
||||
isControl: tdValueElement.type === ElementType.CONTROL,
|
||||
isImage: tablePosition.isImage,
|
||||
isDirectHit: tablePosition.isDirectHit,
|
||||
isTable: true,
|
||||
|
||||
@@ -46,7 +46,8 @@ export const EDITOR_ELEMENT_ZIP_ATTR: Array<keyof IElement> = [
|
||||
'url',
|
||||
'colgroup',
|
||||
'valueList',
|
||||
'control'
|
||||
'control',
|
||||
'checkbox'
|
||||
]
|
||||
|
||||
export const TEXTLIKE_ELEMENT_TYPE: ElementType[] = [
|
||||
|
||||
Reference in New Issue
Block a user