forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.vue
More file actions
50 lines (47 loc) · 1 KB
/
index.vue
File metadata and controls
50 lines (47 loc) · 1 KB
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
<template>
<div>
<div class="layout-padding">
<div
class="list no-border"
v-for="(category, title) in list"
>
<h4 class="uppercase">
{{ title }}
</h4>
<router-link
v-for="feature in category"
:key="feature"
tag="div"
class="item item-link item-delimiter"
:to="feature.route"
>
<div class="item-content has-secondary">
<div>{{ feature.title }}</div>
</div>
<i class="item-secondary">chevron_right</i>
</router-link>
</div>
</div>
</div>
</template>
<script>
import pages from '../pages'
let list = {}
pages.map(page => page.slice(0, page.length - 4)).forEach(page => {
let [folder, file] = page.split('/')
if (!list[folder]) {
list[folder] = []
}
list[folder].push({
route: page,
title: file.charAt(0).toUpperCase() + file.slice(1)
})
})
export default {
data () {
return {
list
}
}
}
</script>