0

我的项目中使用 dstore 和 dgrid 有以下代码。当我使用过滤器运算符时,我在 eclipse 以及 Dojo build 附带的 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 错误:标记 '.' 上的语法错误,此标记后应有标识符。

闭包编译器:'.in' 处出错,需要标识符。

使用闭包编译器编译 dgrid 和 dstore 包非常顺利。但是当我用上面的代码编译我的包时会导致错误。

我还想指出,代码在所有浏览器中都按预期工作。

你们中的任何人都可以在这里阐明一下吗?

谢谢!。

4

1 回答 1

0

尝试用 替换.in['in']因为in是保留字。

于 2016-03-27T15:45:11.393 回答