public List<SelectOption> getYearList(){
Integer year = Date.Today().year();
String s1=string.valueof(year).right(2);
Integer Year1= Integer.valueof(s1);
List<SelectOption> YearListOptions = new List<SelectOption>();
YearListOptions .add(new SelectOption('','YY'));
for(Integer i=Year1;i<=Year1+8;i++)
{
string j=string.valueof(i);
YearListOptions .add(new SelectOption(j,j));
}
return YearListOptions ;
}
我试过了,但是像 AuraEnabled 方法一样出现错误不支持 List 的返回类型