代码演示

基本形式

<button class="u-btn u-btn-primary" on-click={this.show()}>Mask</button>
var component = new JRUI.Component({
template: template,
show: function() {
var modal = new JRUI.JRMask({
data: {
content: '<h1>Mask 标题</h1><p>Mask 内容</p>'
}
});
}
});

API

Classes

JRMask

Constants

Component

JRMask 遮罩

Functions

config()
init()
_handleClick()
close(data) 关闭遮罩(data)void

Events

“close 关闭遮罩时触发”

JRMask

Kind: global class
Extend: Component

new JRMask()

Param Type Default Description
[options.data] object = 绑定属性
[options.data.content] string => 内容模板
[options.data.closable] boolean true => 点击空白区域关闭
[options.data.class] string => 补充class

Component


JRMask 遮罩

Kind: global constant

Author: Cody

config()

Kind: global function
Access: protected

init()

Kind: global function
Access: protected

_handleClick()

Kind: global function
Access: protected

close(data) 关闭遮罩(data) ⇒ void

Kind: global function
Access: public

Param Type Description
data object 额外数据

“close 关闭遮罩时触发”

Kind: event emitted
Properties

Name Type Description
data object 额外数据