https://salesforce.stackexchange.com/questions/210323/lightningduallistbox-error-in-spring-18?noredirect=1#comment317091_210323
原因是lightning:dualListbox控件需要写全”label”, “sourceLabel”, “selectedLabel”, “options”属性。
参考官网写法:
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_dualListbox.htm
<aura:component><aura:attribute name="listOptions" type="List" default="[]"/><aura:attribute name="defaultOptions" type="List" default="[]"/><aura:attribute name="requiredOptions" type="List" default="[]"/><aura:handler name="init" value="{! this }" action="{! c.initialize }"/><lightning:dualListbox aura:id="selectOptions" name="Select Options" label= "Select Options" sourceLabel="Available Options" selectedLabel="Selected Options" options="{! v.listOptions }"value="{! v.defaultOptions }"requiredOptions="{! v.requiredOptions }"onchange="{! c.handleChange }"/>
</aura:component>