mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-24 22:55:13 +00:00
35 lines
581 B
Vue
35 lines
581 B
Vue
<template>
|
|
<div class="container">
|
|
<p><button @click="showLoginError">Notif me!</button></p>
|
|
<p>Home - <nuxt-link to="/about">About</nuxt-link></p>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
let miniToastr
|
|
if (process.BROWSER_BUILD) {
|
|
miniToastr = require('mini-toastr')
|
|
}
|
|
|
|
export default {
|
|
mounted () {
|
|
miniToastr.init()
|
|
},
|
|
notifications: {
|
|
showLoginError: {
|
|
title: 'Welcome!',
|
|
message: 'Hello from nuxt.js',
|
|
type: 'info'
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
.container {
|
|
text-align: center;
|
|
padding-top: 100px;
|
|
font-family: sans-serif;
|
|
}
|
|
</style>
|