vui document

Class: dialog

对话框

Author: putaoshu@126.com.
View source: dialog.js.

Arguments:

vui.dialog (options, callback)

  1. options - (Object) 组件配置
  2. options.message - (Object) 主对象
  3. options.mask - (Boolean) true 是否有遮罩层
  4. options.opacity - (Number) 0.15 遮罩层透明度
  5. options.maskClass - (String) vuiDialogMask 遮罩层样式
  6. options.dialogClass - (String) vuiDialog 对话框主体样式
  7. options.close - (Object) true 是否采用vui.undialog关闭浮层
  8. options.maskIframe - (Boolean) false 遮罩层用iframe做底
  9. options.appendType - (Boolean) true true 直接先append到body
  10. options.stick - (Object) null 需要粘在某个元素上
  11. options.autoClientX - (Boolean) false 浮层宽度为当前窗口宽度
  12. options.autoClientY - (Boolean) false 浮层高度为当前窗口高度
  13. options.fixed - (Boolean) true 浮层是否fixed
  14. options.css - (Object) 主体样式配置
  15. options.css.width - (Number) null 主体宽度
  16. options.css.height - (Number) null 主体高度
  17. options.css.top - (Number) null 主体top
  18. options.css.left - (Number) null 主体left
  19. options.css.zIndex - (Number) 9998 主体zIndex
  20. callback - (Function) 回调函数

Example:

vui.dialog({message:$('#dialog')});

vui.dialog({
	message:"<h2 >标题 </h2>",
	css:{
		top:'10px',
		left:'20px',
		width:'300px',
		zIndex:'10000'
	}
});

vui.dialog({
	message:$('#userGuide'),
	opacity:0.5,
	stick: $('#picModeOpt'), //粘到某个元素上
	css:{
		top : -17,
		left : -365,
		zIndex:10
	}
});