This repository was archived by the owner on Jul 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Methods And Props
Irfan Maulana edited this page Jun 28, 2017
·
19 revisions
You can add props in simplert component, example :
<simplert useRadius=true
useIcon=true
ref="simplert">
</simplert>| Attribute | Value Type | Default Value | Description |
|---|---|---|---|
| useRadius | Boolean | true | Setting useRadius to true will make Simplert's message box and buttons have rounded corners |
| useIcon | Boolean | true | true : will use SweatAlert icon based on type, false : not use icon |
| ref | String | - | child reference, read here |
You can call available methods in simplert with this.$refs.simplert.someMethod(), example :
var obj = {
isShown: true,
title: 'test',
message: 'message',
type: 'success',
onClose: this.onClose
}
this.$refs.simplert.openSimplert(obj)| Method Name | Parameter | Description |
|---|---|---|
| closeOverlay | - | |
| closeSimplert | - | close simplert popup |
| openSimplert | Object | open simplert popup with predifined object passed |
{
title: 'test', //string -- title alert
message: 'message', //string -- message alert
type: 'success', //string -- type : info (default), success, warning, error
customClass: '', //string -- custom class in simplert div
customIconUrl: '', //string -- custom url custom image icon
customCloseBtnText: '', //string -- close button text
customCloseBtnClass: '', //string -- custom class for close button
onClose: this.onClose, //function -- when close triggered
useConfirmBtn: false, //boolean -- using confirm button
customConfirmBtnText: '', //string -- confirm button text
customConfirmBtnClass: '', //string -- custom class for confirm button
onConfirm: this.onConfirm, //function -- when confirm button triggered
disableOverlayClick: false, //boolean -- set to true if you want disable overlay click function
hideAllButton: false //boolean -- set to true if you want hide all button
}Copyright © 2017 by Irfan Maulana
