-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
77 lines (69 loc) · 1.58 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
const routes = [
{
path: '/',
name: 'Main',
component: httpVueLoader('components/index.vue'),
children: [
{
path: '',
name: 'Dashboard',
component: httpVueLoader('components/Dashboard/index.vue'),
},
{
path: 'table',
name: 'Tables',
component: httpVueLoader('components/Table/index.vue'),
},
{
path: 'btable',
name: 'B-Tables',
component: httpVueLoader('components/Table/btable.vue'),
},
{
path: 'login',
name: 'Login',
component: httpVueLoader('components/Login/index.vue'),
},
]
}
]
// 3. Create the router instance and pass the `routes` option
// You can pass in additional options here, but let's
// keep it simple for now.
const router = VueRouter.createRouter({
// 4. Provide the history implementation to use. We are using the hash history for simplicity here.
history: VueRouter.createWebHashHistory(),
routes, // short for `routes: routes`
})
// 5. Create and mount the root instance.
const app = Vue.createApp({
el: '#app',
router,
data() {
return {
};
},
computed: {
showAlert() {
return this.name.length > 4 ? true : false
}
},
methods: {
},
components: {
},
watch: {
'$route'(to, from) {
}
},
mounted: function () {
}
})
// Make sure to _use_ the router instance to make the
// whole app router-aware.
app.use(router)
app.use(mdb)
// app.use(VueAwesome)
// app.use(Awesome)
// app.use(mdbvue)
app.mount('#app')