Extjs win

//创建window
var win = Ext.create("Ext.window.Window", {
id: "myWin",
title: "示例窗口",
width: 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

posted @ 2017-12-24 18:40  一轮明月随潮涌  阅读(154)  评论(0编辑  收藏  举报