代码演示
基本形式
<button class="u-btn u-btn-primary" on-click={this.show()}>Mask</button>
var component = new NEKUI.Component({template: template,show: function() {var modal = new NEKUI.Mask({data: {content: '<h1>Mask 标题</h1><p>Mask 内容</p>'}});}});
API
Classes
Constants
Functions
- config()
- init()
- _handleClick()
- close(data) 关闭遮罩(data) 关闭遮罩) ⇒
void
Events
Mask
Kind: global classExtend: Component
new Mask()
Param | Type | Default | Description |
---|---|---|---|
[options.data] | object | = 绑定属性 | |
[options.data.content] | string | => 内容模板 | |
[options.data.closable] | boolean | true | => 点击空白区域关闭 |
[options.data.class] | string | => 补充class |
Component
Mask 遮罩
Author: Cody
config()
Kind: global functionAccess: protected
init()
Kind: global functionAccess: protected
_handleClick()
Kind: global functionAccess: protected
close(data) 关闭遮罩(data) ⇒ void
Kind: global functionAccess: public
Param | Type | Description |
---|---|---|
data | object | 额外数据 |
“close 关闭遮罩时触发”
Kind: event emittedProperties
Name | Type | Description |
---|---|---|
data | object | 额外数据 |