1.0.2 • Published 3 years ago

@r.phuwanat/vue-min-alert v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

VMA

Vue Minimal Alert

Minimal alert modal module for Vue

Version

1.0.2

Requirement

This module use Fontawesome 5 for icons and Minimal Bootstrap for layout that is most likely Bootstrap. However you can customize as you want.

Quick start

Installation

npm

$ npm i @r.phuwanat/vue-min-alert

git

$ git clone https://github.com/pwnrrk/vue-min-alert

Usage

Import as a basic Vue component then put vue-min-alert somewhere in your html code with ref key

Example
<template>
	<div>
		<!-- Your code -->
		<vue-min-alert ref="alert" />
	</div>
</template>
<script>
import VueMinAlert 'path-to-folder/vue-min-alert.vue'
export default{
	components:{ VueMinAlert }
}
</script>
Trigger alert and get response
this.$refs.alert.fire({
	icon:"info",
	title:"Information",
	message:"This is information alert",
	showConfirm:true,
	confirmText:"OK",
	cancelText:"Cancel"
}).then( confirm => {
	if( comfirm ){
		//Do something
	}
})

Contributor

R.Phuwanat

Code licence

MIT

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago