extjs - Extjs Ext.form.field.Tag,resize 事件未触发
问题描述
调整创建标签字段的面板大小后,不会触发标签字段的调整大小事件。这是代码的一部分
Ext.application({
name: 'Fiddle',
launch: function () {
var shows = Ext.create('Ext.data.Store', {
fields: ['id', 'show'],
data: [{
id: 0,
show: 'Battlestar Galactica'
}, {
id: 1,
show: 'Doctor Who'
}, {
id: 2,
show: 'Farscape'
}, {
id: 3,
show: 'Firefly'
}, {
id: 4,
show: 'Star Trek'
}, {
id: 5,
show: 'Star Wars: Christmas Special'
}]
});
var panel = new Ext.panel.Panel({
layout: {
type: 'vbox',
align: 'stretch'
},
items: [{
xtype: 'textfield',
fieldLabel: 'One Two Three Four Five Six Seven',
labelAlign: 'top',
width: '100%'
}, {
xtype: 'tagfield',
fieldLabel: 'One Two Three Four Five Six Seven',
labelAlign: 'top',
store: shows,
displayField: 'show',
valueField: 'id',
queryMode: 'local',
filterPickList: true,
width: '100%',
listeners: {
resize: function () {
debugger, //the event is not fired
}
}
}]
})
var window = new Ext.Window({
layout: 'anchor',
title: 'Hello resizer',
resizable: {
dynamic: true
},
draggable: true,
scrollable: 'vertical',
items: [panel],
width: 400,
height: 200,
});
window.show();
}
});
解决方案
正如 API 文档中所说:此 事件不会在使用 cfg-liquidLayout 的组件上触发,例如 Ext.button.Button 和 Ext.form.field.Base。
推荐阅读
- ios - React Native 0.61:使用自动链接,你还需要在 Podfile 中添加行吗?
- c - 尝试使用 scanf() 接收多个变量
- docker - Docker PHP Apache 邮件
- r - 将单点添加到 levelplot
- excel - How to Add another document to mail merge for the same record
- javascript - 我的页脚包含 3 个列表。如何在非桌面或移动视图中将其排列为 3 行
- r - 由布尔值索引的序列的R向量?
- php - 如何计算列中的“优于 X% 的用户”?
- python - How to add Jitter to scatter plot with X and Y values?
- angular - 反应形式Angular 8中的发布方法