组件方法列表
- 显示提示弹出框,
- 关闭对话框
- 确定框
- 显示失败弹出框
- 弹窗打开方法,核心方法,弹窗所有方法都需要调用这个方法
- 输入框
- 显示问题弹出框
- 显示成功弹出框
- 等待对话框
- 显示警告弹出框
- warning
| 方法 | 参数 | 描述 |
| ligerDialogAlert | (content, title, type, callback(不必填)) | |
| ligerDialogCloseWaitting | (content) | |
| ligerDialogconfirm | (title, content, callback) | |
| ligerDialogError | (title, content, callback) | |
| ligerDialogOpen | (options) | |
| ligerDialogPrompt | (title, value, multi, callback) | |
| ligerDialogQuestion | (title, content, callback) | |
| ligerDialogSuccess | (title, content, callback) | |
| ligerDialogWaitting | (content) | |
| ligerDialogWarn | (title, content, callback) | |
| ligerDialogWarning | (title, content, callback) |
组件方法详细
{$.ligerui.controls.Dialog}
ligerDialogAlert
(content, title, type, callback(不必填))
- 描述:
- 显示提示弹出框,
- 例子:
$.ligerDialog.alert('内容');
- 参数列表:
- 参数1:button
- 参数2:dialog Dom object
- 参数3:button index
| 参数名 | 类型 | 描述 | 默认值 |
| content | {String} | 内容 | |
| title | {String} | 标题(不必填,第二个参数,可替换为callback) | |
| type | {String} | 类型 (不必填,第三个参数,可替换为callback) | |
| callback(不必填) | {Function} | 点击确定事件
|
- 返回值:
- {$.ligerui.controls.Dialog} jQuery对象
{$.ligerui.controls.Dialog}
ligerDialogCloseWaitting
(content)
- 描述:
- 关闭对话框
- 例子:
$.ligerDialog.closeWaitting();
- 参数列表:
| 参数名 | 类型 | 描述 | 默认值 |
| content |
- 返回值:
- {$.ligerui.controls.Dialog} jQuery对象
{$.ligerui.controls.Dialog}
ligerDialogconfirm
(title, content, callback)
- 描述:
- 确定框
- 例子:
$.ligerDialog.confirm(content,function (r)
{
alert(r ? '您点击了Y' : '您点击了N');
});
- 参数列表:
- 参数1:是否点击了确定
| 参数名 | 类型 | 描述 | 默认值 |
| title | {String} | 标题 | |
| content | {String} | 内容 (不必填,第二个参数,可替换为callback) | |
| callback | {Function} | 点击确定事件
|
- 返回值:
- {$.ligerui.controls.Dialog} jQuery对象
{$.ligerui.controls.Dialog}
ligerDialogError
(title, content, callback)
- 描述:
- 显示失败弹出框
- 例子:
$.ligerDialog.error('内容');
- 参数列表:
- 参数1:button
- 参数2:dialog Dom object
- 参数3:button index
| 参数名 | 类型 | 描述 | 默认值 |
| title | {String} | 标题 | |
| content | {String} | 内容 (不必填,第二个参数,可替换为callback) | |
| callback | {Function} | 点击确定事件
|
- 返回值:
- {$.ligerui.controls.Dialog} jQuery对象
{$.ligerui.controls.Dialog}
ligerDialogOpen
(options)
- 描述:
- 弹窗打开方法,核心方法,弹窗所有方法都需要调用这个方法
- 例子:
$.ligerDialog.open(
{
width: 280,
type: 'error',
title:'对话框弹出演示标题',
content: '对话框弹出演示',
buttons: [{ text: '确定', onclick: btnClick }, { text: '取消', onclick: btnClick}]
});
- 参数列表:
- 参数1:button
- 参数2:dialog Dom object
- 参数3:button index
| 参数名 | 类型 | 描述 | 默认值 |
| type | {String} | 类型,包括success、donne、ok、error、warn、question | "" |
| cls | {String} | 给dialog附加css class | null |
| id | {String} | 给dialog附加id | null |
| isDrag | {Bool} | 是否拖动 | true |
| isResize | {Bool} | 是否调整大小 | true |
| allowClose | {Bool} | 是否允许关闭 | true |
| width | {Int} | 宽度 | 280 |
| height | {Int} | 高度,默认自适应 | null |
| title | {String} | 标题 | |
| target | {Object} | 目标对象,指定它将以appendTo()的方式载入 | null |
| url | {String} | 目标页url,默认以iframe的方式载入 | null |
| load | {Bool} | 是否以load()的方式加载目标页的内容 | false |
| modal | {Bool} | 是否模态对话框 | true |
| name | {String} | 创建iframe时 作为iframe的name和id | null |
| content | {String} | 内容 | null |
| closeWhenEnter | {String} | 按回车是否关闭对话框 | null |
| isHidden | {Bool} | 关闭对话框时是否只是隐藏,还是销毁对话框 | true |
| show | {Bool} | 初始化时是否马上显示 | true |
| title | {String} | 头部标题 | |
| buttons | {Array} | 按钮 | |
| buttons[i].width | {Int} | 宽度 | |
| buttons[i].text | {String} | 文本 | |
| buttons[i].onclick | {Function} | 显示完数据事件
|
|
| showMax | {Bool} | 是否显示最大化按钮 | true |
| showToggle | {Bool} | 是否显示收缩按钮 | true |
| showMin | {Bool} | 是否显示最小化按钮 | true |
| slide | {Bool} | 是否启动动画效果 | false |
| fixedType | {String} | 是否固定在右下角 | null |
| showType | {String} | 是否动态显示 | null |
- 返回值:
- {$.ligerui.controls.Dialog} 组件管理器
{$.ligerui.controls.Dialog}
ligerDialogPrompt
(title, value, multi, callback)
- 描述:
- 输入框
- 例子:
$.ligerDialog.prompt('提示内容', function (yes, value)
{
if (yes) alert(value);
});
- 参数列表:
- 参数1:yes 是否点击了是
- 参数2:value 文本框输入的值
| 参数名 | 类型 | 描述 | 默认值 |
| title | {String} | 标题 | |
| value | {String} | 初始化值(不必填,第二个参数,可替换为callback或multi) | |
| multi | {String} | 是否多行文本框(不必填,第三个参数,可替换为callback) | |
| callback | {Function} | 点击确定事件
|
- 返回值:
- {$.ligerui.controls.Dialog} jQuery对象
{$.ligerui.controls.Dialog}
ligerDialogQuestion
(title, content, callback)
- 描述:
- 显示问题弹出框
- 例子:
$.ligerDialog.question('内容');
- 参数列表:
- 参数1:button
- 参数2:dialog Dom object
- 参数3:button index
| 参数名 | 类型 | 描述 | 默认值 |
| title | {String} | 标题 | |
| content | {String} | 内容 (不必填,第二个参数,可替换为callback) | |
| callback | {Function} | 点击确定事件
|
- 返回值:
- {$.ligerui.controls.Dialog} jQuery对象
{$.ligerui.controls.Dialog}
ligerDialogSuccess
(title, content, callback)
- 描述:
- 显示成功弹出框
- 例子:
$.ligerDialog.success('内容');
- 参数列表:
- 参数1:button
- 参数2:dialog Dom object
- 参数3:button index
| 参数名 | 类型 | 描述 | 默认值 |
| title | {String} | 标题 | |
| content | {String} | 内容 (不必填,第二个参数,可替换为callback) | |
| callback | {Function} | 点击确定事件
|
- 返回值:
- {$.ligerui.controls.Dialog} jQuery对象
{$.ligerui.controls.Dialog}
ligerDialogWaitting
(content)
- 描述:
- 等待对话框
- 例子:
$.ligerDialog.waitting(content);
- 参数列表:
| 参数名 | 类型 | 描述 | 默认值 |
| content | {String} | 内容 |
- 返回值:
- {$.ligerui.controls.Dialog} jQuery对象
{$.ligerui.controls.Dialog}
ligerDialogWarn
(title, content, callback)
- 描述:
- 显示警告弹出框
- 例子:
$.ligerDialog.warn('内容');
- 参数列表:
- 参数1:button
- 参数2:dialog Dom object
- 参数3:button index
| 参数名 | 类型 | 描述 | 默认值 |
| title | {String} | 标题 | |
| content | {String} | 内容 (不必填,第二个参数,可替换为callback) | |
| callback | {Function} | 点击确定事件
|
- 返回值:
- {$.ligerui.controls.Dialog} jQuery对象
{$.ligerui.controls.Dialog}
ligerDialogWarning
(title, content, callback)
- 描述:
- warning
- 例子:
$.ligerDialog.warning(content, function (action)
{
alert(action);
});
- 参数列表:
- 参数1:action 包括ok、no、cancel
| 参数名 | 类型 | 描述 | 默认值 |
| title | {String} | 标题 | |
| content | {String} | 内容(不必填,第二个参数,可替换为callback) | |
| callback | {Function} | 点击确定事件
|
- 返回值:
- {$.ligerui.controls.Dialog} jQuery对象