123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- '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('提交<br>提交提交<br>提交<br>这里总共十个字的宽度');
- }
- },
- {
- xtype: 'button', css: { 'margin-left': '15px' },
- text: '消息3', iconCls: 'fa fa-comment fa-lg', onClick: function () {
- $.yvan.msg('提交<br>提交提交<br>提交<br>这里总共十个字的宽度<br>提交<br>提交提交<br>提交<br>这里总共十个字的宽度<br>提交<br>提交提交<br>提交<br>这里总共十个字的宽度');
- }
- }
- ], [
- {
- 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('提交<br>提交提交<br>提交<br>这里总共十个字的宽度');
- }
- }, {
- 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('提交<br>提交提交<br>提交<br>这里总共十个字的宽度');
- }
- }, {
- 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);
- }
- }
- ]]
- }
- });
|