'use strict';
define({
center: {
border: false,
items: [
[
{
xtype: 'button', css: { 'margin-left': '15px' },
text: '正确通知', iconCls: 'fa fa-window-maximize', onClick: function () {
$.yvan.notify({
autoClose: 2000,
type: 'success',
body: "总共有555条未处理消息",
title: "你有未处理消息"
});
}
},
{
xtype: 'button', css: { 'margin-left': '15px' },
text: '消息通知', iconCls: 'fa fa-window-maximize', onClick: function () {
$.yvan.notify({
autoClose: 5000,
type: 'info',
body: "总共有555条未处理消息",
title: "你有未处理消息"
});
}
},
{
xtype: 'button', css: { 'margin-left': '15px' },
text: '错误通知', iconCls: 'fa fa-window-maximize', onClick: function () {
$.yvan.notify({
autoClose: false,
showClose: true,
type: 'error',
body: "总共有555条未处理消息",
onClick: function () {
$.yvan.msg('被点击');
},
title: "你有未处理消息"
});
}
}
], [
{
xtype: 'button', css: { 'margin-left': '15px' },
text: '消息1', iconCls: 'fa fa-comment fa-lg', onClick: function () {
$.yvan.msg('提交');
}
},
{
xtype: 'button', css: { 'margin-left': '15px' },
text: '消息2', iconCls: 'fa fa-comment fa-lg', onClick: function () {
$.yvan.msg('提交
提交提交
提交
这里总共十个字的宽度');
}
},
{
xtype: 'button', css: { 'margin-left': '15px' },
text: '消息3', iconCls: 'fa fa-comment fa-lg', onClick: function () {
$.yvan.msg('提交
提交提交
提交
这里总共十个字的宽度
提交
提交提交
提交
这里总共十个字的宽度
提交
提交提交
提交
这里总共十个字的宽度');
}
}
], [
{
xtype: 'button', css: { 'margin-left': '15px' },
text: '提示框1', iconCls: 'fa fa-info-circle fa-lg', onClick: function () {
$.yvan.info('提交');
}
}, {
xtype: 'button', css: { 'margin-left': '15px' },
text: '提示框2', iconCls: 'fa fa-info-circle fa-lg', onClick: function () {
$.yvan.info('提交
提交提交
提交
这里总共十个字的宽度');
}
}, {
xtype: 'button', css: { 'margin-left': '15px' },
text: '提示框3', iconCls: 'fa fa-info-circle fa-lg', onClick: function () {
$.yvan.info(
'这个提示框没有关闭按钮,点击确认之后会有回调!',
function () {
$.yvan.msg('关闭之后该干的事');
});
}
}
], [
{
xtype: 'button', css: { 'margin-left': '15px' },
text: '错误框1', iconCls: 'fa fa-times-circle fa-lg', onClick: function () {
$.yvan.error('提交');
}
}, {
xtype: 'button', css: { 'margin-left': '15px' },
text: '错误框2', iconCls: 'fa fa-times-circle fa-lg', onClick: function () {
$.yvan.error('提交
提交提交
提交
这里总共十个字的宽度');
}
}, {
xtype: 'button', css: { 'margin-left': '15px' },
text: '错误框3', iconCls: 'fa fa-times-circle fa-lg', onClick: function () {
$.yvan.error(
'这个提示框没有关闭按钮,点击确认之后会有回调!',
function () {
$.yvan.msg('关闭之后该干的事');
});
}
}
], [
{
xtype: 'button', css: { 'margin-left': '15px' },
text: '确认框1', iconCls: 'fa fa-question-circle fa-lg', onClick: function () {
$.yvan.confirm('确认要这样做?', function () {
$.yvan.msg('是的');
});
}
}, {
xtype: 'button', css: { 'margin-left': '15px' },
text: '确认框2', iconCls: 'fa fa-question-circle fa-lg', onClick: function () {
$.yvan.confirm('确认要这样做?', {
yes: function () {
$.yvan.msg('是的');
},
no: function () {
$.yvan.msg('不');
}
});
}
}
], [
{
xtype: 'button', css: { 'margin-left': '15px' },
text: '全局加载', iconCls: 'fa fa-spinner fa-lg', onClick: function () {
$.yvan.progress();
setTimeout(function () {
$.yvan.closep();
}, 3000);
}
}, {
xtype: 'button', css: { 'margin-left': '15px' },
text: '局部加载', iconCls: 'fa fa-spinner fa-lg', onClick: function () {
var $me = $(this).up('power');
console.log($me);
$me.progress();
setTimeout(function () { $me.progress('close'); }, 3000);
}
}
]]
}
});