File tree Expand file tree Collapse file tree 5 files changed +7
-3
lines changed
Expand file tree Collapse file tree 5 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ interface IEditorOption {
6666 cursor? : ICursorOption // Cursor style. {width?: number; color?: string; dragWidth?: number; dragColor?: string; dragFloatImageDisabled?: boolean;}
6767 title? : ITitleOption // Title configuration.{ defaultFirstSize?: number; defaultSecondSize?: number; defaultThirdSize?: number defaultFourthSize?: number; defaultFifthSize?: number; defaultSixthSize?: number;}
6868 placeholder? : IPlaceholder // Placeholder text
69- group? : IGroup // Group option. {opacity?:number; backgroundColor?:string; activeOpacity?:number; activeBackgroundColor?:string; disabled?:boolean}
69+ group? : IGroup // Group option. {opacity?:number; backgroundColor?:string; activeOpacity?:number; activeBackgroundColor?:string; disabled?:boolean; deletable?:boolean; }
7070 pageBreak? : IPageBreak // PageBreak option。{font?:string; fontSize?:number; lineDash?:number[];}
7171 zone? : IZoneOption // Zone option。{tipDisabled?:boolean;}
7272 background? : IBackgroundOption // Background option. {color?:string; image?:string; size?:BackgroundSize; repeat?:BackgroundRepeat; applyPageNumbers?:number[]}。default: {color: '#FFFFFF'}
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ interface IEditorOption {
6666 cursor? : ICursorOption // 光标样式。{width?: number; color?: string; dragWidth?: number; dragColor?: string; dragFloatImageDisabled?: boolean;}
6767 title? : ITitleOption // 标题配置。{ defaultFirstSize?: number; defaultSecondSize?: number; defaultThirdSize?: number defaultFourthSize?: number; defaultFifthSize?: number; defaultSixthSize?: number;}
6868 placeholder? : IPlaceholder // 编辑器空白占位文本
69- group? : IGroup // 成组配置。{opacity?:number; backgroundColor?:string; activeOpacity?:number; activeBackgroundColor?:string; disabled?:boolean}
69+ group? : IGroup // 成组配置。{opacity?:number; backgroundColor?:string; activeOpacity?:number; activeBackgroundColor?:string; disabled?:boolean; deletable?:boolean; }
7070 pageBreak? : IPageBreak // 分页符配置。{font?:string; fontSize?:number; lineDash?:number[];}
7171 zone? : IZoneOption // 编辑器区域配置。{tipDisabled?:boolean;}
7272 background? : IBackgroundOption // 背景配置。{color?:string; image?:string; size?:BackgroundSize; repeat?:BackgroundRepeat; applyPageNumbers?:number[]}。默认:{color: '#FFFFFF'}
Original file line number Diff line number Diff line change @@ -784,6 +784,7 @@ export class Draw {
784784 options ?: ISpliceElementListOption
785785 ) {
786786 const { isIgnoreDeletedRule = false } = options || { }
787+ const { group } = this . options
787788 if ( deleteCount > 0 ) {
788789 // 当最后元素与开始元素列表信息不一致时:清除当前列表信息
789790 const endIndex = start + deleteCount
@@ -824,6 +825,7 @@ export class Draw {
824825 ( tdDeletable !== false &&
825826 deleteElement ?. control ?. deletable !== false &&
826827 deleteElement ?. title ?. deletable !== false &&
828+ ( group . deletable !== false || ! deleteElement . groupIds ?. length ) &&
827829 ( deleteElement ?. area ?. deletable !== false ||
828830 deleteElement ?. areaIndex !== 0 ) )
829831 ) {
Original file line number Diff line number Diff line change @@ -5,5 +5,6 @@ export const defaultGroupOption: Readonly<Required<IGroup>> = {
55 backgroundColor : '#E99D00' ,
66 activeOpacity : 0.5 ,
77 activeBackgroundColor : '#E99D00' ,
8- disabled : false
8+ disabled : false ,
9+ deletable : true
910}
Original file line number Diff line number Diff line change @@ -4,4 +4,5 @@ export interface IGroup {
44 activeOpacity ?: number
55 activeBackgroundColor ?: string
66 disabled ?: boolean
7+ deletable ?: boolean
78}
You can’t perform that action at this time.
0 commit comments