Skip to content

Instantly share code, notes, and snippets.

@gearmobile
Created May 30, 2017 05:55
Show Gist options
  • Save gearmobile/b0b373cba48c242248c4b93bf129c83a to your computer and use it in GitHub Desktop.
Save gearmobile/b0b373cba48c242248c4b93bf129c83a to your computer and use it in GitHub Desktop.
Simple Alert Vue.js
<template lang="pug">
#home
alert
isUseRadius = true
isUseIcon = true
ref = "alert-link"
button( type="button", @click="openWindow()" ) alert info
</template>
<script>
import Alert from 'vue2-simplert'
export default {
name: 'home',
data () {
return {
config: {
title: 'My First Alert',
message: 'First Alert in Vue.js',
type: 'info'
}
}
},
components: {
Alert
},
methods: {
openWindow () {
this.$refs.alertLink.openSimplert(this.config)
}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment