extjs - Ext js 7 现代可调整大小的面板
问题描述
我想制作一个可调整大小的面板布局。我做了一个小提琴:
https://fiddle.sencha.com/#view/editor&fiddle/3c94
为什么我不能在 test1 和 test2 之间使用调整器,而 test3 和 test4 之间的调整器正在工作。
我尝试将 flex/fit 添加到一些容器中,尝试删除不重要的东西,但找不到解决方案。
解决方案
因为您在第一个面板中使用了 fit 布局,而在第二个面板中使用了 hbox(它有效):
Ext.create('Ext.form.Panel', {
xtype: 'main_customer',
itemId: 'main_customer',
renderTo: Ext.getBody(),
flex: 1,
items: [{
xtype: 'panel',
itemId: 'maincontainer',
layout: {
type: 'vbox',
align: 'stretch'
},
items: [{
xtype: 'panel',
padding: 0,
scrollable: true,
layout: {
type: 'hbox',
align: 'stretch'
},
flex: 1,
height: '63%',
resizable: {
split: true,
edges: ['south']
},
items: [{
xtype: 'panel',
resizable: {
split: true,
edges: ['east'],
},
items: [{
xtype: 'panel',
html: 'test 1',
}]
}, {
xtype: 'panel',
html: 'test 2',
}]
}, {
xtype: 'panel',
layout: {
type: 'hbox',
align: 'stretch'
},
flex: 1,
items: [{
xtype: 'panel',
width: '50%',
resizable: {
split: true,
edges: 'east'
},
html: 'test 3',
}, {
xtype: 'panel',
html: 'test 4',
}]
}]
}],
collapsible: false
});
推荐阅读
- swift - SwiftUI 中的静态项目列表
- python - 为什么在使用 TensorFlow Lite 转换 YOLOv4 时,推理时间/大小没有改善?有没有可能的改进?
- github - 如何修复在 Slack 中克隆 git url 的未知错误
- word-cloud - 如何在 wordcloud 中取消“耶稣”以获取“耶稣”?
- design-patterns - DDD - 没有域服务的条件业务规则
- html - 如何在不使用内联 svg 的情况下使 SVG 可修改
- c - 为什么我在 Tizen Native Wearable 中得到恒定的步数?
- python - Python Gmail 密件抄送和抄送
- python - tf.tape.gradient() 为我的数值函数模型返回 None
- python - 如何运行单元测试来测试具有 argparse 属性的脚本?