interface VariableTreeProps {
    appContext?: object;
    dataSource: IVariableTreeNode[];
    defaultValueDetailMode?: ValueDetailModeType;
    getPreviewValue?: ((node: IVariableTreeNode) => unknown);
    getServiceData?: ((serviceKey: string) => object);
    getServiceNames?: ((moduleName: string) => string[]);
    getStoreNames?: (() => string[]);
    height?: string | number;
    onAddService?: ((data: object) => void);
    onAddStore?: ((newStoreName: string) => void);
    onAddStoreVariable?: ((storeName: string, data: any) => void);
    onCopy?: ((data: IVariableTreeNode) => void);
    onRemoveService?: ((variableKey: string) => void);
    onRemoveStoreVariable?: ((variableKey: string) => void);
    onSelect?: SelectNodeCallback;
    onUpdateService?: ((data: object) => void);
    onUpdateStoreVariable?: ((variableKey: string, code: string) => void);
    onView?: SelectNodeCallback;
    renderDetail?: ((props: VariableTreeProps, state: IVariableTreeRenderDetailState) => ReactNode);
    renderHeaderExtra?: ((props: VariableTreeProps, state: IVariableTreeRenderDetailState) => ReactNode);
    serviceModules?: any[];
    showViewButton?: boolean;
}

Properties

appContext?: object
dataSource: IVariableTreeNode[]
defaultValueDetailMode?: ValueDetailModeType
getPreviewValue?: ((node: IVariableTreeNode) => unknown)
getServiceData?: ((serviceKey: string) => object)
getServiceNames?: ((moduleName: string) => string[])
getStoreNames?: (() => string[])
height?: string | number
onAddService?: ((data: object) => void)
onAddStore?: ((newStoreName: string) => void)
onAddStoreVariable?: ((storeName: string, data: any) => void)
onCopy?: ((data: IVariableTreeNode) => void)
onRemoveService?: ((variableKey: string) => void)
onRemoveStoreVariable?: ((variableKey: string) => void)
onSelect?: SelectNodeCallback
onUpdateService?: ((data: object) => void)
onUpdateStoreVariable?: ((variableKey: string, code: string) => void)
onView?: SelectNodeCallback
renderDetail?: ((props: VariableTreeProps, state: IVariableTreeRenderDetailState) => ReactNode)

自定义变量详情渲染

Type declaration

    • (props, state): ReactNode
    • Parameters

      Returns ReactNode

renderHeaderExtra?: ((props: VariableTreeProps, state: IVariableTreeRenderDetailState) => ReactNode)

自定义头部

serviceModules?: any[]
showViewButton?: boolean