@@ -13,17 +13,17 @@ import {
1313 advancedSection ,
1414 expandSection ,
1515 formSection ,
16- intersectSection ,
1716 treeCommonChildren ,
1817 treeDataPropertyView ,
1918 TreeNameConfigs ,
2019 useTree ,
2120 valuePropertyView ,
2221} from "./treeUtils" ;
2322import { baseSelectRefMethods , getStyle } from "../selectInputComp/selectCompConstants" ;
24- import { useSelectInputValidate } from "../selectInputComp/selectInputConstants" ;
23+ import { useSelectInputValidate , SelectInputValidationSection } from "../selectInputComp/selectInputConstants" ;
2524import { StringControl } from "comps/controls/codeControl" ;
2625import { SelectEventHandlerControl } from "comps/controls/eventHandlerControl" ;
26+ import { selectInputValidate } from "../selectInputComp/selectInputConstants" ;
2727import { BoolControl } from "comps/controls/boolControl" ;
2828import { stateComp } from "comps/generators/simpleGenerators" ;
2929import { trans } from "i18n" ;
@@ -34,6 +34,8 @@ import {
3434} from "comps/utils/propertyUtils" ;
3535import { BaseSelectRef } from "rc-select" ;
3636import { RefControl } from "comps/controls/refControl" ;
37+ import { useContext } from "react" ;
38+ import { EditorContext } from "comps/editorState" ;
3739
3840const StyledTreeSelect = styled ( TreeSelect ) < { $style : TreeSelectStyleType } > `
3941 width: 100%;
@@ -144,21 +146,43 @@ let TreeBasicComp = (function () {
144146 < >
145147 < Section name = { sectionNames . basic } >
146148 { treeDataPropertyView ( children ) }
147- { children . selectType . propertyView ( { label : trans ( "tree.selectType" ) } ) }
148- { valuePropertyView ( children ) }
149- { children . selectType . getView ( ) === "check" &&
150- children . checkedStrategy . propertyView ( { label : trans ( "tree.checkedStrategy" ) } ) }
151149 { placeholderPropertyView ( children ) }
152150 </ Section >
153- { formSection ( children ) }
154- { children . label . getPropertyView ( ) }
155- { expandSection ( children ) }
156- { intersectSection ( children , children . onEvent . getPropertyView ( ) ) }
157- { advancedSection ( children , [
158- allowClearPropertyView ( children ) ,
159- showSearchPropertyView ( children ) ,
160- ] ) }
161- < Section name = { sectionNames . style } > { children . style . getPropertyView ( ) } </ Section >
151+
152+ { [ "logic" , "both" ] . includes ( useContext ( EditorContext ) . editorModeStatus ) && (
153+ < > < SelectInputValidationSection { ...children } />
154+ { formSection ( children ) }
155+ < Section name = { sectionNames . interaction } >
156+ { children . onEvent . getPropertyView ( ) }
157+ { children . hidden . propertyView ( { label : trans ( "prop.hide" ) } ) }
158+ { children . disabled . propertyView ( { label : trans ( "prop.disabled" ) } ) }
159+ { children . selectType . propertyView ( { label : trans ( "tree.selectType" ) } ) }
160+ { valuePropertyView ( children ) }
161+ { children . selectType . getView ( ) === "check" &&
162+ children . checkedStrategy . propertyView ( { label : trans ( "tree.checkedStrategy" ) } ) }
163+ { allowClearPropertyView ( children ) }
164+ { showSearchPropertyView ( children ) }
165+ </ Section >
166+ </ >
167+ ) }
168+
169+ { [ "layout" , "both" ] . includes ( useContext ( EditorContext ) . editorModeStatus ) && (
170+ < Section name = { sectionNames . layout } >
171+ { children . expanded . propertyView ( { label : trans ( "tree.expanded" ) } ) }
172+ { children . defaultExpandAll . propertyView ( { label : trans ( "tree.defaultExpandAll" ) } ) }
173+ { children . showLine . propertyView ( { label : trans ( "tree.showLine" ) } ) }
174+ { children . showLine . getView ( ) && children . showLeafIcon . propertyView ( { label : trans ( "tree.showLeafIcon" ) } ) }
175+ </ Section >
176+ ) }
177+
178+ { [ "layout" , "both" ] . includes ( useContext ( EditorContext ) . editorModeStatus ) && ( children . label . getPropertyView ( ) ) }
179+
180+ { [ "layout" , "both" ] . includes ( useContext ( EditorContext ) . editorModeStatus ) && (
181+ < Section name = { sectionNames . style } > { children . style . getPropertyView ( ) } </ Section >
182+ ) }
183+
184+
185+
162186 </ >
163187 ) )
164188 . setExposeMethodConfigs ( baseSelectRefMethods )
0 commit comments