var component = new NEKUI.Component({template: template,show: function() {var modal = new NEKUI.Modal({data: {lang: 'en-US',content: 'Modal内容'}});}});
Disable
<button class="u-btn u-btn-primary" on-click={this.show()}>Modal</button>
var component = new NEKUI.Component({template: template,show: function() {var modal = new NEKUI.Modal({data: {lang: 'en-US',okDisabled: true,cancelDisabled: true,cancelButton: true,content: 'Modal内容'}});}});
var component = new NEKUI.Component({template: template,show: function() {var modal = new NEKUI.Modal({data: {lang: 'en-US',hasFooter: false,content: 'Modal内容'}});}});
禁止关闭
<button class="u-btn u-btn-primary" on-click={this.show()}>Modal</button>
var component = new NEKUI.Component({template: template,show: function() {var modal = new NEKUI.Modal({data: {lang: 'en-US',isCanClose: false,content: 'Modal内容'}});}});
var component = new NEKUI.Component({template: template,show: function() {NEKUI.Modal.alert('Alert内容');}});
Confirm
<button class="u-btn u-btn-success" on-click={this.show()}>Confirm</button>
var component = new NEKUI.Component({template: template,show: function() {NEKUI.Modal.confirm('Confirm内容');}});
API
Classes
Functions
- close(result) 关闭对话框(result) 关闭对话框) ⇒
void
- ⇒
void
- cancel() 取消对话框() ⇒
void
- [title]) 弹出一个alert对话框。关闭时始终触发确定事件。([content], 弹出一个alert对话框。关闭时始终触发确定事件。) ⇒
Modal
- [title]) 弹出一个confirm对话框([content], 弹出一个confirm对话框) ⇒
Modal
Modal
Kind: global classExtend: Component
config()
init()
Kind: global functionAccess: protected
Kind: global functionAccess: public
ok() 确定对话框() ⇒ void
Kind: global functionAccess: public
cancel() 取消对话框() ⇒ void
Kind: global functionAccess: public
“close 关闭对话框时触发”
Kind: event emittedProperties