1.store加载页面不加载(后台跑完前台没反应,也不转圈)
(1),检查this,特别是主子表时,只需要在main里面引用控制层,表头不能引用
2.store加载时,列宽一直扩大
(1).list,或main页面引用store,
(2) // forceFit: true,查看是否是此布局方式
- model类型:
1、auto(默认)
2、string
3、int
4、float
5、boolean
6、date
不能大写例如:String
4 store赋值时移除下拉框值消失,检查store的mode是否有此name字段
5.修改列字体颜色/背景颜色,
renderer: function (value, metaData,column) {
if(column.data.orderDeclarationStatus ==='10'){
metaData.style = 'color:green;font-weight:bold'
}else if(column.data.orderDeclarationStatus ==null){
metaData.style = 'color:red;font-weight:bold'
}
else if(column.data.orderDeclarationStatus ===''){
metaData.style = 'color:red;font-weight:bold'
}
// metaData.style = 'background-color:#FFF9EA';
return value;
}
6.修改所有字体颜色
viewConfig: {
autoFill: true,
foreceFit: true,
enableTextSelection: true,
getRowClass: function (record, rowIndex, rowParams,
store) {
if (record.data.verifyStatus === "20") {
// return 'x-grid-background-red';
return 'x-grid-record-red';
} else if (record.data.warn === "10") {
return 'x-grid-record-yellow';
// return 'x-grid-background-yellow';
}
}
},
- 单元格复制问题.在窗口中的grid enableTextSelection: true, 失效问题:
viewConfig: {
enableTextSelection: true, //可以复制单元格文字
getRowClass: function () {
return this.enableTextSelection ? 'x-selectable' : '';
},
},
-
extjs开发环境不报错,打包之后打不开页面,或者报错(c is not a constructor) 类似的看不懂且无用的错,优先考虑某个store没引用,
如果找不到某个store的话 sencha app build -testing 使用此命令打包会提示具体类 -
main页面布局:region: ‘west’,(左右布局) region: ‘north’,(上下布局)