File tree Expand file tree Collapse file tree 2 files changed +19
-15
lines changed
Expand file tree Collapse file tree 2 files changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ export class ModifyTable {
2323 this . setRows ( ) ;
2424 this . setGridCols ( ) ;
2525
26- this . sliceRows ( ) ;
27- this . sliceCols ( ) ;
26+ // this.sliceRows();
27+ // this.sliceCols();
2828
2929 return this ;
3030 }
@@ -250,14 +250,16 @@ export class ModifyTable {
250250 } ;
251251
252252 expandColumns = ( count : number , colId : number ) => {
253- const rows = this . xml . getElementsByTagName ( 'a:tr' ) ;
254- for ( let r = 0 ; r < rows . length ; r ++ ) {
255- const row = rows . item ( r ) ;
256- const columns = row . getElementsByTagName ( 'a:tc' ) ;
257- const sourceCell = columns . item ( colId ) ;
258- const newCell = this . getExpandCellClone ( columns , sourceCell , colId ) ;
259-
260- XmlHelper . insertAfter ( newCell , sourceCell ) ;
253+ for ( let cs = 1 ; cs <= count ; cs ++ ) {
254+ const rows = this . xml . getElementsByTagName ( 'a:tr' ) ;
255+ for ( let r = 0 ; r < rows . length ; r ++ ) {
256+ const row = rows . item ( r ) ;
257+ const columns = row . getElementsByTagName ( 'a:tc' ) ;
258+ const sourceCell = columns . item ( colId ) ;
259+
260+ const newCell = this . getExpandCellClone ( columns , sourceCell , colId ) ;
261+ XmlHelper . insertAfter ( newCell , sourceCell ) ;
262+ }
261263 }
262264
263265 this . expandGrid ( count , colId , 1 ) ;
Original file line number Diff line number Diff line change @@ -23,11 +23,13 @@ export type ModifyTableParams = {
2323 adjustHeight ?: boolean ;
2424 setHeight ?: number ;
2525 setWidth ?: number ;
26- expand ?: {
27- tag : string ;
28- mode : 'row' | 'column' ;
29- count : number ;
30- } [ ] ;
26+ expand ?: ModifyTableExpand [ ] ;
27+ } ;
28+
29+ export type ModifyTableExpand = {
30+ tag : string ;
31+ mode : 'row' | 'column' ;
32+ count : number ;
3133} ;
3234
3335export type TableInfo = {
You can’t perform that action at this time.
0 commit comments