我的看法:
<FlexBox
alignItems="Start"
justifyContent="SpaceBetween">
<m:HBox alignItems="Stretch">
<l:VerticalLayout>
<m:RadioButton id="rb-Yes" text="Quotation" select="changeKdsr" selected="true"/>
</l:VerticalLayout>
</m:HBox>
<m:HBox alignItems="Stretch">
<l:VerticalLayout>
<m:RadioButton id="rb-No" text="material" select="changeKdsr"/>
</l:VerticalLayout>
</m:HBox>
</FlexBox>
控制器:
changeKdsr: function (e) {
var rbText = e.getSource().mProperties.text; //this returns previously selected button text
}
此changeKdsr函数也被调用了两次,所以我必须使用怪异的逻辑来使它起作用。