@@ -397,78 +397,120 @@ function ColumnPropertyView<T extends MultiBaseComp<TableChildrenType>>(props: {
397397
398398function columnPropertyView < T extends MultiBaseComp < TableChildrenType > > ( comp : T ) {
399399 const columnLabel = trans ( "table.columnNum" ) ;
400- const dynamicColumn = comp . children . dynamicColumn . getView ( ) ;
400+ // const dynamicColumn = comp.children.dynamicColumn.getView();
401401 return [
402402 controlItem (
403403 { filterText : columnLabel } ,
404404 < ColumnPropertyView comp = { comp } columnLabel = { columnLabel } />
405405 ) ,
406- comp . children . dynamicColumn . propertyView ( { label : trans ( "table.dynamicColumn" ) } ) ,
406+ /* comp.children.dynamicColumn.propertyView({ label: trans("table.dynamicColumn") }),
407407 dynamicColumn &&
408408 comp.children.dynamicColumnConfig.propertyView({
409409 label: trans("table.dynamicColumnConfig"),
410410 tooltip: trans("table.dynamicColumnConfigDesc"),
411- } ) ,
411+ }), */
412412 ] ;
413413}
414414
415- export function compTablePropertyView < T extends MultiBaseComp < TableChildrenType > > ( comp : T ) {
415+ export function compTablePropertyView < T extends MultiBaseComp < TableChildrenType > & { editorModeStatus : string } > ( comp : T ) {
416+ const editorModeStatus = comp . editorModeStatus ;
416417 const dataLabel = trans ( "data" ) ;
417418 return (
418419 < >
419- < Section name = { trans ( "data" ) } >
420- { controlItem (
421- { filterText : dataLabel } ,
422- < div className = { tableDataDivClassName } >
423- { comp . children . data . propertyView ( {
424- label : dataLabel ,
420+ { [ "logic" , "both" ] . includes ( editorModeStatus ) && (
421+ < Section name = { trans ( "table.dataDesc" ) } >
422+ { controlItem (
423+ { filterText : dataLabel } ,
424+ < div className = { tableDataDivClassName } >
425+ { comp . children . data . propertyView ( {
426+ label : dataLabel ,
427+ } ) }
428+ </ div >
429+ ) }
430+ </ Section >
431+ ) }
432+
433+ { [ "layout" , "both" ] . includes ( editorModeStatus ) && (
434+ < Section name = { trans ( "prop.columns" ) } >
435+ { columnPropertyView ( comp ) }
436+ </ Section >
437+ ) }
438+
439+ { [ "logic" , "both" ] . includes ( editorModeStatus ) && (
440+ < >
441+ < Section name = { sectionNames . interaction } >
442+ { comp . children . onEvent . getPropertyView ( ) }
443+ { comp . children . selection . getPropertyView ( ) }
444+ { hiddenPropertyView ( comp . children ) }
445+ { loadingPropertyView ( comp . children ) }
446+ </ Section >
447+
448+ < Section name = { trans ( "prop.toolbar" ) } >
449+ { comp . children . toolbar . getPropertyView ( ) }
450+ </ Section >
451+ </ >
452+ ) }
453+
454+ { [ "layout" , "both" ] . includes ( editorModeStatus ) && (
455+ < >
456+ < Section name = { sectionNames . layout } >
457+ { comp . children . size . propertyView ( {
458+ label : trans ( "table.tableSize" ) ,
459+ radioButton : true ,
425460 } ) }
426- </ div >
427- ) }
428- </ Section >
429- < Section name = { trans ( "prop.columns" ) } > { columnPropertyView ( comp ) } </ Section >
430- < Section name = { sectionNames . layout } >
431- { comp . children . expansion . getPropertyView ( ) }
432- { hiddenPropertyView ( comp . children ) }
433- </ Section >
434- < Section name = { trans ( "prop.rowSelection" ) } >
435- { comp . children . selection . getPropertyView ( ) }
436- </ Section >
437- < Section name = { trans ( "prop.toolbar" ) } > { comp . children . toolbar . getPropertyView ( ) } </ Section >
438- < Section name = { trans ( "prop.pagination" ) } >
439- { comp . children . pagination . getPropertyView ( ) }
440- </ Section >
441- < Section name = { sectionNames . interaction } >
442- { comp . children . onEvent . getPropertyView ( ) }
443- { loadingPropertyView ( comp . children ) }
444- { comp . children . showDataLoadSpinner . propertyView ( {
445- label : trans ( "table.showDataLoadSpinner" ) ,
446- } ) }
447- { comp . children . viewModeResizable . propertyView ( {
448- label : trans ( "table.viewModeResizable" ) ,
449- tooltip : trans ( "table.viewModeResizableTooltip" ) ,
450- } ) }
451- </ Section >
452- < Section name = { "Table Style" } >
453- { comp . children . style . getPropertyView ( ) }
454- { comp . children . size . propertyView ( {
455- label : trans ( "table.tableSize" ) ,
456- radioButton : true ,
457- } ) }
458- { comp . children . hideHeader . propertyView ( {
459- label : trans ( "table.hideHeader" ) ,
460- } ) }
461- { comp . children . hideBordered . propertyView ( {
462- label : trans ( "table.hideBordered" ) ,
463- } ) }
464- </ Section >
465- < Section name = { "Row Style" } >
466- { comp . children . rowStyle . getPropertyView ( ) }
467- { comp . children . rowColor . getPropertyView ( ) }
468- </ Section >
469- < Section name = { "Column Style" } >
470- { comp . children . columnsStyle . getPropertyView ( ) }
471- </ Section >
461+ { comp . children . hideHeader . propertyView ( {
462+ label : trans ( "table.hideHeader" ) ,
463+ } ) }
464+ { comp . children . hideBordered . propertyView ( {
465+ label : trans ( "table.hideBordered" ) ,
466+ } ) }
467+ { comp . children . viewModeResizable . propertyView ( {
468+ label : trans ( "table.viewModeResizable" ) ,
469+ tooltip : trans ( "table.viewModeResizableTooltip" ) ,
470+ } ) }
471+ </ Section >
472+ < Section name = { trans ( "prop.pagination" ) } >
473+ { comp . children . pagination . getPropertyView ( ) }
474+ </ Section >
475+ </ >
476+ ) }
477+
478+ { [ "logic" , "both" ] . includes ( editorModeStatus ) && (
479+ < >
480+ < Section name = { sectionNames . advanced } >
481+ { comp . children . expansion . getPropertyView ( ) }
482+ { comp . children . showDataLoadSpinner . propertyView ( {
483+ label : trans ( "table.showDataLoadSpinner" ) ,
484+ } ) }
485+ { comp . children . dynamicColumn . propertyView ( { label : trans ( "table.dynamicColumn" ) } ) }
486+ { comp . children . dynamicColumn . getView ( ) &&
487+ comp . children . dynamicColumnConfig . propertyView ( {
488+ label : trans ( "table.dynamicColumnConfig" ) ,
489+ tooltip : trans ( "table.dynamicColumnConfigDesc" ) ,
490+ } ) }
491+ { comp . children . searchText . propertyView ( {
492+ label : trans ( "table.searchText" ) ,
493+ tooltip : trans ( "table.searchTextTooltip" ) ,
494+ placeholder : "{{input1.value}}" ,
495+ } ) }
496+ </ Section >
497+ </ >
498+ ) }
499+
500+ { [ "layout" , "both" ] . includes ( editorModeStatus ) && (
501+ < > < Section name = { "Table Style" } >
502+ { comp . children . style . getPropertyView ( ) }
503+
504+ </ Section >
505+ < Section name = { "Row Style" } >
506+ { comp . children . rowStyle . getPropertyView ( ) }
507+ { comp . children . rowColor . getPropertyView ( ) }
508+ </ Section >
509+ < Section name = { "Column Style" } >
510+ { comp . children . columnsStyle . getPropertyView ( ) }
511+ </ Section >
512+ </ >
513+ ) }
472514 </ >
473515 ) ;
474516}
0 commit comments