ExtJS6.2版本----组件---confim询问框--prompt输入框--wait等待缓冲框--show自定义框

test1.html

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<meta charset="UTF-8">
<title>Insert title here</title>
<!-- Ext的样式文件 -->
<link rel="stylesheet" type="text/css" href="extjs/themes/neptune/theme-neptune-all.css" />
<!--Ext的核心文件 -->
<script src="extjs/ext-all.js" type="text/javascript"></script>
<!-- 国际化文件 -->
<script src="extjs/locale-zh_CN.js" type="text/javascript"></script>
<!-- 测试文件 -->
<script type="text/javascript" src="text1.js"></script>
</head>
<body>

</body>
</html>

text1.js

Ext.onReady(function(){

});

Ext.onReady(function(){
//Ext.MessageBox.alert('提示信息','hello word!');
//Ext.Msg.alert('Title', 'The quick brown fox jumped over the lazy dog.', Ext.emptyFn);

/*Ext.Msg.alert('我是标题','Hello World!',function(){
console.info(this);
alert('我是回调函数!');
},this);*/

/*//询问框
Ext.Msg.confirm('提示信息','确定删除该条纪录么?',function(op){
if(op=='yes'){
alert('确认了!');
}else{
alert('取消了!');
}
});*/

/* //输入框
Ext.Msg.prompt('我是标题','请输入姓名:',function(op,val){
//op ok cancel
console.info(op);
console.info(val);
},this,true,'张三');
*/

/*//等待框
Ext.Msg.wait('提示信息','我是内容',{
interval: 400, //循环定时的间隔
duration: 2000, //总时长
increment: 5, //执行进度条的次数
text: '更新中,请稍后...', //进度条上的文字
scope: this,
fn: function(){
alert('更新成功!');
},
animate:true //更新渲染时提供一个动画效果
});*/

//自定义show方法
Ext.Msg.show({
title:'我是自定义的提示框!',
msg:'我是内容!',
300,
height:150,
buttons:Ext.Msg.YESNOCANCEL,
icon:Ext.Msg.ERROR //图标--ERROR INFO QUESTION WARNING
});

});

原文地址:https://www.cnblogs.com/fdxjava/p/10684413.html