Skip to content

Instantly share code, notes, and snippets.

@Maxim-Kolmogorov
Last active November 6, 2022 09:40
Show Gist options
  • Save Maxim-Kolmogorov/359be413a0d4f9c56e7c28b4da5b5576 to your computer and use it in GitHub Desktop.
Save Maxim-Kolmogorov/359be413a0d4f9c56e7c28b4da5b5576 to your computer and use it in GitHub Desktop.
Laravel 9 + Vite + Vue.js + SSR = example, part 5
<template>
<!-- Типо template -->
<div id="app">
<!-- Навигация -->
<nav class="flex flex-wrap">
<router-link
:to="'/'"
>
Главная
</router-link>
<router-link
:to="'/about'"
>
О нас
</router-link>
</nav>
<!-- Контент страницы -->
<router-view />
<div>
<button @click="count++">{{ count }}</button>
</div>
</div>
</template>
<script>
import { ref } from 'vue';
export default {
setup() {
const count = ref(0);
return {
count
}
},
mounted() {
console.log(this.count);
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment