artDialog组件应用学习(二)
2014-04-12 22:17
267 查看
一.没有操作选项的对话框
预览:
html前台引入代码:(之后各种效果对话框引入代码致,调用方法也一样,就不一一写入)
提示框编写代码:
在前台页面调用方法:SelfCloseTip("5s后我会自动消失",300,150);
属性:
content: string类型,对话框显示内容
quickClose: boolean,点击对话框外围空白处,是否快速关闭对话框,true:关闭 false:不关闭
方法:
width(value): number类型,对话框宽度
height(value): number类型,对话框高度
show(): 显示普通对话框
close(): 关闭(隐藏)对话框
remove(): 销毁对话框,会从Dom元素中移除对话框相关节点,无法恢复
二.气泡浮层对话框
预览:
提示框编写代码:
属性:
align: string类型,浮层对齐方式,默认bottom left,支持:"top left", "top", "top right", "right top", "right", "right bottom", "bottom right",
"bottom", "bottom left", "left bottom", "left", "left top"(show()传入HTML对象方可生效)
padding: number类型,浮层里内容距所在容器距离(控制浮层高度)
参数follow是浮层显示位置的对象,注意,这个对象只能用javascript来获取,jquery获取无效。
var follow = document.getElementById("followid");
预览:
html前台引入代码:(之后各种效果对话框引入代码致,调用方法也一样,就不一一写入)
<script type="text/javascript" src="/Scripts/Arale/sea-modules/sea.js"></script> <script type="text/javascript"> seajs.config({ alias: { "jquery": "jquery-1.10.2" } }); </script>
提示框编写代码:
//为了让对话框自动消失,自行定义的方法 function DieOut(d, time) { setTimeout(function () { d.close().remove(); }, time); } //自动关闭对话框 function SelfCloseTip(msg, width, height) { seajs.use(['jquery', '/Scripts/arale/artDialog/src/dialog-plus'], function ($, dialog) { var d = dialog({ content: msg, quickClose: true }); d.width(width); d.height(height); d.show(); DieOut(d, 5000); }); }
在前台页面调用方法:SelfCloseTip("5s后我会自动消失",300,150);
属性:
content: string类型,对话框显示内容
quickClose: boolean,点击对话框外围空白处,是否快速关闭对话框,true:关闭 false:不关闭
方法:
width(value): number类型,对话框宽度
height(value): number类型,对话框高度
show(): 显示普通对话框
close(): 关闭(隐藏)对话框
remove(): 销毁对话框,会从Dom元素中移除对话框相关节点,无法恢复
二.气泡浮层对话框
预览:
提示框编写代码:
//气泡浮层效果 function FollowBottomTip(message, follow) { seajs.use(['jquery', '/Scripts/arale/artDialog/src/dialog-plus'], function ($, dialog) { var d = dialog({ align: "bottom left", padding:8, content: message, quickClose: true, }); d.show(follow); }); }
属性:
align: string类型,浮层对齐方式,默认bottom left,支持:"top left", "top", "top right", "right top", "right", "right bottom", "bottom right",
"bottom", "bottom left", "left bottom", "left", "left top"(show()传入HTML对象方可生效)
padding: number类型,浮层里内容距所在容器距离(控制浮层高度)
参数follow是浮层显示位置的对象,注意,这个对象只能用javascript来获取,jquery获取无效。
var follow = document.getElementById("followid");
相关文章推荐
- artDialog组件应用学习(三)
- artDialog组件应用学习(五)
- artDialog组件应用学习(四)
- artDialog组件应用学习(一)
- React-native学习过程 九 Text组件综合应用
- NET 应用架构指导 V2 学习笔记(十八) 表现层组件设计指导
- SWING组件学习7:滚动条的综合应用
- NET 应用架构指导 V2 学习笔记(二十) 业务组件设计指导
- NET 应用架构指导 V2 学习笔记(十七) 组件设计指导
- 【Bootstrap基础学习】02 Bootstrap的布局组件应用示例
- React-native学习过程 八 组件综合应用
- 【Unity3D游戏开发学习笔记】(四)一切都动起来—Animator组件的应用
- NET 应用架构指导 V2 学习笔记(二十二) 设计数据访问组件
- DevExpress ASPxCombobox 组件的学习与应用
- React学习(11)—— 高阶应用:Web组件
- Flex企业应用开发实践学习笔记(四)-------组件的布局
- Flex企业应用开发实践学习笔记(五)-------组件失效机制
- React学习笔记之高阶组件应用
- iCOM组件(iComponent,应用或学习组件)
- .Net语言 APP开发平台——Smobiler学习日志:在应用中添加WeiXin组件