Add vue setup, test vue at home page
This commit is contained in:
Generated
+447
-251
File diff suppressed because it is too large
Load Diff
+3
-1
@@ -28,6 +28,8 @@
|
|||||||
"datatables.net": "^1.11.3",
|
"datatables.net": "^1.11.3",
|
||||||
"datatables.net-dt": "^1.11.3",
|
"datatables.net-dt": "^1.11.3",
|
||||||
"jquery-confirm": "^3.3.4",
|
"jquery-confirm": "^3.3.4",
|
||||||
"viewerjs": "^1.11.2"
|
"viewerjs": "^1.11.2",
|
||||||
|
"vue": "^3.2.13",
|
||||||
|
"vue-loader": "^17.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"/js/app.js": "/js/app.js",
|
"/js/app.js": "/js/app.js",
|
||||||
|
"/js/vue-app.js": "/js/vue-app.js",
|
||||||
"/css/app.css": "/css/app.css"
|
"/css/app.css": "/css/app.css"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<template>
|
||||||
|
<bye-detail></bye-detail>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ByeDetail from "./ByeDetail.vue";
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
"bye-detail": ByeDetail,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<template>
|
||||||
|
<div>this is bye component using vuejs</div>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<template>
|
||||||
|
<hello-detail></hello-detail>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import HelloDetail from "./HelloDetail.vue";
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
"hello-detail": HelloDetail,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<template>
|
||||||
|
<div>this is hello detail component using vuejs</div>
|
||||||
|
</template>
|
||||||
Vendored
+10
@@ -0,0 +1,10 @@
|
|||||||
|
import { createApp } from 'vue'
|
||||||
|
|
||||||
|
import HelloComponent from "./components/HelloComponent.vue"
|
||||||
|
import ByeComponent from "./components/ByeComponent.vue"
|
||||||
|
|
||||||
|
const appHelloComponent = createApp(HelloComponent);
|
||||||
|
const appByeComponent = createApp(ByeComponent);
|
||||||
|
|
||||||
|
appHelloComponent.mount("#appHelloComponent");
|
||||||
|
appByeComponent.mount("#appByeComponent");
|
||||||
@@ -16,6 +16,8 @@
|
|||||||
<!-- {{ __('Selamat Datang!') }} -->
|
<!-- {{ __('Selamat Datang!') }} -->
|
||||||
@hasrole('admin')
|
@hasrole('admin')
|
||||||
I am a admin!
|
I am a admin!
|
||||||
|
<div id="appHelloComponent"></div>
|
||||||
|
<div id="appByeComponent"></div>
|
||||||
@endhasrole
|
@endhasrole
|
||||||
@hasrole('khazanah')
|
@hasrole('khazanah')
|
||||||
I am a khazanah!
|
I am a khazanah!
|
||||||
|
|||||||
@@ -76,6 +76,7 @@
|
|||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script src="{{ asset('js/vue-app.js') }}"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
Vendored
+2
@@ -12,5 +12,7 @@ const mix = require('laravel-mix');
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
mix.js('resources/js/app.js', 'public/js')
|
mix.js('resources/js/app.js', 'public/js')
|
||||||
|
.js('resources/js/vue-app.js', 'public/js')
|
||||||
|
.vue()
|
||||||
.sass('resources/sass/app.scss', 'public/css')
|
.sass('resources/sass/app.scss', 'public/css')
|
||||||
.sourceMaps();
|
.sourceMaps();
|
||||||
|
|||||||
Reference in New Issue
Block a user