Layout run failed错误解决方案
来源:互联网 发布:mac好的app推荐 编辑:程序博客网 时间:2024/06/02 01:23
一、问题描述:
在Container中加入Ext.grid.Panel 时,发生如下错误:
百度一下,仍未果。
二、解决文案:
对比之前写的代码,发现,只要在父元素中,加入width:X%即可解决。
三、代码:
从网上搜的各种都解决不了此问题,现上传错误与正确代码:
1、错误代码:
{ xtype: 'container', layout: { type: 'hbox' }, items: [ { xtype: 'label', html: '优惠设置' }, { xtype: 'grid', flex: 1, name: 'discounts-setup', store: { type: 'commoditytitleinfostore', data: [{ product_id: 1, image: 'http://xxxxx.c.jpg', name: 'Lisa', current_price: 55, discount_amount: 22.1, quantity: 88 }] }, columns: [ { text: '商品名称', align: 'center', xtype: 'widgetcolumn', widget: { xtype: 'commoditytitleinfo', bind: { bindData: { name: '{record.name}', image: '{record.image}' } } } }, { text: '价格', dataIndex: 'current_price' } ] } ] },
2、正确代码:{ xtype: 'container', width: '80%',//******此处要加 layout: { type: 'hbox' }, items: [ { xtype: 'label', html: '优惠设置' }, { xtype: 'grid', flex: 1,//此处要加 name: 'discounts-setup', store: { type: 'commoditytitleinfostore', data: [{ product_id: 1, image: 'http://xxxx.c.jpg', name: 'Lisa', current_price: 55, discount_amount: 22.1, quantity: 88 }] }, columns: [ { text: '商品名称', align: 'center', xtype: 'widgetcolumn', widget: { xtype: 'commoditytitleinfo', bind: { bindData: { name: '{record.name}', image: '{record.image}' } } } }, { text: '价格', dataIndex: 'current_price' } ] } ] }
网上有说是layout类型不对,要改为fit,这里不需要更改layout的type配置项。
注:我的版本号是6.2.1 gpl。
阅读全文
0 0
- Layout run failed错误解决方案
- Extjs, 使用GridPanel出现 Layout run failed
- ExtJS 4.2 报错 layout run failed 的解决办法
- Test run failed: Test run failed to complete. Expected 1 tests, received 0错误
- Failed to create .NET Frameworks PropertyGrid component错误的解决方案
- iis错误“Failed to access IIS metabase”解决方案
- Failed to create .NET Frameworks PropertyGrid component错误的解决方案
- git clone操作出现fatal:index-pack failed错误解决方案
- lombok eclipse 提示 generating getters and setters failed 错误解决方案
- 配置cygwin Installing sshd as a service failed!错误解决方案
- 虚机打不开报failed to lock the file错误原因及解决方案
- 真机调试出现 application installation failed 错误 解决方案
- lombok eclipse 提示 generating getters and setters failed 错误解决方案
- Android Studio 中出现错误Failed to resolve: com.android.support.constraint:constraint-layout:1.0.2
- Failed to get the adb version: Cannot run program "D:\..."的错误解决!
- 安卓单元测试错误Test run failed: Unable to find instrumentation target package解决办法
- Rsync 服务器启动错误:failed to create pid file /var/run/rsyncd.pid: File exists
- android常见错误之“Failed to get the adb version: Cannot run program”
- 拷贝函数
- IOS11的新功能你发现了没有~~~
- AMS 启动的时候杀掉所有进程
- C语言 异步回调
- Git常用命令
- Layout run failed错误解决方案
- SharedPreferences 存储实体类
- 漫画人物脚的结构与画法
- 阿里云在美推出MaxCompute大数据计算平台
- AVL树->图解1
- spark1.5.2 spark-shell报错:java.util.concurrent.RejectedExecutionException
- 【专家热文】为什么要认证? IT认证的五大优势!(IT从业人员必看)
- 30 分钟学会 Flex 布局
- SQL 语句判断英文大小写