Sapui5 SAP UI5如何设置流程通道标题的颜色状态

Sapui5 SAP UI5如何设置流程通道标题的颜色状态,sapui5,Sapui5,我在流程中遇到了一个问题。我试图将ProcessFlowLaneHeader的状态设置为正值,但我无法看到绿色的节点。你能帮我解决这个问题吗。 下面是我尝试过的代码 <ui:ProcessFlow class="processFlow" scrollable="false" showLabels="false"> <ui:lanes> <ui:ProcessFlowLaneHeader iconSr

我在流程中遇到了一个问题。我试图将ProcessFlowLaneHeader的状态设置为正值,但我无法看到绿色的节点。你能帮我解决这个问题吗。 下面是我尝试过的代码

<ui:ProcessFlow class="processFlow" scrollable="false" showLabels="false">                      
    <ui:lanes>
        <ui:ProcessFlowLaneHeader iconSrc="sap-icon://order-status" text="Apply" press="onNodeLeaveApply"
                            state="{[sap.suite.ui.commons.ProcessFlowNodeState.Positive]}" position="0"/>
        <ui:ProcessFlowLaneHeader state="{[sap.suite.ui.commons.ProcessFlowNodeState.Positive]}" iconSrc="sap-icon://customer" text="Review"
                            press="onNodeLeaveReview" position="1"/>
        <ui:ProcessFlowLaneHeader state="{[sap.suite.ui.commons.ProcessFlowNodeState.Positive]}" iconSrc="sap-icon://inventory" text="Sent"
                            press="onNodeLeaveSent" position="2"/>
    </ui:lanes>
</ui:ProcessFlow>

请帮助我如何将状态更改为绿色(正色)


提前谢谢你

对不起,第一个答案很仓促而且不正确。state属性实际上是一个成对的数组{state,value}。 “press”的事件处理程序可以访问ProcessFlowLaneHeader作为事件的源,因此oEvent.mpParameters.oParent.mAggregations.lanes[0]行应更改为oEvent.getSource():

您可以使用字符串“Negative”和“Positive”,而不是sap.suite.ui.commons.ProcessFlowNodeEstate.Negative或sap.suite.ui.commons.ProcessFlowNodeEstate.Positive,结果相同:

onNodeLeaveApply: function(oEvent) {
    oEvent.getSource().setState([{
                state: "Positive",
                value: 20
            },
            {
                state: "Negative",
                value: 10
            }]);
        }

谢谢你的回复。但它对我不起作用:(我不明白到底是什么问题..太棒了..这个解决方案对我起作用了。谢谢你的观察,你帮了我快速解决了..太好了..)你指的不是节点,而是LaneHeader。节点是这些标题下的方形注释
onNodeLeaveApply: function(oEvent) {
    oEvent.getSource().setState([{
        state: sap.suite.ui.commons.ProcessFlowNodeState.Positive,
        value: 20
    },
    {
        state: sap.suite.ui.commons.ProcessFlowNodeState.Negative,
        value: 10
    }]);
}
onNodeLeaveApply: function(oEvent) {
    oEvent.getSource().setState([{
                state: "Positive",
                value: 20
            },
            {
                state: "Negative",
                value: 10
            }]);
        }