Ext.onReady(function () {
//创建表单
Ext.create("Ext.form.Panel", {
id: "formLogin",
border: false, // 去除panel组件的边框
defaultType: "textfield",
defaults:{style:"margin-top:10px;"},
layout: {
type: \'vbox\',
align: \'center\'
},
items: [
{
height: 30,
emptyText:"用 户",
fieldStyle: { background: \'#ffffff url(/Img/Ico/user.png) no-repeat 8px center\', paddingLeft: \'33px\' }
},
{
height: 30,
emptyText: "密 码",
fieldStyle: { background: \'#ffffff url(/Img/Ico/block.png) no-repeat 8px center\', paddingLeft: \'33px\' }
},
{
xtype:"button",
style: "border:none;background:#16699E;margin-top:10px;",
iconCls:"btnIco",
width: 210,
height:30,
frame:false,
border: false,
text:"登 入"
}
]
});
Ext.create("Ext.window.Window", {
title: "Drugs ERP Login",
bodyPadding: 10,
autoShow: true,
style: "border:none;padding:10px;", //去除window组件dom元素的边框
border: false, // 去除window组件的边框
closable: false,
draggable:false,
layout: "anchor",
width: 310,
height:300,
items: [
Ext.getCmp("formLogin")
],
listeners: {
beforeclose: function () { //关闭前销毁window,不能在close时销毁,否则遮罩没法清除
this.destroy();
},
close: function () { }
}
});
});