我使用 sencha -sdk ./ext-5.0.1 生成 MyApp ./MyApp 来获取新的应用程序。 并运行 sencha app watch, 开发工具 Netbeans 8.02、带有 Netbeans 连接器的 Google Chrome。 然后我创建一个包含 4 条数据线的 Gridpanel,并将其添加到 Main.js
Ext.define('MyApp.view.grid.GroupsList', {
extend: 'Ext.grid.GridPanel',
....
即使我没有将 stripRows 设置为 true,我仍然会得到 stripRows 效果。 我想通过更改 app.json 文件来更改主题
"theme": "ext-theme-neptune", to "theme": "ext-theme-crisp",
google chrome自动刷新2、3次,然后主题变了,但没有更多的stripRows。 我在Gridpanel的定义中添加“stripRows:true”或“viewConfig: {stripRows: true}”,没有效果。 当我将 app.json 文件更改回“neptune”时,stripRows 又回来了。 我测试了更多主题: 《咏叹调》一切都好。 “经典”一切都OK。
但是如果我设置 "stripRows: false"或 "viewConfig: {stripRows: false}",则 stripRows 始终存在。
最佳答案
正确的属性是
viewConfig: {
stripeRows: true
},
stripe行而不是stripRows。
Neptune 主题默认打开条纹行,而 crips 则没有。 这就是为什么尽管使用了错误的属性,你还是在海王星中得到了它们。
关于EXTJS 5 : Why does Ext. grid.Panel 在我将主题从海王星更改为清晰后没有 stripRows 效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27303766/