Created
May 30, 2017 05:55
-
-
Save gearmobile/b0b373cba48c242248c4b93bf129c83a to your computer and use it in GitHub Desktop.
Simple Alert Vue.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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