Setting up basic application structure
Some checks failed
My Actions / Explore (push) Has been cancelled
Some checks failed
My Actions / Explore (push) Has been cancelled
This commit is contained in:
18
public/js/Pages/Home/Index.vue
Normal file
18
public/js/Pages/Home/Index.vue
Normal file
@ -0,0 +1,18 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
defineProps({ text: String })
|
||||
|
||||
const count = ref(0);
|
||||
|
||||
function increment() {
|
||||
count.value++;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>Home Automation</h1>
|
||||
<h2>{{ text }} </h2>
|
||||
<span> {{ count }}</span>
|
||||
<button @click="increment">+</button>
|
||||
</template>
|
13
public/js/app.js
Normal file
13
public/js/app.js
Normal file
@ -0,0 +1,13 @@
|
||||
import { createApp, h } from 'vue'
|
||||
import { createInertiaApp } from '@inertiajs/vue3'
|
||||
|
||||
createInertiaApp({
|
||||
resolve: name => require(`./Pages/${name}.vue`),
|
||||
setup({ el, App, props, plugin }) {
|
||||
createApp( { render: () => h(App, props)})
|
||||
.use(plugin)
|
||||
.mount(el)
|
||||
},
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user