Extjs win

//创建window
var win = Ext.create("Ext.window.Window", {
id: "myWin",
title: "示例窗口",
500,
height: 300,
layout: "fit",
items: [
{
xtype: "form",
defaultType: 'textfield',
defaults: {
anchor: '100%',
},
fieldDefaults: {
labelWidth: 80,
labelAlign: "left",
flex: 1,
margin: 5
},
items: [
{
xtype: "container",
layout: "hbox",
items: [
{ xtype: "textfield", name: "name", fieldLabel: "姓名", allowBlank: false },
{ xtype: "numberfield", name: "age", fieldLabel: "年龄", decimalPrecision: 0, vtype: "age" }
]
}
]
}
],
buttons: [
{ xtype: "button", text: "确定", handler: function () { this.up("window").close(); } },
{ xtype: "button", text: "取消", handler: function () { this.up("window").close(); } }
]
});

记录贴,转自:
https://www.cnblogs.com/youring2/p/3990424.html

记录点滴,迭代精进,追求新生。Email: 942298768@qq.com
原文地址:https://www.cnblogs.com/chaoyong/p/8098846.html