我的项目中使用dstore和dgrid有以下代码。当我使用过滤器操作符时,我在eclipse中遇到编译错误以及Dojo构建附带的Closure编译器。
storeFilter = new origStore.Filter().or(new origStore.Filter().in('category', ['Action', 'Thriller', 'Comedy']), new origStore.Filter().eq('newRelease', true));
grid.set('collection', origStore.filter(storeFilter));
Eclispe错误:令牌'。'上的语法错误,此令牌后预期的标识符。
Closure编译器:'。''错误,标识符预期。
使用闭包编译器编译dgrid和dstore包很顺利。但是当我使用上面的代码编译我的包时导致错误。
我还要注意,代码在所有浏览器中都按预期工作。
你们任何人都可以在这里说清楚。
谢谢!
答案 0 :(得分:0)
尝试将.in
替换为['in']
,因为in
是保留字。