mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
37 lines
614 B
Vue
37 lines
614 B
Vue
<template>
|
|
<div class="container">
|
|
<p><button @click="showLoginError">Notif me!</button></p>
|
|
<p>Home - <router-link to="/about">About</router-link></p>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
let miniToastr
|
|
if (process.BROWSER) {
|
|
miniToastr = require('mini-toastr')
|
|
}
|
|
|
|
export default {
|
|
mounted () {
|
|
if (process.BROWSER) {
|
|
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>
|