2016-11-07 12:53:05 +00:00
|
|
|
|
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<p>{{ userAgent }}!</p>
|
|
|
|
<p><router-link to="/post">See a post (http request / Ajax)</router-link></p>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data ({ req }) {
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
setTimeout(function () {
|
|
|
|
resolve({
|
|
|
|
userAgent: (req ? req.headers['user-agent'] : navigator.userAgent)
|
|
|
|
})
|
|
|
|
}, 1000)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2016-11-07 13:12:59 +00:00
|
|
|
<style scoped>
|
2016-11-07 12:53:05 +00:00
|
|
|
p {
|
|
|
|
font-size: 20px;
|
|
|
|
text-align: center;
|
|
|
|
padding: 100px;
|
2016-11-07 13:12:59 +00:00
|
|
|
padding-bottom: 0;
|
2016-11-07 12:53:05 +00:00
|
|
|
}
|
|
|
|
</style>
|