-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocumentation.vue
executable file
·183 lines (178 loc) · 4.51 KB
/
documentation.vue
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<template>
<v-container fluid>
<v-row>
<v-navigation-drawer
fixed
app
width="300"
>
<v-list expand>
<v-list-group
no-action
sub-group
value="true"
>
<template v-slot:activator>
<v-list-item-content>
<v-list-item-title>Getting Started</v-list-item-title>
</v-list-item-content>
</template>
<v-list-item
v-for="(gs, i) in gettingStart"
:key="i"
link
>
<v-list-item-title style="font-size: 0.9em" @click="$vuetify.goTo(gs[1])" v-text="gs[0]"></v-list-item-title>
</v-list-item>
</v-list-group>
<v-list-group
sub-group
no-action
>
<template v-slot:activator>
<v-list-item-content>
<v-list-item-title>Props</v-list-item-title>
</v-list-item-content>
</template>
<v-list-item
v-for="(prop, i) in props"
:key="i"
link
>
<v-list-item-title style="font-size: 0.9em" @click="$vuetify.goTo(prop[1])" v-text="prop[0]"></v-list-item-title>
</v-list-item>
</v-list-group>
<v-list-group
sub-group
no-action
>
<template v-slot:activator>
<v-list-item-content>
<v-list-item-title>Code Examples</v-list-item-title>
</v-list-item-content>
</template>
<v-list-item
v-for="(example, i) in examples"
:key="i"
link
>
<v-list-item-title style="font-size: 0.9em" @click="$vuetify.goTo(example[1])" v-text="example[0]"></v-list-item-title>
</v-list-item>
</v-list-group>
</v-list>
</v-navigation-drawer>
<v-col cols="12" lg="12" md="12" xs="12">
<p class="header">Getting Started</p>
<v-divider></v-divider>
<v-row>
<v-col cols="12" lg="12" md="12" xs="12">
<template>
<div v-html="readme"></div>
</template>
</v-col>
</v-row>
</v-col>
</v-row>
<v-fab-transition>
<v-btn
v-scroll="onScroll"
v-show="showScrollToTop"
fab
dark
fixed
bottom
right
color="primary"
@click="$vuetify.goTo(0)"
>
<v-icon>mdi-chevron-up</v-icon>
</v-btn>
</v-fab-transition>
</v-container>
</template>
<script>
import readme from './README.md'
export default {
data: () => ({
panelHeight: 0,
offsetTop: 0,
gettingStart: [
['Install', 625],
['Setup', 1260],
],
props: [
['documentAttachment', 2430],
['fileUploaderType', 3210],
['cardType', 3950],
['fileAccept', 4360],
['imageCompressor', 4750],
['imageCompressLevel', 5120],
['maxFileSize', 5530],
['maxFileCount', 5890],
['thumb', 6310],
['tableThumbColumn', 6680],
['tableFixedHeader', 7060],
['tableHeight', 7420],
['badgeCounter', 7810],
['rtlSupport', 8180],
['lang', 8550],
['customLang', 8960],
['btnColor', 10410],
['changeFileName', 10780],
['addFileDescription', 11160],
['addFileTag', 11540],
['tags', 11900],
['cols', 12260],
['editPermission', 12600],
['deletePermission', 12980],
],
examples: [
['Thumbnail', 13380],
['Simple', 14280],
['Table', 15140]
],
}),
computed: {
readme() {
return readme
},
showScrollToTop() {
return this.offsetTop > 60;
}
},
watch: {
},
mounted() {
this.onResize();
},
methods:{
onResize () {
window.addEventListener('resize', this.onResize);
this.panelHeight = window.innerHeight - 150;
},
onScroll() {
this.offsetTop = window.pageYOffset || document.documentElement.scrollTop;
}
},
}
</script>
<style scoped>
.header{
color: #263238;
font-size: 2rem;
}
.title{
margin: 15px;
color: #263238;
font-size: 1.5rem;
}
.sub-link{
margin-left: 10px;
}
code{
box-shadow: none !important;
}
.x-btn-inner {
text-transform: none !important;
}
</style>